Unverified Commit 6618142b authored by Franz Pletz's avatar Franz Pletz Committed by GitHub
Browse files

Merge pull request #198306 from cole-h/fixup-darwin-prometheus-node-exporter

parents 3c6a81eb 109714a9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -21,11 +21,6 @@ buildGoModule rec {
  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" ];

+0 −17
Original line number Diff line number Diff line
diff --git a/collector/powersupplyclass_darwin.go b/collector/powersupplyclass_darwin.go
index a070f64..01d7f18 100644
--- a/collector/powersupplyclass_darwin.go
+++ b/collector/powersupplyclass_darwin.go
@@ -18,9 +18,11 @@ package collector
 
 /*
 #cgo LDFLAGS: -framework IOKit -framework CoreFoundation
+#include <CoreFoundation/CFNumber.h>
+#include <CoreFoundation/CFRunLoop.h>
+#include <CoreFoundation/CFString.h>
 #include <IOKit/ps/IOPowerSources.h>
 #include <IOKit/ps/IOPSKeys.h>
-#include <CoreFoundation/CFArray.h>
 
 // values collected from IOKit Power Source APIs
 // Functions documentation available at