grafana-reporter: fix build (#356233)

This commit is contained in:
Aleksana 2024-11-16 16:29:42 +08:00 committed by GitHub
commit e018d496dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,10 @@
{ lib {
, buildGoModule lib,
, fetchFromGitHub buildGoModule,
, tetex fetchFromGitHub,
, makeWrapper fetchpatch2,
tetex,
makeWrapper,
}: }:
buildGoModule rec { buildGoModule rec {
pname = "reporter"; pname = "reporter";
@ -17,20 +19,21 @@ buildGoModule rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
vendorHash = null; vendorHash = "sha256-QlNOx2jm1LVz066t9khppf//T5c9z3YUrSOr6qzbUzI=";
postPatch = '' patches = [
go mod init github.com/IzakMarais/reporter (fetchpatch2 {
''; name = "use-go-mod-and-remove-vendor-dirs";
url = "https://github.com/IzakMarais/reporter/commit/e844b3f624e0da3a960f98cade427fe54f595504.patch";
hash = "sha256-CdI7/mkYG6t6H6ydGu7atwk18DpagdP7uzfrZVKKlhA=";
})
];
postInstall = '' postInstall = ''
wrapProgram $out/bin/grafana-reporter \ wrapProgram $out/bin/grafana-reporter \
--prefix PATH : ${lib.makeBinPath [ tetex ]} --prefix PATH : ${lib.makeBinPath [ tetex ]}
''; '';
# Testing library used had a breaking API change and upstream didn't adapt.
doCheck = false;
meta = { meta = {
description = "PDF report generator from a Grafana dashboard"; description = "PDF report generator from a Grafana dashboard";
mainProgram = "grafana-reporter"; mainProgram = "grafana-reporter";