about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix
blob: a233b34a18d96c2730ec77bcd7e06b99a98243e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:

buildGoModule rec {
  pname = "nginx_exporter";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "nginxinc";
    repo = "nginx-prometheus-exporter";
    rev = "v${version}";
    sha256 = "sha256-wLLHhbIA4jPgXtVIP6ycxgXfULODngPSpV3rZpJFSjI=";
  };

  vendorHash = "sha256-pMof9Wr6GrH5N97C4VNG2ELtZ6C6ruq5ylMwByotrP0=";

  ldflags = [ "-s" "-w" "-X main.version=${version}" ];

  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 ];
  };
}