Merge pull request #98609 from r-burns/pciutils

pciutils: fix build on darwin
This commit is contained in:
Robert Scott 2020-09-25 19:43:51 +01:00 committed by GitHub
commit 5bb4508c5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"}"