about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/monitoring/prometheus/openldap-exporter.nix
blob: 49181699d65a75cde987e5b6e6ff088d49a3f94b (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
28
29
30
31
{ lib, buildGoModule, fetchFromGitHub }:

buildGoModule rec {
  pname = "openldap_exporter";
  version = "2.2.2";

  src = fetchFromGitHub {
    owner = "tomcz";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-1u+89odwV/lz34wtrK91lET2bOqkH6kRA7JCjzsmiEg=";
  };

  vendorHash = null;

  ldflags = [
    "-s"
    "-w"
    "-X github.com/tomcz/openldap_exporter.tag=v${version}"
    "-X github.com/tomcz/openldap_exporter.commit=unknown"
  ];


  meta = with lib; {
    homepage = "https://github.com/tomcz/openldap_exporter";
    description = "Simple service that scrapes metrics from OpenLDAP and exports them via HTTP for Prometheus consumption";
    mainProgram = "openldap_exporter";
    license = licenses.mit;
    maintainers = with maintainers; [ ma27 ];
  };
}