aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/cryptography
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cryptography')
-rw-r--r--nixpkgs/pkgs/development/python-modules/cryptography/2.9.nix74
-rw-r--r--nixpkgs/pkgs/development/python-modules/cryptography/default.nix4
-rw-r--r--nixpkgs/pkgs/development/python-modules/cryptography/vectors-2.9.nix23
-rw-r--r--nixpkgs/pkgs/development/python-modules/cryptography/vectors.nix2
4 files changed, 100 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cryptography/2.9.nix b/nixpkgs/pkgs/development/python-modules/cryptography/2.9.nix
new file mode 100644
index 00000000000..6a6187e5693
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/cryptography/2.9.nix
@@ -0,0 +1,74 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, fetchpatch
+, isPy27
+, ipaddress
+, openssl
+, cryptography_vectors
+, darwin
+, packaging
+, six
+, pythonOlder
+, isPyPy
+, cffi
+, pytest
+, pretend
+, iso8601
+, pytz
+, hypothesis
+, enum34
+}:
+
+buildPythonPackage rec {
+ pname = "cryptography";
+ version = "2.9.2"; # Also update the hash in vectors.nix
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0af25w5mkd6vwns3r6ai1w5ip9xp0ms9s261zzssbpadzdr05hx0";
+ };
+
+ outputs = [ "out" "dev" ];
+
+ buildInputs = [ openssl ]
+ ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
+ propagatedBuildInputs = [
+ packaging
+ six
+ ] ++ stdenv.lib.optional (!isPyPy) cffi
+ ++ stdenv.lib.optionals isPy27 [ ipaddress enum34 ];
+
+ checkInputs = [
+ cryptography_vectors
+ hypothesis
+ iso8601
+ pretend
+ pytest
+ pytz
+ ];
+
+ checkPhase = ''
+ py.test --disable-pytest-warnings tests
+ '';
+
+ # IOKit's dependencies are inconsistent between OSX versions, so this is the best we
+ # can do until nix 1.11's release
+ __impureHostDeps = [ "/usr/lib" ];
+
+ meta = with stdenv.lib; {
+ description = "A package which provides cryptographic recipes and primitives";
+ longDescription = ''
+ Cryptography includes both high level recipes and low level interfaces to
+ common cryptographic algorithms such as symmetric ciphers, message
+ digests, and key derivation functions.
+ Our goal is for it to be your "cryptographic standard library". It
+ supports Python 2.7, Python 3.5+, and PyPy 5.4+.
+ '';
+ homepage = "https://github.com/pyca/cryptography";
+ changelog = "https://cryptography.io/en/latest/changelog/#v"
+ + replaceStrings [ "." ] [ "-" ] version;
+ license = with licenses; [ asl20 bsd3 psfl ];
+ maintainers = with maintainers; [ primeos ];
+ };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/cryptography/default.nix b/nixpkgs/pkgs/development/python-modules/cryptography/default.nix
index 7219f48e6f9..d122c42e846 100644
--- a/nixpkgs/pkgs/development/python-modules/cryptography/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/cryptography/default.nix
@@ -22,11 +22,11 @@
buildPythonPackage rec {
pname = "cryptography";
- version = "2.9.2"; # Also update the hash in vectors.nix
+ version = "3.1"; # Also update the hash in vectors.nix
src = fetchPypi {
inherit pname version;
- sha256 = "a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229";
+ sha256 = "021yccbqr446zh1c9l8yj79h9bgbd1cwv0ppj168w9y67i3rlh16";
};
outputs = [ "out" "dev" ];
diff --git a/nixpkgs/pkgs/development/python-modules/cryptography/vectors-2.9.nix b/nixpkgs/pkgs/development/python-modules/cryptography/vectors-2.9.nix
new file mode 100644
index 00000000000..096eab77bec
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/cryptography/vectors-2.9.nix
@@ -0,0 +1,23 @@
+{ buildPythonPackage, fetchPypi, lib, cryptography }:
+
+buildPythonPackage rec {
+ pname = "cryptography_vectors";
+ # The test vectors must have the same version as the cryptography package:
+ version = cryptography.version;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "1d4iykcv7cn9j399hczlxm5pzxmqy6d80h3j16dkjwlmv3293b4r";
+ };
+
+ # No tests included
+ doCheck = false;
+
+ meta = with lib; {
+ description = "Test vectors for the cryptography package";
+ homepage = "https://cryptography.io/en/latest/development/test-vectors/";
+ # Source: https://github.com/pyca/cryptography/tree/master/vectors;
+ license = with licenses; [ asl20 bsd3 ];
+ maintainers = with maintainers; [ primeos ];
+ };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/cryptography/vectors.nix b/nixpkgs/pkgs/development/python-modules/cryptography/vectors.nix
index 096eab77bec..99f3b6f8974 100644
--- a/nixpkgs/pkgs/development/python-modules/cryptography/vectors.nix
+++ b/nixpkgs/pkgs/development/python-modules/cryptography/vectors.nix
@@ -7,7 +7,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
- sha256 = "1d4iykcv7cn9j399hczlxm5pzxmqy6d80h3j16dkjwlmv3293b4r";
+ sha256 = "10hixzqf2ppw8j61f6p04rgnq8ra6pjml68330s5af8df8xbqq16";
};
# No tests included