From f38f3e439b16e71e6298b969ea362e9c0f652955 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 7 Jul 2023 23:02:51 -0700 Subject: [PATCH] matrix-appservice-discord: adapt update script to new nix-prefetch-github --- pkgs/servers/matrix-appservice-discord/default.nix | 2 +- pkgs/servers/matrix-appservice-discord/pin.json | 2 +- pkgs/servers/matrix-appservice-discord/update.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/matrix-appservice-discord/default.nix b/pkgs/servers/matrix-appservice-discord/default.nix index f8563ab57dae..b1d14319638d 100644 --- a/pkgs/servers/matrix-appservice-discord/default.nix +++ b/pkgs/servers/matrix-appservice-discord/default.nix @@ -22,7 +22,7 @@ in mkYarnPackage rec { owner = "matrix-org"; repo = "matrix-appservice-discord"; rev = "v${version}"; - sha256 = pin.srcSha256; + hash = pin.srcHash; }; packageJSON = ./package.json; diff --git a/pkgs/servers/matrix-appservice-discord/pin.json b/pkgs/servers/matrix-appservice-discord/pin.json index 57b7ffd28a2c..901864ef4474 100644 --- a/pkgs/servers/matrix-appservice-discord/pin.json +++ b/pkgs/servers/matrix-appservice-discord/pin.json @@ -1,5 +1,5 @@ { "version": "3.1.1", - "srcSha256": "g681w7RD96/xKP+WnIyY4bcVHVQhysgDPZo4TgCRiuY=", + "srcHash": "sha256-g681w7RD96/xKP+WnIyY4bcVHVQhysgDPZo4TgCRiuY=", "yarnSha256": "0cm9yprj0ajmrdpap3p2lx3xrrkar6gghlxnj9127ks6p5c1ji3r" } diff --git a/pkgs/servers/matrix-appservice-discord/update.sh b/pkgs/servers/matrix-appservice-discord/update.sh index 4ffdc4b34db3..ec089d7a2189 100755 --- a/pkgs/servers/matrix-appservice-discord/update.sh +++ b/pkgs/servers/matrix-appservice-discord/update.sh @@ -22,7 +22,7 @@ if [ -z "$tag" ]; then fi src="https://raw.githubusercontent.com/$ORG/$PROJ/$tag" -src_sha256=$(nix-prefetch-github $ORG $PROJ --rev ${tag} | jq -r .sha256) +src_hash=$(nix-prefetch-github $ORG $PROJ --rev ${tag} | jq -r .hash) tmpdir=$(mktemp -d) trap 'rm -rf "$tmpdir"' EXIT @@ -36,7 +36,7 @@ curl -O "$src/package.json" cat > pin.json << EOF { "version": "$(echo $tag | grep -P '(\d|\.)+' -o)", - "srcSha256": "$src_sha256", + "srcSha256": "$src_hash", "yarnSha256": "$yarn_sha256" } EOF