Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
34 lines
998 B
Nix
34 lines
998 B
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "nginx_exporter";
|
|
version = "1.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nginxinc";
|
|
repo = "nginx-prometheus-exporter";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-TcQXYZsr3hjE93GfeBt8AJLuQQA7UM+wv1SmCnqON+M=";
|
|
};
|
|
|
|
vendorHash = "sha256-qmyqAbwQYgUFFQwCLakQGta2XMGCbCOvCB93S8/TWIs=";
|
|
|
|
ldflags = let t = "github.com/prometheus/common/version"; in [
|
|
"-s"
|
|
"-w"
|
|
"-X ${t}.Version=${version}"
|
|
"-X ${t}.Branch=unknown"
|
|
"-X ${t}.BuildUser=nix@nixpkgs"
|
|
"-X ${t}.BuildDate=unknown"
|
|
];
|
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) nginx; };
|
|
|
|
meta = with lib; {
|
|
description = "NGINX Prometheus Exporter for NGINX and NGINX Plus";
|
|
mainProgram = "nginx-prometheus-exporter";
|
|
homepage = "https://github.com/nginxinc/nginx-prometheus-exporter";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ benley fpletz willibutz globin ];
|
|
};
|
|
}
|