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