pciutils: fix build on darwin
Add IOKit to macOS prereqs, and patch Makefile to use $CC
This commit is contained in:
parent
5f9475d3ef
commit
00bf15f23c
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which
|
{ stdenv, fetchurl, pkgconfig, zlib, kmod, which
|
||||||
, static ? stdenv.targetPlatform.isStatic
|
, static ? stdenv.targetPlatform.isStatic
|
||||||
|
, darwin ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -11,7 +12,12 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
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 = [
|
makeFlags = [
|
||||||
"SHARED=${if static then "no" else "yes"}"
|
"SHARED=${if static then "no" else "yes"}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user