jql: 8.0.0 -> 8.0.2 (#362884)
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / ipmi-exporter.nix
blob9432dcd839b1dd221c3fa6f0a509a07f24f7a5d1
2   lib,
3   buildGoModule,
4   fetchFromGitHub,
5   nixosTests,
6   makeWrapper,
7   freeipmi,
8 }:
10 buildGoModule rec {
11   pname = "ipmi_exporter";
12   version = "1.9.0";
14   src = fetchFromGitHub {
15     owner = "prometheus-community";
16     repo = "ipmi_exporter";
17     rev = "v${version}";
18     hash = "sha256-0JNt3XbXGbAfaBQ13X/vrBhhN39hY4kwoBQ9obxsAd0=";
19   };
21   vendorHash = "sha256-dUf++LhoKWJxQfu9Latr8mCkeid5EAi+6yRdWDkTeP8=";
23   nativeBuildInputs = [ makeWrapper ];
25   postInstall = ''
26     wrapProgram $out/bin/ipmi_exporter --prefix PATH : ${lib.makeBinPath [ freeipmi ]}
27   '';
29   passthru.tests = { inherit (nixosTests.prometheus-exporters) ipmi; };
31   ldflags = [
32     "-s"
33     "-w"
34     "-X github.com/prometheus/common/version.Version=${version}"
35     "-X github.com/prometheus/common/version.Revision=0000000"
36     "-X github.com/prometheus/common/version.Branch=unknown"
37     "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
38     "-X github.com/prometheus/common/version.BuildDate=unknown"
39   ];
41   meta = with lib; {
42     description = "IPMI exporter for Prometheus";
43     mainProgram = "ipmi_exporter";
44     homepage = "https://github.com/prometheus-community/ipmi_exporter";
45     changelog = "https://github.com/prometheus-community/ipmi_exporter/blob/${src.rev}/CHANGELOG.md";
46     license = licenses.mit;
47     maintainers = with maintainers; [ snaar ];
48   };