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";
|
2021-05-11 20:58:04 +01:00
|
|
|
version = "1.6";
|
2016-11-27 08:10:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jonnenauha";
|
|
|
|
repo = "prometheus_varnish_exporter";
|
2021-05-11 20:58:04 +01:00
|
|
|
rev = version;
|
|
|
|
sha256 = "1cp7c1w237r271m8b1y8pj5jy7j2iadp4vbislxfyp4kga9i4dcc";
|
2016-11-27 08:10:48 +00:00
|
|
|
};
|
|
|
|
|
2021-05-11 20:58:04 +01:00
|
|
|
vendorSha256 = "1cslg29l9mmyhpdz14ca9m18iaz4hhznplz8fmi3wa3l8r7ih751";
|
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
|
|
|
}
|