nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python3.pkgs.scipy: Fix some issues in update script

authored by

Doron Behar and committed by
Frederik Rietdijk
854302c4 84503a6c

+6 -6
+1 -3
pkgs/development/python-modules/scipy/default.nix
··· 33 33 # 34 34 # nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy 35 35 # 36 - # Even if you do update these hashes manually, don't change their base 37 - # (base16 or base64), because the update script uses sed regexes to replace 38 - # them with the updated hashes. 36 + # The update script uses sed regexes to replace them with the updated hashes. 39 37 version = "1.11.1"; 40 38 srcHash = "sha256-bgnYXe3EhzL7+Gfriz1cXCl2eYQJ8zF+rcIwHyZR8bQ="; 41 39 datasetsHashes = {
+5 -3
pkgs/development/python-modules/scipy/update.sh
··· 16 16 echo "Current version $version is the latest available, will update only datasets' hashes (don't take long)" 17 17 else 18 18 echoerr got version $version 19 - sed -i -E 's/(version = ).*=/\1'$version'/g' $fname 19 + sed -i -E 's/(version = ").*(";)/\1'$version'\2/g' $fname 20 + # Verify the sed command above did not fail 21 + grep -q $version $fname 20 22 # Update srcHash 21 - srcHash='"sha256-'$(nix-prefetch-github scipy scipy --rev v${version} --fetch-submodules | jq --raw-output .sha256)'"' 22 - sed -i 's/srcHash = .*=";/srcHash = '$srcHash';/g' $fname 23 + srcHash="$(nix-prefetch-github scipy scipy --rev v${version} --fetch-submodules | jq --raw-output .hash)" 24 + sed -i -E 's#(srcHash = ").*(";)#\1'$srcHash'\2#g' $fname 23 25 fi 24 26 25 27 for d in $datasets; do