From f7bfb80a24102831d4667094093ed9592f90f281 Mon Sep 17 00:00:00 2001 From: Stanisław Pitucha Date: Sat, 4 Nov 2023 23:53:03 +1100 Subject: reaper: add darwin platform --- pkgs/applications/audio/reaper/updater.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'pkgs/applications/audio/reaper/updater.sh') diff --git a/pkgs/applications/audio/reaper/updater.sh b/pkgs/applications/audio/reaper/updater.sh index 750bea346bbc3..31832f7173c66 100755 --- a/pkgs/applications/audio/reaper/updater.sh +++ b/pkgs/applications/audio/reaper/updater.sh @@ -5,7 +5,7 @@ set -euo pipefail reaper_ver=$(curl -Ls https://www.reaper.fm/download.php | grep -o 'Version [0-9]\.[0-9]*' | head -n1 | cut -d' ' -f2) -function set_hash_for_arch() { +function set_hash_for_linux() { local arch=$1 pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_linux_$arch.tar.xz) pkg_hash=$(nix hash to-sri "sha256:$pkg_hash") @@ -14,5 +14,15 @@ function set_hash_for_arch() { update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-linux } -set_hash_for_arch aarch64 -set_hash_for_arch x86_64 +function set_hash_for_darwin() { + local arch=$1 + pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_universal.dmg) + pkg_hash=$(nix hash to-sri "sha256:$pkg_hash") + # reset the version so the second architecture update doesn't get ignored + update-source-version reaper 0 "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" --system=$arch-darwin + update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-darwin +} + +set_hash_for_linux aarch64 +set_hash_for_linux x86_64 +set_hash_for_darwin aarch64 -- cgit 1.4.1