From ec07d1a6e54a471fb993c77f20e3951f35377b61 Mon Sep 17 00:00:00 2001 From: pacien Date: Sat, 17 Jun 2023 19:21:09 +0200 Subject: [PATCH] pixelfed: fix hash format in update script (cherry picked from commit 8dc46af8e38cba60e125fdd16772ee57cbb0b5f9) --- pkgs/servers/web-apps/pixelfed/update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/web-apps/pixelfed/update.sh b/pkgs/servers/web-apps/pixelfed/update.sh index 6408170add8be66..f629444013d6cfd 100755 --- a/pkgs/servers/web-apps/pixelfed/update.sh +++ b/pkgs/servers/web-apps/pixelfed/update.sh @@ -12,6 +12,7 @@ TARGET_VERSION_REMOTE=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} https://a TARGET_VERSION=${TARGET_VERSION_REMOTE:1} PIXELFED=https://github.com/pixelfed/pixelfed/raw/$TARGET_VERSION_REMOTE SHA256=$(nix-prefetch-url --unpack "https://github.com/pixelfed/pixelfed/archive/v$TARGET_VERSION/pixelfed.tar.gz") +SRI_HASH=$(nix hash to-sri --type sha256 "$SHA256") if [[ "$CURRENT_VERSION" == "$TARGET_VERSION" ]]; then echo "pixelfed is up-to-date: ${CURRENT_VERSION}" @@ -28,7 +29,7 @@ rm composer.json composer.lock # change version number sed -e "s/version =.*;/version = \"$TARGET_VERSION\";/g" \ - -e "s/sha256 =.*;/sha256 = \"$SHA256\";/g" \ + -e "s/hash =.*;/hash = \"$SRI_HASH\";/g" \ -i ./default.nix cd ../../../..