nixpkgs/pkgs/servers/monitoring/prometheus/ipmi-exporter.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

43 lines
1.3 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests, makeWrapper, freeipmi }:
buildGoModule rec {
pname = "ipmi_exporter";
version = "1.8.0";
src = fetchFromGitHub {
owner = "prometheus-community";
repo = "ipmi_exporter";
rev = "v${version}";
hash = "sha256-ZF5mBjq+IhSQrQ1dUfHlfyUMK2dkpZ5gu9djPkUYvRQ=";
};
vendorHash = "sha256-q5MFAvFCrr24b1VO0Z03C08CGd+0pUerXZEKiu4r7cE=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ipmi_exporter --prefix PATH : ${lib.makeBinPath [ freeipmi ]}
'';
passthru.tests = { inherit (nixosTests.prometheus-exporters) ipmi; };
ldflags = [
"-s"
"-w"
"-X github.com/prometheus/common/version.Version=${version}"
"-X github.com/prometheus/common/version.Revision=0000000"
"-X github.com/prometheus/common/version.Branch=unknown"
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
"-X github.com/prometheus/common/version.BuildDate=unknown"
];
meta = with lib; {
description = "IPMI exporter for Prometheus";
mainProgram = "ipmi_exporter";
homepage = "https://github.com/prometheus-community/ipmi_exporter";
changelog = "https://github.com/prometheus-community/ipmi_exporter/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ snaar ];
};
}