3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #126277 from Ma27/bump-grafana

grafana: 7.5.7 -> 8.0.0
This commit is contained in:
Robin Gloster 2021-06-08 19:38:07 -05:00 committed by GitHub
commit 090dc51fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = ''