2020-03-21 12:26:00 +01:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper, varnish, Security }:
|
2016-11-27 09:10:48 +01:00
|
|
|
|
2019-08-12 18:23:27 +02:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "prometheus_varnish_exporter";
|
2019-11-25 22:23:42 +01:00
|
|
|
version = "1.5.2";
|
2016-11-27 09:10:48 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonnenauha";
|
|
|
|
repo = "prometheus_varnish_exporter";
|
2018-05-01 16:04:28 +02:00
|
|
|
rev = version;
|
2019-11-25 22:23:42 +01:00
|
|
|
sha256 = "0rpabw6a6paavv62f0gzhax9brzcgkly27rhkf0ihw8736gkw8ar";
|
2016-11-27 09:10:48 +01:00
|
|
|
};
|
|
|
|
|
2019-08-12 18:23:27 +02:00
|
|
|
modSha256 = "0w1zg9jc2466srx9pdckw7rzn7ma4pbd0617b1h98v364wjzgj72";
|
2016-11-27 09:10:48 +01:00
|
|
|
|
2018-05-01 16:04:28 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2020-03-21 12:26:00 +01:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
2018-05-01 16:04:28 +02:00
|
|
|
postInstall = ''
|
2019-08-12 18:23:27 +02:00
|
|
|
wrapProgram $out/bin/prometheus_varnish_exporter \
|
2018-05-01 16:04:28 +02:00
|
|
|
--prefix PATH : "${varnish}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
2020-03-21 12:26:00 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-07-25 19:51:45 +02:00
|
|
|
homepage = "https://github.com/jonnenauha/prometheus_varnish_exporter";
|
2016-11-27 09:10:48 +01:00
|
|
|
description = "Varnish exporter for Prometheus";
|
2020-03-21 12:26:00 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ MostAwesomeDude willibutz ];
|
2016-11-27 09:10:48 +01:00
|
|
|
};
|
|
|
|
}
|