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

buildGoModule rec {
  pname = "idrac_exporter";
  version = "unstable-2023-06-29";

  src = fetchFromGitHub {
    owner = "mrlhansen";
    repo = "idrac_exporter";
    rev = "3b311e0e6d602fb0938267287f425f341fbf11da";
    sha256 = "sha256-N8wSjQE25TCXg/+JTsvQk3fjTBgfXTiSGHwZWFDmFKc=";
  };

  vendorHash = "sha256-iNV4VrdQONq7LXwAc6AaUROHy8TmmloUAL8EmuPtF/o=";

  patches = [ ./idrac-exporter/config-from-environment.patch ];

  ldflags = [ "-s" "-w" ];

  doCheck = true;

  passthru.tests = { inherit (nixosTests.prometheus-exporters) idrac; };

  meta = with lib; {
    inherit (src.meta) homepage;
    description = "Simple iDRAC exporter for Prometheus";
    license = licenses.mit;
    maintainers = with maintainers; [ codec ];
  };
}