2017-07-08 12:03:21 +01:00
|
|
|
{ IOKit, appleDerivation, apple_sdk, libauto, libobjc, libsecurity_codesigning, sqlite, stdenv, osx_private_sdk }:
|
2015-06-22 04:29:33 +01:00
|
|
|
appleDerivation {
|
|
|
|
buildInputs = [
|
|
|
|
libauto
|
|
|
|
libobjc
|
|
|
|
IOKit
|
2018-04-09 04:40:59 +01:00
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
2015-06-22 04:29:33 +01:00
|
|
|
sqlite
|
|
|
|
apple_sdk.frameworks.PCSC
|
|
|
|
];
|
2018-04-09 04:40:59 +01:00
|
|
|
NIX_LDFLAGS = "-framework PCSC";
|
2015-06-22 04:29:33 +01:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace lib/errors.h --replace \
|
|
|
|
'<CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>' \
|
|
|
|
'"MacTypes.h"'
|
|
|
|
substituteInPlace lib/debugging.cpp --replace PATH_MAX 1024
|
|
|
|
substituteInPlace lib/superblob.h --replace 'result->at' 'result->template at'
|
|
|
|
substituteInPlace lib/ccaudit.cpp --replace '<bsm/libbsm.h>' '"bsm/libbsm.h"'
|
2015-11-13 02:59:17 +00:00
|
|
|
substituteInPlace lib/powerwatch.h --replace \
|
|
|
|
'<IOKit/pwr_mgt/IOPMLibPrivate.h>' \
|
2017-07-08 12:03:21 +01:00
|
|
|
'"${IOKit}/Library/Frameworks/IOKit.framework/Headers/pwr_mgt/IOPMLibPrivate.h"'
|
2017-10-30 12:45:36 +00:00
|
|
|
cp -R ${osx_private_sdk}/include/bsm lib
|
|
|
|
cp ${osx_private_sdk}/include/utilities_dtrace.h lib
|
2015-06-22 04:29:33 +01:00
|
|
|
'' + stdenv.lib.optionalString (!stdenv.cc.nativeLibc) ''
|
|
|
|
substituteInPlace lib/vproc++.cpp --replace /usr/local/include/vproc_priv.h ${stdenv.libc}/include/vproc_priv.h
|
|
|
|
'';
|
|
|
|
}
|