nixpkgs/pkgs/servers/monitoring/prometheus/varnish-exporter.nix
2020-05-14 07:22:21 +01:00

31 lines
No EOL
886 B
Nix

{ lib, buildGoModule, fetchFromGitHub, makeWrapper, varnish }:
buildGoModule rec {
pname = "prometheus_varnish_exporter";
version = "unstable-2020-03-26";
src = fetchFromGitHub {
owner = "jonnenauha";
repo = "prometheus_varnish_exporter";
rev = "f0f90fc69723de8b716cda16cb419e8a025130ff";
sha256 = "1viiiyvhpr7cnf8ykaaq4fzgg9xvn4hnlhv7cagy3jkjlmz60947";
};
vendorSha256 = "1h9iz3sbz02hb8827hcssqlfg2ag3ymq38siffw9wzajslzhp9sx";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/prometheus_varnish_exporter \
--prefix PATH : "${varnish}/bin"
'';
doCheck = true;
meta = {
homepage = "https://github.com/jonnenauha/prometheus_varnish_exporter";
description = "Varnish exporter for Prometheus";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ];
};
}