From fe1603eb33d854e51f0470ebf9add787cc753f49 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 2 Aug 2024 13:12:04 +0200 Subject: [PATCH] redux: add update script --- pkgs/applications/audio/redux/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/applications/audio/redux/default.nix b/pkgs/applications/audio/redux/default.nix index 7b64df369bd0..15daf2824257 100644 --- a/pkgs/applications/audio/redux/default.nix +++ b/pkgs/applications/audio/redux/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, writeScript , libX11 , libXext , alsa-lib @@ -48,6 +49,23 @@ stdenv.mkDerivation rec { runHook postInstall ''; + + passthru.updateScript = writeScript "update-redux" '' + #!/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_Redux_([0-9]+_?)+_Demo_Linux_x86_64\.tar\.gz$' \ + | grep -Eo '[0-9]+(_[0-9]+)*' \ + | head -n1 \ + | tr _ . + )" + update-source-version redux "$new_version" --system="x86_64-linux" + ''; + meta = with lib; { description = "Sample-based instrument, with a powerful phrase sequencer"; homepage = "https://www.renoise.com/products/redux";