aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/rsa/4_0.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/rsa/4_0.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/rsa/4_0.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/rsa/4_0.nix b/nixpkgs/pkgs/development/python-modules/rsa/4_0.nix
new file mode 100644
index 00000000000..459ca043796
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/rsa/4_0.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, unittest2
+, pyasn1
+, mock
+, isPy3k
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+ pname = "rsa";
+ version = "4.0";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487";
+ };
+
+ checkInputs = [ unittest2 mock ];
+ propagatedBuildInputs = [ pyasn1 ];
+
+ preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") ''
+ substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "https://stuvel.eu/rsa";
+ license = licenses.asl20;
+ description = "A pure-Python RSA implementation";
+ };
+
+}