2018-10-26 18:51:37 +02:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, unittest2
|
|
|
|
, pyasn1
|
2018-11-04 11:35:16 +01:00
|
|
|
, mock
|
2019-01-04 14:22:03 +01:00
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2018-10-26 18:51:37 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rsa";
|
2018-11-04 11:35:16 +01:00
|
|
|
version = "4.0";
|
2018-10-26 18:51:37 +02:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-11-04 11:35:16 +01:00
|
|
|
sha256 = "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487";
|
2018-10-26 18:51:37 +02:00
|
|
|
};
|
|
|
|
|
2018-11-04 11:35:16 +01:00
|
|
|
checkInputs = [ unittest2 mock ];
|
2018-10-26 18:51:37 +02:00
|
|
|
propagatedBuildInputs = [ pyasn1 ];
|
|
|
|
|
2019-01-04 14:22:03 +01:00
|
|
|
preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") ''
|
|
|
|
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
|
|
|
|
'';
|
|
|
|
|
2018-10-26 18:51:37 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://stuvel.eu/rsa;
|
|
|
|
license = licenses.asl20;
|
|
|
|
description = "A pure-Python RSA implementation";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|