2020-06-18 11:48:40 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, makeWrapper, varnish, nixosTests }:
|
2016-11-27 08:10:48 +00:00
|
|
|
|
2019-08-12 17:23:27 +01:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "prometheus_varnish_exporter";
|
2020-04-29 01:16:20 +01:00
|
|
|
version = "unstable-2020-03-26";
|
2016-11-27 08:10:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonnenauha";
|
|
|
|
repo = "prometheus_varnish_exporter";
|
2020-04-29 01:16:20 +01:00
|
|
|
rev = "f0f90fc69723de8b716cda16cb419e8a025130ff";
|
|
|
|
sha256 = "1viiiyvhpr7cnf8ykaaq4fzgg9xvn4hnlhv7cagy3jkjlmz60947";
|
2016-11-27 08:10:48 +00:00
|
|
|
};
|
|
|
|
|
2020-05-01 02:59:00 +01:00
|
|
|
vendorSha256 = "1h9iz3sbz02hb8827hcssqlfg2ag3ymq38siffw9wzajslzhp9sx";
|
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"
|
|
|
|
'';
|
|
|
|
|
2020-06-18 11:48:40 +01:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) varnish; };
|
|
|
|
|
2020-03-27 07:33:21 +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";
|
2020-03-27 07:33:21 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ MostAwesomeDude willibutz ];
|
2016-11-27 08:10:48 +00:00
|
|
|
};
|
2020-06-18 11:48:40 +01:00
|
|
|
}
|