Skip to content

Commit a802b22

Browse files
committed
grafana-reporter: fix build by creating mod file
1 parent 9b0635e commit a802b22

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pkgs/by-name/gr/grafana-reporter/package.nix

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ lib
22
, buildGoModule
33
, fetchFromGitHub
4+
, fetchpatch2
45
, tetex
56
, makeWrapper
67
}:
@@ -17,20 +18,21 @@ buildGoModule rec {
1718

1819
nativeBuildInputs = [ makeWrapper ];
1920

20-
vendorHash = null;
21+
vendorHash = "sha256-QlNOx2jm1LVz066t9khppf//T5c9z3YUrSOr6qzbUzI=";
2122

22-
postPatch = ''
23-
go mod init github.com/IzakMarais/reporter
24-
'';
23+
patches = [
24+
(fetchpatch2 {
25+
name = "use-go-mod-and-remove-vendor-dirs";
26+
url = "https://github.com/IzakMarais/reporter/commit/e844b3f624e0da3a960f98cade427fe54f595504.patch";
27+
hash = "sha256-CdI7/mkYG6t6H6ydGu7atwk18DpagdP7uzfrZVKKlhA=";
28+
})
29+
];
2530

2631
postInstall = ''
2732
wrapProgram $out/bin/grafana-reporter \
2833
--prefix PATH : ${lib.makeBinPath [ tetex ]}
2934
'';
3035

31-
# Testing library used had a breaking API change and upstream didn't adapt.
32-
doCheck = false;
33-
3436
meta = {
3537
description = "PDF report generator from a Grafana dashboard";
3638
mainProgram = "grafana-reporter";

0 commit comments

Comments
 (0)