about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/monitoring/prometheus/nginx-exporter.nix
blob: b846cc336bfcd437226e0e34800a1e8f89164562 (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
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:

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

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

  vendorHash = "sha256-VkatDZerLKnfbNFtnjklkE3TLY57uO1WUGa/p5tAXSQ=";

  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";
    homepage = "https://github.com/nginxinc/nginx-prometheus-exporter";
    license = licenses.asl20;
    maintainers = with maintainers; [ benley fpletz willibutz globin ];
  };
}