Change nix-hash to nix-to-sri

This commit is contained in:
Junji Hashimoto 2021-09-14 04:33:32 +00:00
parent 129020eda6
commit 34e940938d

View file

@ -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 hash to-base64 --type sha256 `nix-prefetch-url "$url" --name "$name"`)
hash=$(nix hash to-sri --type sha256 `nix-prefetch-url "$url" --name "$name"`)
echo " $key = {" >> $hashfile
echo " name = \"$name\";" >> $hashfile
echo " url = \"$url\";" >> $hashfile
echo " hash = \"sha256-$hash\";" >> $hashfile
echo " hash = \"$hash\";" >> $hashfile
echo " };" >> $hashfile
echo