diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 1043b70b5844..7420fa22e638 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -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 diff --git a/pkgs/servers/monitoring/grafana/plugins/grafana-clock-panel/default.nix b/pkgs/servers/monitoring/grafana/plugins/grafana-clock-panel/default.nix index c0648c97e68b..024825c9abe0 100644 --- a/pkgs/servers/monitoring/grafana/plugins/grafana-clock-panel/default.nix +++ b/pkgs/servers/monitoring/grafana/plugins/grafana-clock-panel/default.nix @@ -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;