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