2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, nixosTests }:
|
2016-06-05 13:42:10 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nginx_exporter";
|
2020-11-30 22:12:47 +00:00
|
|
|
version = "0.8.0";
|
2016-06-28 13:32:22 +00:00
|
|
|
|
2019-07-17 12:35:07 +00:00
|
|
|
goPackagePath = "github.com/nginxinc/nginx-prometheus-exporter";
|
|
|
|
|
|
|
|
buildFlagsArray = [
|
|
|
|
"-ldflags=" "-X main.version=${version}"
|
|
|
|
];
|
2016-06-05 13:42:10 +00:00
|
|
|
|
2018-05-01 12:31:48 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
2019-07-17 12:35:07 +00:00
|
|
|
owner = "nginxinc";
|
|
|
|
repo = "nginx-prometheus-exporter";
|
2020-11-30 22:12:47 +00:00
|
|
|
sha256 = "sha256-fFzwJXTwtI0NXZYwORRZomj/wADqxW+wvDH49QK0IZw=";
|
2016-06-05 13:42:10 +00:00
|
|
|
};
|
|
|
|
|
2019-08-11 10:30:04 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2020-06-18 10:48:40 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) nginx; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-17 12:35:07 +00:00
|
|
|
description = "NGINX Prometheus Exporter for NGINX and NGINX Plus";
|
|
|
|
homepage = "https://github.com/nginxinc/nginx-prometheus-exporter";
|
|
|
|
license = licenses.asl20;
|
2019-08-20 17:36:05 +00:00
|
|
|
maintainers = with maintainers; [ benley fpletz willibutz globin ];
|
2016-06-05 13:42:10 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|