git.iko.soy/typeable/nixpkgs
on master help sign in
gotify: adapt update script to use vendor sha
commit5746259af694fc791743c322f2cf0d47e3d0d9bd authorDoron Behar <doron.behar@gmail.com> dateFri 15 May 2020, 01:39 (7 years ago) parent39b92f6
3 files changed+8−7
pkgs/servers/gotify/default.nix+1−1 pkgs/servers/gotify/update.sh+6−6 pkgs/servers/gotify/vendor-sha.nix+1
pkgs/servers/gotify/default.nix+1−1
@@ -21,7 +21,7 @@ buildGoModule rec {
2121 sha256 = import ./source-sha.nix;
2222 };
2323
24− vendorSha256 = "1ha0zgz1n07sd3if6823fi83j7yajysjdzfbwqk9rpsi6zv3cfh3";
24+ vendorSha256 = import ./vendor-sha.nix;
2525
2626 postPatch = ''
2727 substituteInPlace app.go \
pkgs/servers/gotify/update.sh+6−6
@@ -11,9 +11,9 @@ echo got version $version
1111echo \""${version#v}"\" > "$dirname/version.nix"
1212printf '%s' $(nix-prefetch-git --quiet --rev ${version} https://github.com/gotify/server | jq .sha256) > $dirname/source-sha.nix
1313tput setaf 1
14−echo zeroing modSha256 in $dirname/mod-sha.nix
14+echo zeroing vendorSha256 in $dirname/vendor-sha.nix
1515tput sgr0
16−printf '"%s"' "0000000000000000000000000000000000000000000000000000" > $dirname/mod-sha.nix
16+printf '"%s"' "0000000000000000000000000000000000000000000000000000" > $dirname/vendor-sha.nix
1717
1818GOTIFY_WEB_SRC="https://raw.githubusercontent.com/gotify/server/$version"
1919
@@ -28,13 +28,13 @@ echo removed yarn.lock
2828
2929echo running nix-build for ui
3030nix-build -A gotify-server.ui
31−echo running nix-build for gotify itself in order to get modSha256
31+echo running nix-build for gotify itself in order to get vendorSha256
3232set +e
33−modSha256="$(nix-build -A gotify-server 2>&1 | grep "got:" | cut -d':' -f3)"
33+vendorSha256="$(nix-build -A gotify-server 2>&1 | grep "got:" | cut -d':' -f3)"
3434set -e
35−printf '"%s"' "$modSha256" > $dirname/mod-sha.nix
35+printf '"%s"' "$vendorSha256" > $dirname/vendor-sha.nix
3636tput setaf 2
37−echo got modSha256 of: $modSha256
37+echo got vendorSha256 of: $vendorSha256
3838tput sgr0
3939echo running nix-build -A gotify-server which should build gotify-server normally
4040nix-build -A gotify-server
pkgs/servers/gotify/vendor-sha.nixnew file+1
@@ -0,0 +1 @@
1+"1ha0zgz1n07sd3if6823fi83j7yajysjdzfbwqk9rpsi6zv3cfh3"