about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorAstavie <astavie@pm.me>2024-04-30 12:38:45 +0200
committerAstavie <astavie@pm.me>2024-05-02 10:51:18 +0200
commita6b8550e3f6055df91067e8915c997cdeefe980a (patch)
treeb23b2e5457817665669713d684ae47fc8f0e63c6 /pkgs/applications
parent5e63aa824f7b6c5f563d290ab69dab72cfdac25c (diff)
zrythm: add passthru.updateScript
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/zrythm/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/applications/audio/zrythm/default.nix b/pkgs/applications/audio/zrythm/default.nix
index a49764de78512..8ec6ba1a040aa 100644
--- a/pkgs/applications/audio/zrythm/default.nix
+++ b/pkgs/applications/audio/zrythm/default.nix
@@ -54,6 +54,7 @@
 , texi2html
 , vamp-plugin-sdk
 , wrapGAppsHook4
+, writeScript
 , xdg-utils
 , xxHash
 , yyjson
@@ -85,6 +86,14 @@ stdenv.mkDerivation (finalAttrs: {
     sha256 = "sha256-Ljbw7bjGI6js4OP9KEXCkhC9AMbInSz0nn+pROm4vXw=";
   };
 
+  passthru.updateScript = writeScript "update-zrythm" ''
+    #!/usr/bin/env nix-shell
+    #!nix-shell -i bash -p curl common-updater-scripts
+
+    version="$(curl -s https://www.zrythm.org/releases/ | grep -o -m 1 'href="zrythm-[^"]*\.tar\.xz"' | head -1 | sed 's/href="zrythm-\(.*\)\.tar\.xz"/\1/')"
+    update-source-version zrythm "$version"
+  '';
+
   nativeBuildInputs = [
     chromaprint
     cmake