2022-08-08 13:53:49 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "zfs_exporter";
|
2023-10-14 11:39:22 +00:00
|
|
|
version = "2.3.2";
|
2022-08-08 13:53:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pdf";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v" + version;
|
2023-10-14 11:39:22 +00:00
|
|
|
hash = "sha256-JpLrCkPg0vVR0bKKHY5qf1/OD+O7yvWxS7kb7Yg3+c4=";
|
2022-08-08 13:53:49 +00:00
|
|
|
};
|
|
|
|
|
2023-10-14 11:39:22 +00:00
|
|
|
vendorHash = "sha256-uIilESEmAxANxFOy7qvYxlF/bId/Kqh4jUspNknlhlc=";
|
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";
|
|
|
|
homepage = "https://github.com/pdf/zfs_exporter";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
|
|
|
};
|
|
|
|
}
|