diff --git a/pkgs/development/python-modules/torchvision/binary-hashes.nix b/pkgs/development/python-modules/torchvision/binary-hashes.nix index 0afd0a2f3a3a..3b8fd7aaefa5 100644 --- a/pkgs/development/python-modules/torchvision/binary-hashes.nix +++ b/pkgs/development/python-modules/torchvision/binary-hashes.nix @@ -27,17 +27,17 @@ version : builtins.getAttr version { x86_64-linux-37 = { name = "torchvision-0.10.0-cp37-cp37m-linux_x86_64.whl"; url = "https://download.pytorch.org/whl/cu111/torchvision-0.10.0%2Bcu111-cp37-cp37m-linux_x86_64.whl"; - sha256 = "1kh6zrid4jv2qh1fpgnghsy2p0k5dc9pmk90484bdziskn313j68"; + hash = "sha256-yMgRhp06/rYIIiDNehNrZYIrvIbPvusCxGJL0mL+Bs4="; }; x86_64-linux-38 = { name = "torchvision-0.10.0-cp38-cp38-linux_x86_64.whl"; url = "https://download.pytorch.org/whl/cu111/torchvision-0.10.0%2Bcu111-cp38-cp38-linux_x86_64.whl"; - sha256 = "1xxlkdjj85sryvah381byfa1xgsl21vc307gjnbknxdchbxz0mm7"; + hash = "sha256-p1bw+4KsdTuXle+AwXYQVL8elPMroAHV9lkXJGWbtPc="; }; x86_64-linux-39 = { name = "torchvision-0.10.0-cp39-cp39-linux_x86_64.whl"; url = "https://download.pytorch.org/whl/cu111/torchvision-0.10.0%2Bcu111-cp39-cp39-linux_x86_64.whl"; - sha256 = "18gcf9nj5cfvvm7qqhkiq4y5sgzrwfsdhqxcwrqx4mg1fjff3rq0"; + hash = "sha256-AOfhnHThVdJx5qxj2LTj+T9dPMFxQoxP3duxIm1y7KE="; }; }; } diff --git a/pkgs/development/python-modules/torchvision/prefetch.sh b/pkgs/development/python-modules/torchvision/prefetch.sh index 5cb754a7bd6e..57d35e591154 100755 --- a/pkgs/development/python-modules/torchvision/prefetch.sh +++ b/pkgs/development/python-modules/torchvision/prefetch.sh @@ -20,12 +20,12 @@ for url_and_key in "${url_and_key_list[@]}"; do name=$(echo "$url_and_key" | cut -d' ' -f3) echo "prefetching ${url}..." - hash=$(nix-prefetch-url "$url" --name "$name") + hash=$(nix hash to-base64 --type sha256 `nix-prefetch-url "$url" --name "$name"`) echo " $key = {" >> $hashfile echo " name = \"$name\";" >> $hashfile echo " url = \"$url\";" >> $hashfile - echo " sha256 = \"$hash\";" >> $hashfile + echo " hash = \"sha256-$hash\";" >> $hashfile echo " };" >> $hashfile echo