From 11c934a00eaae7947e920b6e389c6ed8aa752c9e Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Sun, 21 May 2023 16:55:55 +0000 Subject: [PATCH 1/2] python38Packages.eth-hash: fix the build by not depending on safe-pysha3 eth-hash can work with pycryptodome, which builds on Python 3.8. This fixes the build of grab-site, which is still stuck on Python 3.8, and depends on eth-hash through its authobahn dependency. --- pkgs/development/python-modules/eth-hash/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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/ ''; From fcfb25c7bacad75d1a394e825b120e0114bb8925 Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Tue, 11 Apr 2023 05:40:36 +0000 Subject: [PATCH 2/2] python3Packages.matplotlib: fix the minimum Python version https://matplotlib.org/stable/devel/min_dep_policy.html says that Matplotlib 3.7 does support Python 3.8. --- pkgs/development/python-modules/matplotlib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 1fd70739b4c8..4df554f89160 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -80,7 +80,7 @@ buildPythonPackage rec { pname = "matplotlib"; format = "pyproject"; - disabled = pythonOlder "3.9"; + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version;