teamviewer: adding auto-update script

Adding auto-updating through nix-update so that teamviewer automatically
fetches the latest version. The package previously got out of date
enough that newer clients were rejecting connections.
This commit is contained in:
C4 Patino
2025-01-26 16:48:45 -06:00
parent 3e21a686e7
commit c10e0eb43f
2 changed files with 9 additions and 0 deletions

View File

@@ -152,6 +152,8 @@ mkDerivation rec {
dontWrapQtApps = true;
preferLocalBuild = true;
passthru.updateScript = ./update-teamviewer.sh;
meta = with lib; {
homepage = "https://www.teamviewer.com";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];

View File

@@ -0,0 +1,7 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p nix-update curl
TEAMVIEWER_VER=$(curl -s https://www.teamviewer.com/en-us/download/linux/ | grep -oP 'Current version: <span data-dl-version-label>\K[0-9]+\.[0-9]+\.[0-9]+')
nix-update --version "$TEAMVIEWER_VER" --system x86_64-linux teamviewer
nix-update --version "skip" --system aarch64-linux teamviewer