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