mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-18 10:04:08 +00:00
grafana-reporter: fix build (#356233)
This commit is contained in:
commit
e018d496dc
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user