diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix new file mode 100644 index 000000000000..70f39418198e --- /dev/null +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix @@ -0,0 +1,29 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + pname = "nginx_exporter"; + version = "0.6.0"; + + goPackagePath = "github.com/nginxinc/nginx-prometheus-exporter"; + + buildFlagsArray = [ + "-ldflags=" "-X main.version=${version}" + ]; + + src = fetchFromGitHub { + rev = "v${version}"; + owner = "nginxinc"; + repo = "nginx-prometheus-exporter"; + sha256 = "1rwafmm9x0sxj4z7x4axhrjgdy15z70a1y00hw6smq30fcpkazhq"; + }; + + doCheck = true; + + meta = with stdenv.lib; { + description = "NGINX Prometheus Exporter for NGINX and NGINX Plus"; + homepage = "https://github.com/nginxinc/nginx-prometheus-exporter"; + license = licenses.asl20; + maintainers = with maintainers; [ benley fpletz willibutz globin ]; + platforms = platforms.unix; + }; +} |