python3.pkgs.scipy: Fix some issues in update script
This commit is contained in:
parent
84503a6c46
commit
854302c4e6
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue