diff options
author | Kyle Carberry <kyle@carberry.com> | 2024-04-15 11:29:28 -0400 |
---|---|---|
committer | Kyle Carberry <kyle@carberry.com> | 2024-04-15 11:29:28 -0400 |
commit | 94069e2d50bee6f7841fd57feb993305b3600fc4 (patch) | |
tree | 967682ff93f55ba63c6b8454ce6cb8232b5b67d4 /pkgs/development/tools/coder/update.sh | |
parent | 104f0b61838c81911a34e7fcbb50221ea0d8ca65 (diff) |
coder: use sri hash in updateScript
Diffstat (limited to 'pkgs/development/tools/coder/update.sh')
-rwxr-xr-x | pkgs/development/tools/coder/update.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/tools/coder/update.sh b/pkgs/development/tools/coder/update.sh index a7ce3da93256a..cf6febe7d8230 100755 --- a/pkgs/development/tools/coder/update.sh +++ b/pkgs/development/tools/coder/update.sh @@ -25,7 +25,8 @@ for ARCH in "${!ARCHS[@]}"; do # Fetch the new hash using nix-prefetch-url NEW_HASH=$(nix-prefetch-url --type sha256 $URL) + SRI_HASH=$(nix hash to-sri --type sha256 $NEW_HASH) # Update the Nix file with the new hash - sed -i "s|${ARCH} = \"sha256-.*\";|${ARCH} = \"sha256-${NEW_HASH}\";|" ./default.nix + sed -i "s|${ARCH} = \"sha256-.*\";|${ARCH} = \"${SRI_HASH}\";|" ./default.nix done |