diff options
Diffstat (limited to 'pkgs/applications/audio/renoise/default.nix')
-rw-r--r-- | pkgs/applications/audio/renoise/default.nix | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/pkgs/applications/audio/renoise/default.nix b/pkgs/applications/audio/renoise/default.nix index a56d43876fb04..7e178728c2dd5 100644 --- a/pkgs/applications/audio/renoise/default.nix +++ b/pkgs/applications/audio/renoise/default.nix @@ -1,5 +1,6 @@ { lib , stdenv +, writeScript , alsa-lib , fetchurl , libjack2 @@ -23,17 +24,17 @@ let platforms = { x86_64-linux = { archSuffix = "x86_64"; - hash = "sha256-Etz6NaeLMysSkcQGC3g+IqUy9QrONCrbkyej63uLflo="; + hash = "sha256-b+YXBVnxu54HfC/tWapcs/ZYzwBOJswYbEbEU3SVNss="; }; aarch64-linux = { archSuffix = "arm64"; - hash = "sha256-PVpgxhJU8RY6QepydqImQnisWBjbrsuW4j49Xot3C6Y="; + hash = "sha256-l54FAtT+Rj4Mv3GuOF0/9WuKdJowgbZDZYo7VCh6Flg="; }; }; in stdenv.mkDerivation rec { pname = "renoise"; - version = "3.4.3"; + version = "3.4.4"; src = if releasePath != null then releasePath @@ -42,8 +43,10 @@ in stdenv.mkDerivation rec { platform = platforms.${stdenv.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); urlVersion = lib.replaceStrings [ "." ] [ "_" ] version; in fetchurl { - url = - "https://files.renoise.com/demo/Renoise_${urlVersion}_Demo_Linux_${platform.archSuffix}.tar.gz"; + urls = [ + "https://files.renoise.com/demo/Renoise_${urlVersion}_Demo_Linux_${platform.archSuffix}.tar.gz" + "https://files.renoise.com/demo/archive/Renoise_${urlVersion}_Demo_Linux_${platform.archSuffix}.tar.gz" + ]; hash = platform.hash; }; @@ -103,6 +106,27 @@ in stdenv.mkDerivation rec { --replace Exec=renoise Exec=$out/bin/renoise ''; + passthru.updateScript = writeScript "update-renoise" '' + #!/usr/bin/env nix-shell + #!nix-shell -I nixpkgs=./. -i bash -p curl htmlq common-updater-scripts + set -euo pipefail + + new_version="$( + curl 'https://files.renoise.com/demo/' \ + | htmlq a --text \ + | grep -E '^Renoise_([0-9]+_?)+_Demo_Linux_x86_64\.tar\.gz$' \ + | grep -Eo '[0-9]+(_[0-9]+)*' \ + | head -n1 \ + | tr _ . + )" + hash_x86_64="$(nix-prefetch-url "https://files.renoise.com/demo/Renoise_$(echo "$new_version" | tr . _)_Demo_Linux_x86_64.tar.gz")" + hash_arm64="$( nix-prefetch-url "https://files.renoise.com/demo/Renoise_$(echo "$new_version" | tr . _)_Demo_Linux_arm64.tar.gz")" + sri_x86_64="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$hash_x86_64")" + sri_arm64="$( nix --extra-experimental-features nix-command hash to-sri --type sha256 "$hash_arm64")" + update-source-version renoise "$new_version" "$sri_x86_64" --system="x86_64-linux" --ignore-same-version + update-source-version renoise "$new_version" "$sri_arm64" --system="aarch64-linux" --ignore-same-version + ''; + meta = { description = "Modern tracker-based DAW"; homepage = "https://www.renoise.com/"; |