diff options
Diffstat (limited to 'pkgs/development/python-modules/eth-hash/default.nix')
-rw-r--r-- | pkgs/development/python-modules/eth-hash/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/eth-hash/default.nix b/pkgs/development/python-modules/eth-hash/default.nix index f1b22597f2c3..aabd3b38f429 100644 --- a/pkgs/development/python-modules/eth-hash/default.nix +++ b/pkgs/development/python-modules/eth-hash/default.nix @@ -1,6 +1,7 @@ { lib , fetchFromGitHub , buildPythonPackage +, pythonAtLeast , pythonOlder , pytest , safe-pysha3 @@ -22,10 +23,14 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest ] ++ passthru.optional-dependencies.pycryptodome - ++ passthru.optional-dependencies.pysha3; + # eth-hash can use either safe-pysha3 or pycryptodome; + # safe-pysha3 requires Python 3.9+ while pycryptodome does not. + # https://github.com/ethereum/eth-hash/issues/46#issuecomment-1314029211 + ++ lib.optional (pythonAtLeast "3.9") passthru.optional-dependencies.pysha3; checkPhase = '' pytest tests/backends/pycryptodome/ + '' + lib.optionalString (pythonAtLeast "3.9") '' pytest tests/backends/pysha3/ ''; |