summary refs log tree commit diff
path: root/pkgs/development/tools/electron/print-hashes.sh
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-02-05 19:27:16 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2020-02-05 19:41:25 +0100
commit419bc0a4cdc0f577062f6c439809f4bf6e3b0c63 (patch)
tree0f39c63fcddea75c562825d53a3f36bbba8b7930 /pkgs/development/tools/electron/print-hashes.sh
parent873e6a4e65451be32e8dcd6151e1f26262ef35f2 (diff)
downloadnixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.tar
nixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.tar.gz
nixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.tar.bz2
nixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.tar.lz
nixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.tar.xz
nixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.tar.zst
nixpkgs-419bc0a4cdc0f577062f6c439809f4bf6e3b0c63.zip
Revert "Revert "Merge master into staging-next""
In 87a19e9048773d5a363679617406ad148d36c3b8 I merged staging-next into master using the GitHub gui as intended.
In ac241fb7a570d6cf81d229ad22a8889602639160 I merged master into staging-next for the next staging cycle, however, I accidentally pushed it to master.
Thinking this may cause trouble, I reverted it in 0be87c79797a5fa384fbc356c74ed54f9f7829ea. This was however wrong, as it "removed" master.

This reverts commit 0be87c79797a5fa384fbc356c74ed54f9f7829ea.
Diffstat (limited to 'pkgs/development/tools/electron/print-hashes.sh')
-rwxr-xr-xpkgs/development/tools/electron/print-hashes.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/pkgs/development/tools/electron/print-hashes.sh b/pkgs/development/tools/electron/print-hashes.sh
index 203e5a4dfec..45656a8f7b2 100755
--- a/pkgs/development/tools/electron/print-hashes.sh
+++ b/pkgs/development/tools/electron/print-hashes.sh
@@ -19,11 +19,15 @@ SYSTEMS=(
     [x86_64-darwin]=darwin-x64
 )
 
+hashfile="$(nix-prefetch-url --print-path "https://github.com/electron/electron/releases/download/v${VERSION}/SHASUMS256.txt" 2>/dev/null | tail -n1)"
+
+echo "Entry similar to the following goes in default.nix:"
+echo
+echo "  electron_${VERSION%%.*} = mkElectron \"${VERSION}\" {"
+
 for S in "${!SYSTEMS[@]}"; do
-  HASHES["$S"]=$(nix-prefetch-url "https://github.com/electron/electron/releases/download/v${VERSION}/electron-v${VERSION}-${SYSTEMS[$S]}.zip")
+  hash="$(grep " *electron-v${VERSION}-${SYSTEMS[$S]}.zip$" "$hashfile"|cut -f1 -d' ')"
+  echo "    $S = \"$hash\";"
 done
 
-for S in "${!HASHES[@]}"; do
-    echo "$S"
-    echo "sha256 = \"${HASHES[$S]}\";"
-done
+echo "  };"