diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 2d92638af4f3..607e431b39c8 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -1,11 +1,11 @@ { lib , stdenv +, callPackage , buildPythonPackage , fetchPypi , rustPlatform , setuptools-rust , openssl -, cryptography_vectors , Security , packaging , six @@ -20,6 +20,9 @@ , hypothesis }: +let + cryptography-vectors = callPackage ./vectors.nix { }; +in buildPythonPackage rec { pname = "cryptography"; version = "36.0.2"; # Also update the hash in vectors.nix @@ -55,7 +58,7 @@ buildPythonPackage rec { ]; checkInputs = [ - cryptography_vectors + cryptography-vectors hypothesis iso8601 pretend diff --git a/pkgs/development/python-modules/cryptography/vectors.nix b/pkgs/development/python-modules/cryptography/vectors.nix index 5c7e54fc59fc..993720907265 100644 --- a/pkgs/development/python-modules/cryptography/vectors.nix +++ b/pkgs/development/python-modules/cryptography/vectors.nix @@ -1,12 +1,13 @@ { buildPythonPackage, fetchPypi, lib, cryptography }: buildPythonPackage rec { - pname = "cryptography_vectors"; - # The test vectors must have the same version as the cryptography package: + pname = "cryptography-vectors"; + # The test vectors must have the same version as the cryptography package inherit (cryptography) version; src = fetchPypi { - inherit pname version; + pname = "cryptography_vectors"; + inherit version; sha256 = "sha256-KnkkRJoDAl+vf4dUpvQgAAHKshBzSmzmrB9r2s06aOQ="; }; diff --git a/pkgs/development/python2-modules/cryptography/default.nix b/pkgs/development/python2-modules/cryptography/default.nix index 357bb35dacf7..0b4e2ae394cd 100644 --- a/pkgs/development/python2-modules/cryptography/default.nix +++ b/pkgs/development/python2-modules/cryptography/default.nix @@ -1,10 +1,11 @@ -{ lib, stdenv +{ lib +, stdenv +, callPackage , buildPythonPackage , fetchPypi , isPy27 , ipaddress , openssl -, cryptography_vectors , darwin , packaging , six @@ -18,6 +19,9 @@ , enum34 }: +let + cryptography-vectors = callPackage ./vectors.nix { }; +in buildPythonPackage rec { pname = "cryptography"; version = "3.3.2"; # Also update the hash in vectors-3.3.nix @@ -36,18 +40,19 @@ buildPythonPackage rec { ]; buildInputs = [ openssl ] - ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; + ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; propagatedBuildInputs = [ packaging six ] ++ lib.optionals (!isPyPy) [ cffi ] ++ lib.optionals isPy27 [ - ipaddress enum34 + ipaddress + enum34 ]; checkInputs = [ - cryptography_vectors + cryptography-vectors hypothesis iso8601 pretend diff --git a/pkgs/development/python2-modules/cryptography-vectors/default.nix b/pkgs/development/python2-modules/cryptography/vectors.nix similarity index 87% rename from pkgs/development/python2-modules/cryptography-vectors/default.nix rename to pkgs/development/python2-modules/cryptography/vectors.nix index f9b7c525237a..4d6214807e73 100644 --- a/pkgs/development/python2-modules/cryptography-vectors/default.nix +++ b/pkgs/development/python2-modules/cryptography/vectors.nix @@ -1,12 +1,13 @@ { buildPythonPackage, fetchPypi, lib, cryptography }: buildPythonPackage rec { - pname = "cryptography_vectors"; + pname = "cryptography-vectors"; # The test vectors must have the same version as the cryptography package: version = cryptography.version; src = fetchPypi { - inherit pname version; + pname = "cryptography_vectors"; + inherit version; sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc"; }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 05ebce6357c6..54130c5b3549 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -43,6 +43,7 @@ mapAliases ({ class-registry = phx-class-registry; # added 2021-10-05 ConfigArgParse = configargparse; # added 2021-03-18 cozy = throw "cozy was removed because it was not actually https://pypi.org/project/Cozy/."; # added 2022-01-14 + cryptography_vectors = "cryptography_vectors is no longer exposed in python*Packages because it is used for testing cryptography only."; # Added 2022-03-23 dateutil = python-dateutil; # added 2021-07-03 demjson = throw "demjson has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-01-18 detox = throw "detox is no longer maintained, and was broken since may 2019"; # added 2020-07-04 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index babaf1f3d35a..d5735ff24980 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1920,8 +1920,6 @@ in { inherit (pkgs.darwin.apple_sdk.frameworks) Security; }; - cryptography_vectors = callPackage ../development/python-modules/cryptography/vectors.nix { }; - crytic-compile = callPackage ../development/python-modules/crytic-compile { }; csrmesh = callPackage ../development/python-modules/csrmesh { }; diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index 224acec1625f..c915fc5c8c50 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -30,8 +30,6 @@ with self; with super; { cryptography = callPackage ../development/python2-modules/cryptography { }; - cryptography_vectors = callPackage ../development/python2-modules/cryptography-vectors { }; - decorator = callPackage ../development/python2-modules/decorator { }; enum = callPackage ../development/python2-modules/enum { };