matomo: 5.2.1 -> 5.2.2 (#376385)
[NixPkgs.git] / pkgs / by-name / gr / grafana-reporter / package.nix
blob04a740d1bddb397a83e925681e2123b97c3e1416
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   fetchpatch2,
6   tetex,
7   makeWrapper,
8 }:
9 buildGoModule rec {
10   pname = "reporter";
11   version = "2.3.1";
13   src = fetchFromGitHub {
14     rev = "v${version}";
15     owner = "IzakMarais";
16     repo = "reporter";
17     hash = "sha256-lsraJwx56I2Gn8CePWUlQu1qdMp78P4xwPzLxetYUcw=";
18   };
20   nativeBuildInputs = [ makeWrapper ];
22   vendorHash = "sha256-QlNOx2jm1LVz066t9khppf//T5c9z3YUrSOr6qzbUzI=";
24   patches = [
25     (fetchpatch2 {
26       name = "use-go-mod-and-remove-vendor-dirs";
27       url = "https://github.com/IzakMarais/reporter/commit/e844b3f624e0da3a960f98cade427fe54f595504.patch";
28       hash = "sha256-CdI7/mkYG6t6H6ydGu7atwk18DpagdP7uzfrZVKKlhA=";
29     })
30   ];
32   postInstall = ''
33     wrapProgram $out/bin/grafana-reporter \
34       --prefix PATH : ${lib.makeBinPath [ tetex ]}
35   '';
37   meta = {
38     description = "PDF report generator from a Grafana dashboard";
39     mainProgram = "grafana-reporter";
40     homepage = "https://github.com/IzakMarais/reporter";
41     license = lib.licenses.mit;
42     maintainers = [ lib.maintainers.disassembler ];
43   };