mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
8e8285d9ca
* print-hashes.nix uses upstream-provided SHA256SUMS file * electron_4: 4.2.8 -> 4.2.12 * electron_5: 5.0.8 -> 5.0.13 * electron_6: 6.0.1 -> 6.1.7 * electron_7:: init at 7.1.10 FWIW: electron_4 previously did not include at-spi2-core, only at-spi2-atk. Both are now included, matching other versions for a slightly simpler expression.
34 lines
757 B
Bash
Executable file
34 lines
757 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eu -o pipefail
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "$0: version" >&2
|
|
exit 1
|
|
fi
|
|
|
|
|
|
VERSION=$1
|
|
|
|
declare -A SYSTEMS HASHES
|
|
SYSTEMS=(
|
|
[i686-linux]=linux-ia32
|
|
[x86_64-linux]=linux-x64
|
|
[armv7l-linux]=linux-armv7l
|
|
[aarch64-linux]=linux-arm64
|
|
[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
|
|
hash="$(grep " *electron-v${VERSION}-${SYSTEMS[$S]}.zip$" "$hashfile"|cut -f1 -d' ')"
|
|
echo " $S = \"$hash\";"
|
|
done
|
|
|
|
echo " };"
|