1 { lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests, darwin }:
4 pname = "node_exporter";
8 src = fetchFromGitHub {
11 repo = "node_exporter";
12 hash = "sha256-b2uior67RcCCpUE+qx55G1eWiT2wWDVsnosSH9fd3/I=";
15 vendorHash = "sha256-sly8AJk+jNZG8ijTBF1Pd5AOOUJJxIG8jHwBUdlt8fM=";
17 # FIXME: tests fail due to read-only nix store
20 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreFoundation IOKit ]);
22 excludedPackages = [ "docs/node-mixin" ];
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"
34 passthru.tests = { inherit (nixosTests.prometheus-exporters) node; };
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 ];