2020-03-27 00:33:21 -07:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, varnish }:
|
2016-11-27 00:10:48 -08:00
|
|
|
|
2019-08-12 09:23:27 -07:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "prometheus_varnish_exporter";
|
2020-04-28 17:16:20 -07:00
|
|
|
version = "unstable-2020-03-26";
|
2016-11-27 00:10:48 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonnenauha";
|
|
|
|
repo = "prometheus_varnish_exporter";
|
2020-04-28 17:16:20 -07:00
|
|
|
rev = "f0f90fc69723de8b716cda16cb419e8a025130ff";
|
|
|
|
sha256 = "1viiiyvhpr7cnf8ykaaq4fzgg9xvn4hnlhv7cagy3jkjlmz60947";
|
2016-11-27 00:10:48 -08:00
|
|
|
};
|
|
|
|
|
2020-04-28 17:16:20 -07:00
|
|
|
modSha256 = "1vb720axjziiqcba4bdi528r6mc97ci0pfsk0ny50isrkh0s3jzz";
|
2016-11-27 00:10:48 -08:00
|
|
|
|
2018-05-01 07:04:28 -07:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
2019-08-12 09:23:27 -07:00
|
|
|
wrapProgram $out/bin/prometheus_varnish_exporter \
|
2018-05-01 07:04:28 -07:00
|
|
|
--prefix PATH : "${varnish}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2020-03-27 00:33:21 -07:00
|
|
|
meta = {
|
2019-07-25 10:51:45 -07:00
|
|
|
homepage = "https://github.com/jonnenauha/prometheus_varnish_exporter";
|
2016-11-27 00:10:48 -08:00
|
|
|
description = "Varnish exporter for Prometheus";
|
2020-03-27 00:33:21 -07:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ];
|
2016-11-27 00:10:48 -08:00
|
|
|
};
|
|
|
|
}
|