2024-11-15 17:31:22 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch2,
|
|
|
|
tetex,
|
|
|
|
makeWrapper,
|
2024-06-09 19:50:26 +00:00
|
|
|
}:
|
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "reporter";
|
2022-08-14 10:50:15 +00:00
|
|
|
version = "2.3.1";
|
2018-04-06 15:24:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-06-09 19:50:26 +00:00
|
|
|
rev = "v${version}";
|
2018-04-06 15:24:30 +00:00
|
|
|
owner = "IzakMarais";
|
|
|
|
repo = "reporter";
|
2024-09-14 21:47:11 +00:00
|
|
|
hash = "sha256-lsraJwx56I2Gn8CePWUlQu1qdMp78P4xwPzLxetYUcw=";
|
2018-04-06 15:24:30 +00:00
|
|
|
};
|
|
|
|
|
2024-06-09 19:50:26 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2024-11-15 17:28:53 +00:00
|
|
|
vendorHash = "sha256-QlNOx2jm1LVz066t9khppf//T5c9z3YUrSOr6qzbUzI=";
|
2024-06-09 19:50:26 +00:00
|
|
|
|
2024-11-15 17:28:53 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch2 {
|
|
|
|
name = "use-go-mod-and-remove-vendor-dirs";
|
|
|
|
url = "https://github.com/IzakMarais/reporter/commit/e844b3f624e0da3a960f98cade427fe54f595504.patch";
|
|
|
|
hash = "sha256-CdI7/mkYG6t6H6ydGu7atwk18DpagdP7uzfrZVKKlhA=";
|
|
|
|
})
|
|
|
|
];
|
2024-06-09 19:50:26 +00:00
|
|
|
|
2018-04-06 15:24:30 +00:00
|
|
|
postInstall = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
wrapProgram $out/bin/grafana-reporter \
|
2024-06-09 19:50:26 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ tetex ]}
|
2018-04-06 15:24:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "PDF report generator from a Grafana dashboard";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "grafana-reporter";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/IzakMarais/reporter";
|
2024-06-09 19:50:26 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.disassembler ];
|
2018-04-06 15:24:30 +00:00
|
|
|
};
|
|
|
|
}
|