Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions pkgs/development/python-modules/scipy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ 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.
version = "1.11.1";
srcHash = "sha256-bgnYXe3EhzL7+Gfriz1cXCl2eYQJ8zF+rcIwHyZR8bQ=";
# The update script uses sed regexes to replace them with the updated hashes.
version = "1.11.2";
srcHash = "sha256-7FE740/yKUXtujVX60fQB/xvCZFfV69FRihvSi6+UWo=";
datasetsHashes = {
ascent = "1qjp35ncrniq9rhzb14icwwykqg2208hcssznn3hz27w39615kh3";
ecg = "1bwbjp43b7znnwha5hv6wiz3g0bhwrpqpi75s12zidxrbwvd62pj";
Expand Down Expand Up @@ -80,6 +78,7 @@ in buildPythonPackage {
})
];

# Relax deps a bit
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'numpy==' 'numpy>=' \
Expand Down Expand Up @@ -117,9 +116,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
Expand Down
8 changes: 5 additions & 3 deletions pkgs/development/python-modules/scipy/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down