nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python2Packages.cryptography: pin to 2.9.2

authored by

Jonathan Ringer and committed by
Jon
22cc69ca 23d6cd32

+78 -1
+74
pkgs/development/python-modules/cryptography/2.9.nix
··· 1 + { stdenv 2 + , buildPythonPackage 3 + , fetchPypi 4 + , fetchpatch 5 + , isPy27 6 + , ipaddress 7 + , openssl 8 + , cryptography_vectors 9 + , darwin 10 + , packaging 11 + , six 12 + , pythonOlder 13 + , isPyPy 14 + , cffi 15 + , pytest 16 + , pretend 17 + , iso8601 18 + , pytz 19 + , hypothesis 20 + , enum34 21 + }: 22 + 23 + buildPythonPackage rec { 24 + pname = "cryptography"; 25 + version = "2.9.2"; # Also update the hash in vectors.nix 26 + 27 + src = fetchPypi { 28 + inherit pname version; 29 + sha256 = "0af25w5mkd6vwns3r6ai1w5ip9xp0ms9s261zzssbpadzdr05hx0"; 30 + }; 31 + 32 + outputs = [ "out" "dev" ]; 33 + 34 + buildInputs = [ openssl ] 35 + ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; 36 + propagatedBuildInputs = [ 37 + packaging 38 + six 39 + ] ++ stdenv.lib.optional (!isPyPy) cffi 40 + ++ stdenv.lib.optionals isPy27 [ ipaddress enum34 ]; 41 + 42 + checkInputs = [ 43 + cryptography_vectors 44 + hypothesis 45 + iso8601 46 + pretend 47 + pytest 48 + pytz 49 + ]; 50 + 51 + checkPhase = '' 52 + py.test --disable-pytest-warnings tests 53 + ''; 54 + 55 + # IOKit's dependencies are inconsistent between OSX versions, so this is the best we 56 + # can do until nix 1.11's release 57 + __impureHostDeps = [ "/usr/lib" ]; 58 + 59 + meta = with stdenv.lib; { 60 + description = "A package which provides cryptographic recipes and primitives"; 61 + longDescription = '' 62 + Cryptography includes both high level recipes and low level interfaces to 63 + common cryptographic algorithms such as symmetric ciphers, message 64 + digests, and key derivation functions. 65 + Our goal is for it to be your "cryptographic standard library". It 66 + supports Python 2.7, Python 3.5+, and PyPy 5.4+. 67 + ''; 68 + homepage = "https://github.com/pyca/cryptography"; 69 + changelog = "https://cryptography.io/en/latest/changelog/#v" 70 + + replaceStrings [ "." ] [ "-" ] version; 71 + license = with licenses; [ asl20 bsd3 psfl ]; 72 + maintainers = with maintainers; [ primeos ]; 73 + }; 74 + }
+4 -1
pkgs/top-level/python-packages.nix
··· 2464 2464 2465 2465 cryptacular = callPackage ../development/python-modules/cryptacular { }; 2466 2466 2467 - cryptography = callPackage ../development/python-modules/cryptography { }; 2467 + cryptography = if isPy27 then 2468 + callPackage ../development/python-modules/cryptography/2.9.nix { } 2469 + else 2470 + callPackage ../development/python-modules/cryptography { }; 2468 2471 2469 2472 cryptography_vectors = callPackage ../development/python-modules/cryptography/vectors.nix { }; 2470 2473