Unverified Commit c47115fc authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

grafana: 11.5.2 -> 11.6.0 (#393960)

parents d5d9044f ac2a5fa8
Loading
Loading
Loading
Loading
+21 −8
Original line number Diff line number Diff line
@@ -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;