anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / audio / reaper / updater.sh
blobef070c38aa229fdb40e6a979340300cd434cbf7d
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl common-updater-scripts
4 set -euo pipefail
6 reaper_ver=$(curl -Ls https://www.reaper.fm/download.php | grep -o 'Version [0-9]\.[0-9]*' | head -n1 | cut -d' ' -f2)
8 function set_hash_for_linux() {
9 local arch=$1
10 pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_linux_$arch.tar.xz)
11 pkg_hash=$(nix hash to-sri "sha256:$pkg_hash")
12 update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-linux --ignore-same-version
15 function set_hash_for_darwin() {
16 local arch=$1
17 pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_universal.dmg)
18 pkg_hash=$(nix hash to-sri "sha256:$pkg_hash")
19 update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-darwin --ignore-same-version
22 set_hash_for_linux aarch64
23 set_hash_for_linux x86_64
24 set_hash_for_darwin aarch64