2024-06-24 18:47:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, tetex
|
|
|
|
, makeWrapper
|
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "reporter";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "2.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-06-24 18:47:55 +00:00
|
|
|
rev = "v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
owner = "IzakMarais";
|
|
|
|
repo = "reporter";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-lsraJwx56I2Gn8CePWUlQu1qdMp78P4xwPzLxetYUcw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
vendorHash = null;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
go mod init github.com/IzakMarais/reporter
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
wrapProgram $out/bin/grafana-reporter \
|
2024-06-24 18:47:55 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ tetex ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
# Testing library used had a breaking API change and upstream didn't adapt.
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "PDF report generator from a Grafana dashboard";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "grafana-reporter";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/IzakMarais/reporter";
|
2024-06-24 18:47:55 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.disassembler ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|