about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-21 23:47:30 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-09-21 23:47:30 +0200
commitdd52d0fc96ab70de119cfb55a44b0cf1535193b6 (patch)
tree647e530db433896805db1f25971d36c43f693cbb /pkgs
parente12483116b3b51a185a33a272bf351e357ba9a99 (diff)
grafana: fix update script
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/servers/monitoring/grafana/update.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/servers/monitoring/grafana/update.sh b/pkgs/servers/monitoring/grafana/update.sh
index 9a19485e37a4f..3fd4fd56be7c4 100755
--- a/pkgs/servers/monitoring/grafana/update.sh
+++ b/pkgs/servers/monitoring/grafana/update.sh
@@ -28,9 +28,10 @@ if [ ! "${oldVersion}" = "${targetVersion}" ]; then
   update-source-version grafana "${targetVersion#v}"
   oldStaticHash="$(nix-instantiate --eval -A grafana.srcStatic.outputHash | tr -d '"')"
   newStaticHash="$(nix-prefetch-url "https://dl.grafana.com/oss/release/grafana-${targetVersion#v}.linux-amd64.tar.gz")"
+  newStaticHash="$(nix hash to-sri --type sha256 $newStaticHash)"
   replaceHash "$oldStaticHash" "$newStaticHash"
-  goHash="$(nix-instantiate --eval -A grafana.vendorSha256 | tr -d '"')"
-  emptyHash="$(nix-instantiate --eval -A lib.fakeSha256 | tr -d '"')"
+  goHash="$(nix-instantiate --eval -A grafana.vendorHash | tr -d '"')"
+  emptyHash="$(nix-instantiate --eval -A lib.fakeHash | tr -d '"')"
   replaceHash "$goHash" "$emptyHash"
   replaceHash "$emptyHash" "$(extractVendorHash "$goHash")"
   nix-build -A grafana