From b6c1a6563fadacbfa96233f2551dbe1adee2e2b9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 18 Aug 2023 12:06:36 +0300 Subject: [PATCH 1/3] python3.pkgs.scipy: Don't relax deps twice --- pkgs/development/python-modules/scipy/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 6695910ba7a71..40448fc878970 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -80,6 +80,7 @@ in buildPythonPackage { }) ]; + # Relax deps a bit postPatch = '' substituteInPlace pyproject.toml \ --replace 'numpy==' 'numpy>=' \ @@ -117,9 +118,6 @@ in buildPythonPackage { doCheck = !(stdenv.isx86_64 && stdenv.isDarwin); preConfigure = '' - # Relax deps a bit - substituteInPlace pyproject.toml \ - --replace 'numpy==' 'numpy>=' # Helps parallelization a bit export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES # We download manually the datasets and this variable tells the pooch From b975189b32abec6e26a70f18bf2d9a0788b5a66e Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 18 Aug 2023 12:16:55 +0300 Subject: [PATCH 2/3] python3.pkgs.scipy: Fix some issues in update script --- pkgs/development/python-modules/scipy/default.nix | 4 +--- pkgs/development/python-modules/scipy/update.sh | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 40448fc878970..ad5b032d0a438 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -33,9 +33,7 @@ let # # nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy # - # Even if you do update these hashes manually, don't change their base - # (base16 or base64), because the update script uses sed regexes to replace - # them with the updated hashes. + # The update script uses sed regexes to replace them with the updated hashes. version = "1.11.1"; srcHash = "sha256-bgnYXe3EhzL7+Gfriz1cXCl2eYQJ8zF+rcIwHyZR8bQ="; datasetsHashes = { diff --git a/pkgs/development/python-modules/scipy/update.sh b/pkgs/development/python-modules/scipy/update.sh index b0d6e2da4f41d..c6b3dca491864 100755 --- a/pkgs/development/python-modules/scipy/update.sh +++ b/pkgs/development/python-modules/scipy/update.sh @@ -16,10 +16,12 @@ if grep -q 'version = "'$version $fname; then echo "Current version $version is the latest available, will update only datasets' hashes (don't take long)" else echoerr got version $version - sed -i -E 's/(version = ).*=/\1'$version'/g' $fname + sed -i -E 's/(version = ").*(";)/\1'$version'\2/g' $fname + # Verify the sed command above did not fail + grep -q $version $fname # Update srcHash - srcHash='"sha256-'$(nix-prefetch-github scipy scipy --rev v${version} --fetch-submodules | jq --raw-output .sha256)'"' - sed -i 's/srcHash = .*=";/srcHash = '$srcHash';/g' $fname + srcHash="$(nix-prefetch-github scipy scipy --rev v${version} --fetch-submodules | jq --raw-output .hash)" + sed -i -E 's#(srcHash = ").*(";)#\1'$srcHash'\2#g' $fname fi for d in $datasets; do From 4c7e3da9aabce8f59fcd6215c185747c5a2907fe Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Fri, 18 Aug 2023 12:30:59 +0300 Subject: [PATCH 3/3] python3.pkgs.scipy: 1.11.1 -> 1.11.2 --- pkgs/development/python-modules/scipy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index ad5b032d0a438..5f9e5017739d2 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -34,8 +34,8 @@ let # nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy # # The update script uses sed regexes to replace them with the updated hashes. - version = "1.11.1"; - srcHash = "sha256-bgnYXe3EhzL7+Gfriz1cXCl2eYQJ8zF+rcIwHyZR8bQ="; + version = "1.11.2"; + srcHash = "sha256-7FE740/yKUXtujVX60fQB/xvCZFfV69FRihvSi6+UWo="; datasetsHashes = { ascent = "1qjp35ncrniq9rhzb14icwwykqg2208hcssznn3hz27w39615kh3"; ecg = "1bwbjp43b7znnwha5hv6wiz3g0bhwrpqpi75s12zidxrbwvd62pj";