From 94069e2d50bee6f7841fd57feb993305b3600fc4 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Mon, 15 Apr 2024 11:29:28 -0400 Subject: coder: use sri hash in updateScript --- pkgs/development/tools/coder/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit 1.4.1