From be596a5aab0c485cf56da9956a72e305abe3e954 Mon Sep 17 00:00:00 2001 From: Matt Moriarity Date: Sat, 7 Oct 2023 14:25:11 -0600 Subject: [PATCH 1/3] beeper: add update script --- .../instant-messengers/beeper/default.nix | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/beeper/default.nix b/pkgs/applications/networking/instant-messengers/beeper/default.nix index c523b59fb199..30e78a7652dd 100644 --- a/pkgs/applications/networking/instant-messengers/beeper/default.nix +++ b/pkgs/applications/networking/instant-messengers/beeper/default.nix @@ -1,10 +1,20 @@ -{ lib, fetchurl, mkDerivation, appimageTools, libsecret, makeWrapper }: +{ lib +, fetchurl +, mkDerivation +, appimageTools +, libsecret +, makeWrapper +, writeShellApplication +, curl +, yq +, common-updater-scripts +}: let pname = "beeper"; version = "3.71.16"; name = "${pname}-${version}"; src = fetchurl { - url = "https://download.todesktop.com/2003241lzgn20jd/beeper-${version}.AppImage"; + url = "https://download.todesktop.com/2003241lzgn20jd/beeper-3.71.16.AppImage"; hash = "sha256-Ho5zFmhNzkOmzo/btV+qZfP2GGx5XvV/1JncEKlH4vc="; }; appimage = appimageTools.wrapType2 { @@ -16,7 +26,7 @@ let }; in mkDerivation rec { - inherit name pname; + inherit name pname version; src = appimage; @@ -44,6 +54,20 @@ mkDerivation rec { runHook postInstall ''; + passthru = { + updateScript = lib.getExe (writeShellApplication { + name = "update-beeper"; + runtimeInputs = [ curl yq common-updater-scripts ]; + text = '' + set -o errexit + latestLinux="$(curl -s https://download.todesktop.com/2003241lzgn20jd/latest-linux.yml)" + version="$(echo "$latestLinux" | yq -r .version)" + filename="$(echo "$latestLinux" | yq -r '.files[] | .url | select(. | endswith(".AppImage"))')" + update-source-version beeper "$version" "" "https://download.todesktop.com/2003241lzgn20jd/$filename" --source-key=src.src + ''; + }); + }; + meta = with lib; { description = "Universal chat app."; longDescription = '' From fbda5a48a7d422787731a4d4e0d1838869cf22ca Mon Sep 17 00:00:00 2001 From: Matt Moriarity Date: Sat, 7 Oct 2023 15:09:00 -0600 Subject: [PATCH 2/3] beeper: 3.71.16 -> 3.80.17 --- .../networking/instant-messengers/beeper/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/beeper/default.nix b/pkgs/applications/networking/instant-messengers/beeper/default.nix index 30e78a7652dd..90f1091f3aeb 100644 --- a/pkgs/applications/networking/instant-messengers/beeper/default.nix +++ b/pkgs/applications/networking/instant-messengers/beeper/default.nix @@ -11,11 +11,11 @@ }: let pname = "beeper"; - version = "3.71.16"; + version = "3.80.17"; name = "${pname}-${version}"; src = fetchurl { - url = "https://download.todesktop.com/2003241lzgn20jd/beeper-3.71.16.AppImage"; - hash = "sha256-Ho5zFmhNzkOmzo/btV+qZfP2GGx5XvV/1JncEKlH4vc="; + url = "https://download.todesktop.com/2003241lzgn20jd/beeper-3.80.17-build-231010czwkkgnej.AppImage"; + hash = "sha256-cfzfeM1czhZKz0HbbJw2PD3laJFg9JWppA2fKUb5szU="; }; appimage = appimageTools.wrapType2 { inherit version pname src; From 92409f5c22f98a505753204ce044f7da4f0e0497 Mon Sep 17 00:00:00 2001 From: Matt Moriarity Date: Wed, 11 Oct 2023 10:49:52 -0600 Subject: [PATCH 3/3] beeper: add mjm as maintainer --- .../networking/instant-messengers/beeper/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/beeper/default.nix b/pkgs/applications/networking/instant-messengers/beeper/default.nix index 90f1091f3aeb..29e005bdf966 100644 --- a/pkgs/applications/networking/instant-messengers/beeper/default.nix +++ b/pkgs/applications/networking/instant-messengers/beeper/default.nix @@ -77,7 +77,7 @@ mkDerivation rec { ''; homepage = "https://beeper.com"; license = licenses.unfree; - maintainers = with maintainers; [ jshcmpbll ]; + maintainers = with maintainers; [ jshcmpbll mjm ]; platforms = [ "x86_64-linux" ]; }; }