about summary refs log tree commit diff
path: root/pkgs/development/tools/coder/update.sh
diff options
context:
space:
mode:
authorKyle Carberry <kyle@carberry.com>2024-04-15 11:29:28 -0400
committerKyle Carberry <kyle@carberry.com>2024-04-15 11:29:28 -0400
commit94069e2d50bee6f7841fd57feb993305b3600fc4 (patch)
tree967682ff93f55ba63c6b8454ce6cb8232b5b67d4 /pkgs/development/tools/coder/update.sh
parent104f0b61838c81911a34e7fcbb50221ea0d8ca65 (diff)
coder: use sri hash in updateScript
Diffstat (limited to 'pkgs/development/tools/coder/update.sh')
-rwxr-xr-xpkgs/development/tools/coder/update.sh3
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