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

authored by Franz Pletz and committed by GitHub 6618142b 3c6a81eb

-22
-5
pkgs/servers/monitoring/prometheus/node-exporter.nix
··· 21 21 doCheck = false; 22 22 23 23 buildInputs = lib.optionals stdenv.isDarwin [ CoreFoundation IOKit ]; 24 - # upstream currently doesn't work with the version of the macOS SDK 25 - # we're building against in nix-darwin without a patch. 26 - # this patch has been submitted upstream at https://github.com/prometheus/node_exporter/pull/2327 27 - # and only needs to be carried until it lands in a new release. 28 - patches = lib.optionals stdenv.isDarwin [ ./node-exporter/node-exporter-darwin.patch ]; 29 24 30 25 excludedPackages = [ "docs/node-mixin" ]; 31 26
-17
pkgs/servers/monitoring/prometheus/node-exporter/node-exporter-darwin.patch
··· 1 - diff --git a/collector/powersupplyclass_darwin.go b/collector/powersupplyclass_darwin.go 2 - index a070f64..01d7f18 100644 3 - --- a/collector/powersupplyclass_darwin.go 4 - +++ b/collector/powersupplyclass_darwin.go 5 - @@ -18,9 +18,11 @@ package collector 6 - 7 - /* 8 - #cgo LDFLAGS: -framework IOKit -framework CoreFoundation 9 - +#include <CoreFoundation/CFNumber.h> 10 - +#include <CoreFoundation/CFRunLoop.h> 11 - +#include <CoreFoundation/CFString.h> 12 - #include <IOKit/ps/IOPowerSources.h> 13 - #include <IOKit/ps/IOPSKeys.h> 14 - -#include <CoreFoundation/CFArray.h> 15 - 16 - // values collected from IOKit Power Source APIs 17 - // Functions documentation available at