summary refs log tree commit diff
path: root/pkgs/development/python-modules/cryptography
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2019-03-02 10:31:30 +0100
committerMichael Weiss <dev.primeos@gmail.com>2019-04-22 12:29:34 +0200
commit22714ad6d05756a33219ae7a81fd8629001db3f3 (patch)
tree90a8cf1dee81864f10e09edc06bd48c0d79139b5 /pkgs/development/python-modules/cryptography
parentcd8697da9fe25604a5379274f347ce37526670c5 (diff)
downloadnixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.tar
nixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.tar.gz
nixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.tar.bz2
nixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.tar.lz
nixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.tar.xz
nixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.tar.zst
nixpkgs-22714ad6d05756a33219ae7a81fd8629001db3f3.zip
python37Packages.cryptography: Improve the test vectors integration
This should make the management easier. The package cryptography_vectors
contains the test vectors for cryptography and should therefore always
have the same version. By linking the version of cryptography_vectors to
cryptography, this simply cannot be forgotten.
Diffstat (limited to 'pkgs/development/python-modules/cryptography')
-rw-r--r--pkgs/development/python-modules/cryptography/default.nix3
-rw-r--r--pkgs/development/python-modules/cryptography/vectors.nix23
2 files changed, 24 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix
index dfbb14eb7e6..5e42774fdd9 100644
--- a/pkgs/development/python-modules/cryptography/default.nix
+++ b/pkgs/development/python-modules/cryptography/default.nix
@@ -20,9 +20,8 @@
 }:
 
 buildPythonPackage rec {
-  # also bump cryptography_vectors
   pname = "cryptography";
-  version = "2.5";
+  version = "2.5"; # Also update the hash in vectors.nix
 
   src = fetchPypi {
     inherit pname version;
diff --git a/pkgs/development/python-modules/cryptography/vectors.nix b/pkgs/development/python-modules/cryptography/vectors.nix
new file mode 100644
index 00000000000..86b16586f68
--- /dev/null
+++ b/pkgs/development/python-modules/cryptography/vectors.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 = "15qfl3pnw2f11r0z0zhwl56f6pb60ysav8fxmpnz5p80cfwljdik";
+  };
+
+  # 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 ];
+  };
+}