Merge pull request #126928 from Ma27/bump-grafana

This commit is contained in:
Sandro 2021-06-16 04:11:08 +02:00 committed by GitHub
commit 2c5fef044c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 8 deletions

View file

@ -1,8 +1,8 @@
{ lib, buildGoModule, fetchurl, fetchFromGitHub, nixosTests }:
{ lib, buildGoModule, fetchurl, fetchFromGitHub, nixosTests, fetchpatch }:
buildGoModule rec {
pname = "grafana";
version = "8.0.1";
version = "8.0.2";
excludedPackages = [ "release_publisher" ];
@ -10,15 +10,24 @@ buildGoModule rec {
rev = "v${version}";
owner = "grafana";
repo = "grafana";
sha256 = "sha256-Vs/4urH/XuoVly26YfhFbf/T3x5jdS4BgrVStuTHaHo=";
sha256 = "sha256-kCsrLZ0EbuMwqqDvUvhm8+B/vh6FpeJ5zkwste+qwyQ=";
};
srcStatic = fetchurl {
url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz";
sha256 = "sha256-b05nUApLjdQW5vbS56HUK+/GXKcHo2UAHybfe6ZTr3U=";
sha256 = "sha256-QBMGLN3MjYJcv2vbs9GHfrCixcV7nH+Ox3o6/YtRYak=";
};
vendorSha256 = "sha256-iwB1JtekxFYSHjaV+TqBDqnyE5zt3RJ4dQmf12AA53U=";
vendorSha256 = "sha256-x7sSVIim/TOhMTbnRK/fpgxiSRSO8KwGILTE2i1gU3U=";
patches = [
# https://github.com/grafana/grafana/pull/35635 (fixes declarative plugins for us)
(fetchpatch {
url = "https://github.com/grafana/grafana/commit/5b5cb948092bdb85e0378fd9ae01b564c4bf65f1.patch";
sha256 = "sha256-MnCjfLiHsBSWPcxVZ2dC4q8x1/TjzR8uyQhH2Jzgx7o=";
includes = [ "pkg/util/filepath.go" ];
})
];
preBuild = ''
# The testcase makes an API call against grafana.com:
@ -32,7 +41,12 @@ buildGoModule rec {
# + (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
sed -i -e '/func TestPluginInstallAccess/a t.Skip();' pkg/tests/api/plugins/api_install_test.go
# Skip a flaky test (https://github.com/NixOS/nixpkgs/pull/126928#issuecomment-861424128)
sed -i -e '/it should change folder successfully and return correct result/{N;s/$/\nt.Skip();/}'\
pkg/services/libraryelements/libraryelements_patch_test.go
# main module (github.com/grafana/grafana) does not contain package github.com/grafana/grafana/scripts/go
rm -r scripts/go

View file

@ -2,8 +2,8 @@
grafanaPlugin rec {
pname = "grafana-clock-panel";
version = "1.1.1";
zipHash = "sha256-SvZyg7r+XG6i7jqYwxpPn6ZzJc7qmtfPtyphYppURDk=";
version = "1.1.3";
zipHash = "sha256-80JaMhY/EduSWvFrScfua99DGhT/FJUqY/kl0CafKCs=";
meta = with lib; {
description = "Clock panel for Grafana";
license = licenses.asl20;