biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / by-name / pr / prometheus-node-exporter / package.nix
blob5f1e9c50cc6bf439721d05451e797613f4076085
1 { lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests, darwin }:
3 buildGoModule rec {
4   pname = "node_exporter";
5   version = "1.8.2";
6   rev = "v${version}";
8   src = fetchFromGitHub {
9     inherit rev;
10     owner = "prometheus";
11     repo = "node_exporter";
12     hash = "sha256-b2uior67RcCCpUE+qx55G1eWiT2wWDVsnosSH9fd3/I=";
13   };
15   vendorHash = "sha256-sly8AJk+jNZG8ijTBF1Pd5AOOUJJxIG8jHwBUdlt8fM=";
17   # FIXME: tests fail due to read-only nix store
18   doCheck = false;
20   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation IOKit ]);
22   excludedPackages = [ "docs/node-mixin" ];
24   ldflags = [
25     "-s"
26     "-w"
27     "-X github.com/prometheus/common/version.Version=${version}"
28     "-X github.com/prometheus/common/version.Revision=${rev}"
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"
32   ];
34   passthru.tests = { inherit (nixosTests.prometheus-exporters) node; };
36   meta = with lib; {
37     description = "Prometheus exporter for machine metrics";
38     mainProgram = "node_exporter";
39     homepage = "https://github.com/prometheus/node_exporter";
40     changelog = "https://github.com/prometheus/node_exporter/blob/v${version}/CHANGELOG.md";
41     license = licenses.asl20;
42     maintainers = with maintainers; [ benley fpletz globin Frostman ];
43   };