2018-10-26 16:51:37 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, unittest2
|
|
|
|
, pyasn1
|
2018-11-04 10:35:16 +00:00
|
|
|
, mock
|
2019-01-04 13:22:03 +00:00
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2020-06-11 08:07:58 +00:00
|
|
|
, poetry
|
2018-10-26 16:51:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rsa";
|
2020-08-16 17:31:15 +00:00
|
|
|
version = "4.6";
|
2018-10-26 16:51:37 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-16 17:31:15 +00:00
|
|
|
sha256 = "109ea5a66744dd859bf16fe904b8d8b627adafb9408753161e766a92e7d681fa";
|
2018-10-26 16:51:37 +00:00
|
|
|
};
|
|
|
|
|
2018-11-04 10:35:16 +00:00
|
|
|
checkInputs = [ unittest2 mock ];
|
2018-10-26 16:51:37 +00:00
|
|
|
propagatedBuildInputs = [ pyasn1 ];
|
|
|
|
|
2019-01-04 13:22:03 +00:00
|
|
|
preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") ''
|
|
|
|
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
|
|
|
|
'';
|
|
|
|
|
2020-06-11 08:07:58 +00:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2018-10-26 16:51:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://stuvel.eu/rsa";
|
2018-10-26 16:51:37 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "A pure-Python RSA implementation";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|