From 328f25d17f35e3d071b0369fa33e6a244253ea8b Mon Sep 17 00:00:00 2001 From: tshaynik Date: Thu, 9 Sep 2021 15:51:57 -0400 Subject: [PATCH] jitsi-meet-prosody: add passthru.updateScript --- pkgs/misc/jitsi-meet-prosody/default.nix | 2 ++ pkgs/misc/jitsi-meet-prosody/update.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100755 pkgs/misc/jitsi-meet-prosody/update.sh diff --git a/pkgs/misc/jitsi-meet-prosody/default.nix b/pkgs/misc/jitsi-meet-prosody/default.nix index 0ab939af0f78..9098ed2ac573 100644 --- a/pkgs/misc/jitsi-meet-prosody/default.nix +++ b/pkgs/misc/jitsi-meet-prosody/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { single-node-smoke-test = nixosTests.jitsi-meet; }; + passthru.updateScript = ./update.sh; + meta = with lib; { description = "Prosody configuration for Jitsi Meet"; longDescription = '' diff --git a/pkgs/misc/jitsi-meet-prosody/update.sh b/pkgs/misc/jitsi-meet-prosody/update.sh new file mode 100755 index 000000000000..bc039d1ba8e8 --- /dev/null +++ b/pkgs/misc/jitsi-meet-prosody/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl pup common-updater-scripts + +set -eu -o pipefail + +version="$(curl https://download.jitsi.org/stable/ | \ + pup 'a[href] text{}' | \ + awk -F'[_-]' '/jitsi-meet-prosody/ {printf $4"\n"}' | \ + sort -u | \ + tail -n 1)" + +update-source-version jitsi-meet-prosody "$version"