diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cryptography/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/cryptography/default.nix | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cryptography/default.nix b/nixpkgs/pkgs/development/python-modules/cryptography/default.nix index 4acb8c6dcd19..4ae2e77de6ac 100644 --- a/nixpkgs/pkgs/development/python-modules/cryptography/default.nix +++ b/nixpkgs/pkgs/development/python-modules/cryptography/default.nix @@ -3,52 +3,56 @@ , buildPythonPackage , callPackage , cargo +, certifi , cffi +, cryptography-vectors ? (callPackage ./vectors.nix { }) , fetchPypi -, hypothesis -, iso8601 +, fetchpatch2 , isPyPy , libiconv , libxcrypt , openssl , pkg-config , pretend -, py -, pytest-subtests +, pytest-xdist , pytestCheckHook , pythonOlder -, pytz , rustc , rustPlatform , Security , setuptoolsRustBuildHook }: -let - cryptography-vectors = callPackage ./vectors.nix { }; -in buildPythonPackage rec { pname = "cryptography"; - version = "41.0.7"; # Also update the hash in vectors.nix + version = "42.0.2"; # Also update the hash in vectors.nix pyproject = true; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-E/k86b6oAWwlOzSvxr1qdZk+XEBnLtVAWpyDLw1KALw="; + hash = "sha256-4OxSujx/G32BPNUmSaWz7x/A1DMhncjJOCfFfqts+Ig="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; sourceRoot = "${pname}-${version}/${cargoRoot}"; name = "${pname}-${version}"; - hash = "sha256-VeZhKisCPDRvmSjGNwCgJJeVj65BZ0Ge+yvXbZw86Rw="; + hash = "sha256-jw/FC5rQO77h6omtBp0Nc2oitkVbNElbkBUduyprTIc="; }; + patches = [ + (fetchpatch2 { + # skip overflowing tests on 32 bit; https://github.com/pyca/cryptography/pull/10366 + url = "https://github.com/pyca/cryptography/commit/d741901dddd731895346636c0d3556c6fa51fbe6.patch"; + hash = "sha256-eC+MZg5O8Ia5CbjRE4y+JhaFs3Q5c62QtPHr3x9T+zw="; + }) + ]; + postPatch = '' substituteInPlace pyproject.toml \ - --replace "--benchmark-disable" "" + --replace-fail "--benchmark-disable" "" ''; cargoRoot = "src/rust"; @@ -77,14 +81,11 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + certifi cryptography-vectors - hypothesis - iso8601 pretend - py pytestCheckHook - pytest-subtests - pytz + pytest-xdist ]; pytestFlagsArray = [ |