Skip to content

Commit e018d49

Browse files
authored
grafana-reporter: fix build (#356233)
2 parents dfaa4cb + 7d8e289 commit e018d49

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

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

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
{ lib
2-
, buildGoModule
3-
, fetchFromGitHub
4-
, tetex
5-
, makeWrapper
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
fetchpatch2,
6+
tetex,
7+
makeWrapper,
68
}:
79
buildGoModule rec {
810
pname = "reporter";
@@ -17,20 +19,21 @@ buildGoModule rec {
1719

1820
nativeBuildInputs = [ makeWrapper ];
1921

20-
vendorHash = null;
22+
vendorHash = "sha256-QlNOx2jm1LVz066t9khppf//T5c9z3YUrSOr6qzbUzI=";
2123

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

2632
postInstall = ''
2733
wrapProgram $out/bin/grafana-reporter \
2834
--prefix PATH : ${lib.makeBinPath [ tetex ]}
2935
'';
3036

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

0 commit comments

Comments
 (0)