mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
[Backport release-24.11] grafana-reporter: fix build (#356400)
This commit is contained in:
commit
ffe59aaa5e
@ -1,8 +1,10 @@
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, tetex
|
||||
, makeWrapper
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
tetex,
|
||||
makeWrapper,
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "reporter";
|
||||
@ -17,20 +19,21 @@ buildGoModule rec {
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
vendorHash = null;
|
||||
vendorHash = "sha256-QlNOx2jm1LVz066t9khppf//T5c9z3YUrSOr6qzbUzI=";
|
||||
|
||||
postPatch = ''
|
||||
go mod init github.com/IzakMarais/reporter
|
||||
'';
|
||||
patches = [
|
||||
(fetchpatch2 {
|
||||
name = "use-go-mod-and-remove-vendor-dirs";
|
||||
url = "https://github.com/IzakMarais/reporter/commit/e844b3f624e0da3a960f98cade427fe54f595504.patch";
|
||||
hash = "sha256-CdI7/mkYG6t6H6ydGu7atwk18DpagdP7uzfrZVKKlhA=";
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/grafana-reporter \
|
||||
--prefix PATH : ${lib.makeBinPath [ tetex ]}
|
||||
'';
|
||||
|
||||
# Testing library used had a breaking API change and upstream didn't adapt.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "PDF report generator from a Grafana dashboard";
|
||||
mainProgram = "grafana-reporter";
|
||||
|
Loading…
Reference in New Issue
Block a user