cdb: fix -Werror messages
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / varnish-exporter.nix
blob772069ddeb06d8a19bca88bbe61109a7843aaeda
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   makeWrapper,
6   varnish,
7   nixosTests,
8 }:
10 buildGoModule rec {
11   pname = "prometheus_varnish_exporter";
12   version = "1.6.1";
14   src = fetchFromGitHub {
15     owner = "jonnenauha";
16     repo = "prometheus_varnish_exporter";
17     rev = version;
18     hash = "sha256-1sUzKLNkLP/eX0wYSestMAJpjAmX1iimjYoFYb6Mgpc=";
19   };
21   vendorHash = "sha256-P2fR0U2O0Y4Mci9jkAMb05WR+PrpuQ59vbLMG5b9KQI=";
23   nativeBuildInputs = [ makeWrapper ];
25   postInstall = ''
26     wrapProgram $out/bin/prometheus_varnish_exporter \
27       --prefix PATH : "${varnish}/bin"
28   '';
30   passthru.tests = { inherit (nixosTests.prometheus-exporters) varnish; };
32   meta = {
33     homepage = "https://github.com/jonnenauha/prometheus_varnish_exporter";
34     description = "Varnish exporter for Prometheus";
35     mainProgram = "prometheus_varnish_exporter";
36     license = lib.licenses.mit;
37     maintainers = with lib.maintainers; [ MostAwesomeDude ];
38   };