Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / zfs-exporter.nix
blob3ba1402dc7a999bbf14608239c5f0020ba90f9c0
1 { buildGoModule
2 , lib
3 , fetchFromGitHub
4 }:
6 buildGoModule rec {
7   pname = "zfs_exporter";
8   version = "2.3.4";
10   src = fetchFromGitHub {
11     owner = "pdf";
12     repo = pname;
13     rev = "v" + version;
14     hash = "sha256-wPahjWTZLt5GapkOmGdGSicAmSGte2BHf6zZBHd7D3g=";
15   };
17   vendorHash = "sha256-EUeP7ysMnFeQO8Gaxhhonxk40cUv04MSiEDsaEcjTuM=";
19   ldflags = [
20     "-s"
21     "-w"
22     "-X github.com/prometheus/common/version.Version=${version}"
23     "-X github.com/prometheus/common/version.Revision=unknown"
24     "-X github.com/prometheus/common/version.Branch=unknown"
25     "-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
26     "-X github.com/prometheus/common/version.BuildDate=unknown"
27   ];
29   postInstall = ''
30     install -Dm444 -t $out/share/doc/${pname} *.md
31   '';
33   meta = with lib; {
34     description = "ZFS Exporter for the Prometheus monitoring system";
35     mainProgram = "zfs_exporter";
36     homepage = "https://github.com/pdf/zfs_exporter";
37     license = licenses.mit;
38     maintainers = with maintainers; [ peterhoeg ];
39   };