about summary refs log tree commit diff
path: root/pkgs/applications/networking/remote
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2021-02-06 15:27:24 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2021-02-06 15:27:24 -0300
commit83e1c6ccc2711719fd756660d9c44fa09c5bf744 (patch)
treee1feca4ecb4f693d78206467d68d2caed00ba609 /pkgs/applications/networking/remote
parente924a8823325472a42c06bb519cc59d4c8bda614 (diff)
anydesk: Add auto-update support
This allow auto-update of the package and reduce maintenance burden.

Refs: #80979
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'pkgs/applications/networking/remote')
-rw-r--r--pkgs/applications/networking/remote/anydesk/default.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/pkgs/applications/networking/remote/anydesk/default.nix b/pkgs/applications/networking/remote/anydesk/default.nix
index c742d076f9da6..f88a2e3d8e882 100644
--- a/pkgs/applications/networking/remote/anydesk/default.nix
+++ b/pkgs/applications/networking/remote/anydesk/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem
+{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, genericUpdater, writeShellScript
 , atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU, libGL, pango, xorg
 , lsb-release, freetype, fontconfig, polkit, polkit_gnome
 , pulseaudio }:
@@ -28,6 +28,19 @@ in stdenv.mkDerivation rec {
     sha256 = "1qbq6r0yanjappsi8yglw8r54bwf32bjb2i63awmr6pk5kmhhy3r";
   };
 
+  passthru = {
+    updateScript = genericUpdater {
+      inherit pname version;
+      versionLister = writeShellScript "anydesk-versionLister" ''
+        echo "# Versions for $1:" >> "$2"
+        curl -s https://anydesk.com/en/downloads/linux \
+          | grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
+          | uniq \
+          | sed 's,.*/anydesk-\(.*\)-amd64.tar.gz,\1,g'
+      '';
+    };
+  };
+
   buildInputs = [
     atk cairo gdk-pixbuf glib gtk2 stdenv.cc.cc pango
     gnome2.gtkglext libGLU libGL freetype fontconfig