1 #!/usr/bin/env nix-shell
2 #!nix-shell -i bash -p curl common-updater-scripts
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
() {
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
() {
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