From ac2a5fa8f51f9a28277de050512ad926ca3a6f82 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 28 Mar 2025 10:35:37 +0100 Subject: [PATCH] grafana: 11.5.2 -> 11.6.0 Closes #393713 ChangeLog: https://github.com/grafana/grafana/releases/tag/v11.6.0 --- pkgs/servers/monitoring/grafana/default.nix | 29 +++++++++++++++------ 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index b758497bb98b..1b30c6ead78f 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -22,16 +22,29 @@ let # Grafana seems to just set it to the latest version available # nowadays. + # NOTE: sometimes, this is a no-op (i.e. `--replace-fail "X" "X"`). + # This is because Grafana raises the Go version above the patch-level we have + # on master if a security fix landed in Go (and our go may go through staging first). + # + # I(Ma27) decided to leave the code a no-op if this is not the case because + # pulling it out of the Git history every few months and checking which files + # we need to update now is slightly annoying. patchGoVersion = '' - substituteInPlace go.{mod,work} apps/alerting/notifications/go.mod pkg/storage/unified/apistore/go.mod pkg/storage/unified/resource/go.mod \ - --replace-fail "go 1.23.5" "go 1.23.4" + find . -name go.mod -not -path "./.bingo/*" -print0 | while IFS= read -r -d ''' line; do + substituteInPlace "$line" \ + --replace-fail "go 1.23.7" "go 1.23.7" + done + find . -name go.work -print0 | while IFS= read -r -d ''' line; do + substituteInPlace "$line" \ + --replace-fail "go 1.23.7" "go 1.23.7" + done substituteInPlace Makefile \ - --replace-fail "GO_VERSION = 1.23.5" "GO_VERSION = 1.23.4" + --replace-fail "GO_VERSION = 1.23.7" "GO_VERSION = 1.23.7" ''; in buildGoModule rec { pname = "grafana"; - version = "11.5.2"; + version = "11.6.0"; subPackages = [ "pkg/cmd/grafana" @@ -43,7 +56,7 @@ buildGoModule rec { owner = "grafana"; repo = "grafana"; rev = "v${version}"; - hash = "sha256-W0wn19SqqzxHm2fRtsEOru4khNqZziAfzWWc6H+Juew="; + hash = "sha256-oXotHi79XBhxD/qYC7QDQwn7jiX0wKWe/RXZS5DwN9o="; }; # borrowed from: https://github.com/NixOS/nixpkgs/blob/d70d9425f49f9aba3c49e2c389fe6d42bac8c5b0/pkgs/development/tools/analysis/snyk/default.nix#L20-L22 @@ -81,9 +94,9 @@ buildGoModule rec { outputHashMode = "recursive"; outputHash = rec { - x86_64-linux = "sha256-8KoSBzcEih9UKOkbcNTN1pZz/wVTedJ8qLRe+uXV/dE="; + x86_64-linux = "sha256-52Sq7YJHhs0UICMOtEDta+bY7b/1SdNfzUOigQhH3E4="; aarch64-linux = x86_64-linux; - aarch64-darwin = "sha256-XW6AV0tzrEWizn4G0KEXegEcNmlTJl6mZ92ZRmz17HM="; + aarch64-darwin = "sha256-9AJbuA1WDGiln2ea0nqD9lDMhKWdYyVkgFyFLB6/Etc="; x86_64-darwin = aarch64-darwin; } .${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -93,7 +106,7 @@ buildGoModule rec { postPatch = patchGoVersion; - vendorHash = "sha256-Pt87hb0+EuGd62ld65jTszeTy7GZZbviH8X9qCGOaJQ="; + vendorHash = "sha256-cYE43OAagPHFhWsUJLMcJVfsJj6d0vUqzjbAviYSuSc="; proxyVendor = true;