From be0c385a5dbff42eece4b9efec028932cf1b3bc7 Mon Sep 17 00:00:00 2001 From: piegames Date: Sun, 7 Nov 2021 22:18:22 +0100 Subject: [PATCH 1/2] matrix-appservice-irc: improve update script --- pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISION | 1 - pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix | 2 +- pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISION diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISION b/pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISION deleted file mode 100644 index c25c8e5b7416..000000000000 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/REVISION +++ /dev/null @@ -1 +0,0 @@ -0.30.0 diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix index 33ac1fca4672..f440a27acb62 100644 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix +++ b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix @@ -5,7 +5,7 @@ let inherit pkgs nodejs; inherit (stdenv.hostPlatform) system; }; - version = builtins.replaceStrings [ "\n" ] [ "" ] (builtins.readFile ./REVISION); + version = (lib.importJSON ./package.json).version; in ourNodePackages.package.override { pname = "matrix-appservice-irc"; diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh b/pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh index 462512dd0f4d..d2c16dedfcd2 100755 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh +++ b/pkgs/servers/matrix-synapse/matrix-appservice-irc/update.sh @@ -6,7 +6,7 @@ set -euo pipefail cd "$(dirname "$0")" CURRENT_VERSION=$(nix eval --raw '(with import ../../../../. {}; matrix-appservice-irc.version)') -TARGET_VERSION="$(curl https://api.github.com/repos/matrix-org/matrix-appservice-irc/releases/latest | jq -r ".tag_name")" +TARGET_VERSION="$(curl https://api.github.com/repos/matrix-org/matrix-appservice-irc/releases/latest | jq --exit-status -r ".tag_name")" if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then echo "matrix-appservice-irc is up-to-date: ${CURRENT_VERSION}" @@ -18,7 +18,6 @@ echo "matrix-appservice-irc: $CURRENT_VERSION -> $TARGET_VERSION" rm -f package.json package-lock.json wget https://github.com/matrix-org/matrix-appservice-irc/raw/$TARGET_VERSION/package.json wget -O package-lock-temp.json https://github.com/matrix-org/matrix-appservice-irc/raw/$TARGET_VERSION/package-lock.json -echo "$TARGET_VERSION" > ./REVISION ./generate-dependencies.sh From 2b7ab562eac330d451942fb11010a55a9190b811 Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 13 Nov 2021 22:25:51 +0100 Subject: [PATCH 2/2] matrix-appservice-irc: remove piegames as maintainer --- pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix index f440a27acb62..1465b9518ffa 100644 --- a/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix +++ b/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix @@ -30,7 +30,7 @@ ourNodePackages.package.override { meta = with lib; { description = "Node.js IRC bridge for Matrix"; - maintainers = with maintainers; [ piegames ]; + maintainers = with maintainers; [ ]; homepage = "https://github.com/matrix-org/matrix-appservice-irc"; license = licenses.asl20; };