diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index 578d13acf43d..e7c07daa5878 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -13,7 +13,6 @@ , cffi , pkg-config , pytestCheckHook -, pytest-benchmark , pytest-subtests , pythonOlder , pretend @@ -45,6 +44,11 @@ buildPythonPackage rec { hash = "sha256-gFfDTc2QWBWHBCycVH1dYlCsWQMVcRZfOBIau+njtDU="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "--benchmark-disable" "" + ''; + cargoRoot = "src/rust"; nativeBuildInputs = lib.optionals (!isPyPy) [ @@ -70,7 +74,6 @@ buildPythonPackage rec { pretend py pytestCheckHook - pytest-benchmark pytest-subtests pytz ]; @@ -79,7 +82,10 @@ buildPythonPackage rec { "--disable-pytest-warnings" ]; - disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + disabledTestPaths = [ + # save compute time by not running benchmarks + "tests/bench" + ] ++ 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 "tests/hazmat/backends/test_openssl_memleak.py"