From 9febe63ae6daa36e4ad1c5cbd67517593a508b2d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 9 Jun 2021 00:39:56 +0200 Subject: [PATCH] grafana: 7.5.7 -> 8.0.0 ChangeLog: https://github.com/grafana/grafana/releases/tag/v8.0.0 Also had to skip one of the plugin tests as it tried to access grafana.com (test-failure is documented as comment in `preBuild`). --- pkgs/servers/monitoring/grafana/default.nix | 38 ++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 89e49671d866..24bb3633caea 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "grafana"; - version = "7.5.7"; + version = "8.0.0"; excludedPackages = [ "release_publisher" ]; @@ -10,32 +10,32 @@ buildGoModule rec { rev = "v${version}"; owner = "grafana"; repo = "grafana"; - sha256 = "sha256-GTQK02zxOBTE+93vT0zLMhAeZ7F3Cq/0lbvbzwB2QZA="; + sha256 = "sha256-HtubiSx4Orf9knZcuYy4eF2qwclX/JVd2Ba9L33tM74="; }; srcStatic = fetchurl { url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz"; - sha256 = "sha256-IQ7aAuUrNa+bSh5ld6IttujM8AgKUSlu8H7pwzDi164="; + sha256 = "sha256-bwBpkPy4kwfnkRsLOktUgQx+Sm8WJA2d65efMBCnGp4="; }; - vendorSha256 = "sha256-AsPRaRLomp090XAKLXLXKm40ESPO4im9qi6VLpLYRQU="; + vendorSha256 = "sha256-Hon5WrhXUvZUtMRxx3XcBDQe3rkRkfqbnXjY3xCzuuM="; - # grafana-aws-sdk is specified with two versions which causes a problem later: - # go: inconsistent vendoring in /build/source: - # github.com/grafana/grafana-aws-sdk@v0.3.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt - # Remove the older one here to fix this. - postPatch = '' - substituteInPlace go.mod \ - --replace 'github.com/grafana/grafana-aws-sdk v0.3.0' "" - - substituteInPlace pkg/cmd/grafana-server/main.go \ - --replace 'var version = "5.0.0"' 'var version = "${version}"' - ''; - - # main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/scripts/go - # main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/dashboard-schemas preBuild = '' - rm -r dashboard-schemas scripts/go + # The testcase makes an API call against grafana.com: + # + # --- Expected + # +++ Actual + # @@ -1,4 +1,4 @@ + # (map[string]interface {}) (len=2) { + # - (string) (len=5) "error": (string) (len=16) "plugin not found", + # - (string) (len=7) "message": (string) (len=16) "Plugin not found" + # + (string) (len=5) "error": (string) (len=171) "Failed to send request: Get \"https://grafana.com/api/plugins/repo/test\": dial tcp: lookup grafana.com on [::1]:53: read udp [::1]:48019->[::1]:53: read: connection refused", + # + (string) (len=7) "message": (string) (len=24) "Failed to install plugin" + # } + sed -ie '/func TestPluginInstallAccess/a t.Skip();' pkg/tests/api/plugins/api_install_test.go + + # main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/scripts/go + rm -r scripts/go ''; postInstall = ''