diff options
author | Ryan Burns <rtburns@protonmail.com> | 2020-09-23 18:54:41 -0700 |
---|---|---|
committer | Ryan Burns <rtburns@protonmail.com> | 2020-09-24 02:09:20 -0700 |
commit | 00bf15f23c6d8e2f79dcd0a9f607065e6f0d9fab (patch) | |
tree | 857d43ca7f7a38bdb6e5b04091f3915ab9a9db34 /pkgs/tools/system/pciutils | |
parent | 5f9475d3ef2ce6aacb3fc568b1f212a8c84239da (diff) |
pciutils: fix build on darwin
Add IOKit to macOS prereqs, and patch Makefile to use $CC
Diffstat (limited to 'pkgs/tools/system/pciutils')
-rw-r--r-- | pkgs/tools/system/pciutils/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index 1814d4b9765fe..cf6616417ed06 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, pkgconfig, zlib, kmod, which , static ? stdenv.targetPlatform.isStatic +, darwin ? null }: stdenv.mkDerivation rec { @@ -11,7 +12,12 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ zlib kmod which ]; + buildInputs = [ zlib kmod which ] ++ + stdenv.lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.IOKit; + + preConfigure = if stdenv.cc.isGNU then null else '' + substituteInPlace Makefile --replace 'CC=$(CROSS_COMPILE)gcc' "" + ''; makeFlags = [ "SHARED=${if static then "no" else "yes"}" |