1 { lib, buildGoModule, fetchFromGitHub, nixosTests, makeWrapper, freeipmi }:
4 pname = "ipmi_exporter";
7 src = fetchFromGitHub {
8 owner = "prometheus-community";
9 repo = "ipmi_exporter";
11 hash = "sha256-ZF5mBjq+IhSQrQ1dUfHlfyUMK2dkpZ5gu9djPkUYvRQ=";
14 vendorHash = "sha256-q5MFAvFCrr24b1VO0Z03C08CGd+0pUerXZEKiu4r7cE=";
16 nativeBuildInputs = [ makeWrapper ];
19 wrapProgram $out/bin/ipmi_exporter --prefix PATH : ${lib.makeBinPath [ freeipmi ]}
22 passthru.tests = { inherit (nixosTests.prometheus-exporters) ipmi; };
27 "-X github.com/prometheus/common/version.Version=${version}"
28 "-X github.com/prometheus/common/version.Revision=0000000"
29 "-X github.com/prometheus/common/version.Branch=unknown"
30 "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
31 "-X github.com/prometheus/common/version.BuildDate=unknown"
35 description = "IPMI exporter for Prometheus";
36 mainProgram = "ipmi_exporter";
37 homepage = "https://github.com/prometheus-community/ipmi_exporter";
38 changelog = "https://github.com/prometheus-community/ipmi_exporter/blob/${src.rev}/CHANGELOG.md";
39 license = licenses.mit;
40 maintainers = with maintainers; [ snaar ];