From 85b84125e1f9ae5c4c56851fa38ebcac17025218 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 23 Mar 2022 06:16:16 +0100 Subject: [PATCH 1/6] python39Packages.cryptography: add SuperSandro2000 as maintainer --- pkgs/development/python-modules/cryptography/default.nix | 2 +- pkgs/development/python-modules/cryptography/vectors.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index b4a79137d59b..b63566d7dedc 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -92,6 +92,6 @@ buildPythonPackage rec { changelog = "https://cryptography.io/en/latest/changelog/#v" + replaceStrings [ "." ] [ "-" ] version; license = with licenses; [ asl20 bsd3 psfl ]; - maintainers = with maintainers; [ primeos ]; + maintainers = with maintainers; [ primeos SuperSandro2000 ]; }; } diff --git a/pkgs/development/python-modules/cryptography/vectors.nix b/pkgs/development/python-modules/cryptography/vectors.nix index 577c2c870910..194ad9885613 100644 --- a/pkgs/development/python-modules/cryptography/vectors.nix +++ b/pkgs/development/python-modules/cryptography/vectors.nix @@ -18,6 +18,6 @@ buildPythonPackage rec { 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 ]; + maintainers = with maintainers; [ primeos SuperSandro2000 ]; }; } From ece9e8200f3cb85921d8d63289389c0d7dd33ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 23 Mar 2022 06:31:52 +0100 Subject: [PATCH 2/6] python39Packages.cryptography: remove darwin from inputs --- pkgs/development/python-modules/cryptography/default.nix | 5 +++-- pkgs/top-level/python-packages.nix | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index b63566d7dedc..b15120937f7a 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -5,7 +5,7 @@ , setuptools-rust , openssl , cryptography_vectors -, darwin +, Security , packaging , six , isPyPy @@ -47,7 +47,8 @@ buildPythonPackage rec { ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]); buildInputs = [ openssl ] - ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security libiconv ]; + ++ lib.optionals stdenv.isDarwin [ Security libiconv ]; + propagatedBuildInputs = [ packaging six diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0f4a3a9fba58..64d5821793ca 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1917,6 +1917,7 @@ in { cryptography = callPackage ../development/python-modules/cryptography { inherit (pkgs.darwin) libiconv; + inherit (pkgs.darwin.apple_sdk.frameworks) Security; }; cryptography_vectors = callPackage ../development/python-modules/cryptography/vectors.nix { }; From de6171a4414d1103855a6b1bced6daca11429443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 23 Mar 2022 06:32:19 +0100 Subject: [PATCH 3/6] python39Packages.cryptography: switch to pytestCheckHook --- .../python-modules/cryptography/default.nix | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index b15120937f7a..197d66daa0ba 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -10,7 +10,7 @@ , six , isPyPy , cffi -, pytest +, pytestCheckHook , pytest-subtests , pretend , libiconv @@ -61,24 +61,20 @@ buildPythonPackage rec { hypothesis iso8601 pretend - pytest + pytestCheckHook pytest-subtests pytz ]; - pytestFlags = lib.concatStringsSep " " ([ + pytestFlagsArray = [ "--disable-pytest-warnings" - ] ++ - lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ - # aarch64-darwin forbids W+X memory, but this tests depends on it: - # * https://cffi.readthedocs.io/en/latest/using.html#callbacks - "--ignore=tests/hazmat/backends/test_openssl_memleak.py" - ] - ); + ]; - checkPhase = '' - py.test ${pytestFlags} tests - ''; + disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + # aarch64-darwin forbids W+X memory, but this tests depends on it: + # * https://cffi.readthedocs.io/en/latest/using.html#callbacks + "--ignore=tests/hazmat/backends/test_openssl_memleak.py" + ]; meta = with lib; { description = "A package which provides cryptographic recipes and primitives"; From 2c7290a1891be6c52b8a2c168b0ca185a2eab100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 23 Mar 2022 06:44:54 +0100 Subject: [PATCH 4/6] python39Packages.cryptography: remove depedencies which have no mentions in code --- pkgs/development/python-modules/cryptography/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 197d66daa0ba..543c7cb73426 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -49,10 +49,7 @@ buildPythonPackage rec { buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ]; - propagatedBuildInputs = [ - packaging - six - ] ++ lib.optionals (!isPyPy) [ + propagatedBuildInputs = lib.optionals (!isPyPy) [ cffi ]; From 37a6c262f318789a8803c11a60a835a4255720b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 23 Mar 2022 06:45:36 +0100 Subject: [PATCH 5/6] python39Packages.cryptography: format --- pkgs/development/python-modules/cryptography/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 543c7cb73426..1f2ce722d79a 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi , rustPlatform From 95d7a7bbf1dfb56b701c46d169866aab751d7116 Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 26 Mar 2022 14:55:58 +0100 Subject: [PATCH 6/6] pythonPackages.cryptography*: remove primeos from maintainers Based on his request --- pkgs/development/python-modules/cryptography/default.nix | 2 +- pkgs/development/python-modules/cryptography/vectors.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 1f2ce722d79a..54a1d1832304 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -87,6 +87,6 @@ buildPythonPackage rec { changelog = "https://cryptography.io/en/latest/changelog/#v" + replaceStrings [ "." ] [ "-" ] version; license = with licenses; [ asl20 bsd3 psfl ]; - maintainers = with maintainers; [ primeos SuperSandro2000 ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } diff --git a/pkgs/development/python-modules/cryptography/vectors.nix b/pkgs/development/python-modules/cryptography/vectors.nix index 194ad9885613..cb7162a88799 100644 --- a/pkgs/development/python-modules/cryptography/vectors.nix +++ b/pkgs/development/python-modules/cryptography/vectors.nix @@ -18,6 +18,6 @@ buildPythonPackage rec { 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 SuperSandro2000 ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; }