diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix b/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix index 7d40e919773d..0da2bb604a0b 100644 --- a/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix +++ b/nixpkgs/pkgs/servers/monitoring/prometheus/node-exporter.nix @@ -1,4 +1,7 @@ -{ lib, buildGoModule, fetchFromGitHub, nixosTests }: +{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests + # darwin + , CoreFoundation, IOKit +}: buildGoModule rec { pname = "node_exporter"; @@ -17,6 +20,13 @@ buildGoModule rec { # FIXME: tests fail due to read-only nix store doCheck = false; + buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation IOKit ]; + # upstream currently doesn't work with the version of the macOS SDK + # we're building against in nix-darwin without a patch. + # this patch has been submitted upstream at https://github.com/prometheus/node_exporter/pull/2327 + # and only needs to be carried until it lands in a new release. + patches = lib.optionals stdenv.isDarwin [ ./node-exporter/node-exporter-darwin.patch ]; + excludedPackages = [ "docs/node-mixin" ]; ldflags = [ |