2022-08-08 13:53:49 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "zfs_exporter";
|
2024-04-14 01:30:31 +00:00
|
|
|
version = "2.3.4";
|
2022-08-08 13:53:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pdf";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v" + version;
|
2024-04-14 01:30:31 +00:00
|
|
|
hash = "sha256-wPahjWTZLt5GapkOmGdGSicAmSGte2BHf6zZBHd7D3g=";
|
2022-08-08 13:53:49 +00:00
|
|
|
};
|
|
|
|
|
2024-04-14 01:30:31 +00:00
|
|
|
vendorHash = "sha256-EUeP7ysMnFeQO8Gaxhhonxk40cUv04MSiEDsaEcjTuM=";
|
2022-08-08 13:53:49 +00:00
|
|
|
|
2023-12-10 10:44:49 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/prometheus/common/version.Version=${version}"
|
|
|
|
"-X github.com/prometheus/common/version.Revision=unknown"
|
|
|
|
"-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"
|
|
|
|
];
|
|
|
|
|
2022-08-08 13:53:49 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 -t $out/share/doc/${pname} *.md
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "ZFS Exporter for the Prometheus monitoring system";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "zfs_exporter";
|
2022-08-08 13:53:49 +00:00
|
|
|
homepage = "https://github.com/pdf/zfs_exporter";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|