Matthew Bauer 8505e710e7 Revert "darwin 10.12 commits"
Reverts commits bumping to macOS stuff to 10.12:

commit ec1f78d1cb6ac86743ffb797bf88d4633b91e733.
commit d0dc91d24f643ca2cb6901f80a641099db975966.
commit a1d297374df55c30b8b74834a85924e9dc739dda.
commit 425112151db3b05fec01e86cb10c90b4037e9367.
commit e6f7f2928f668262577125290dc90ad8df12e724.
2019-01-03 15:20:26 -06:00

29 lines
1.1 KiB
Nix

{ IOKit, appleDerivation, apple_sdk, libauto, libobjc, sqlite, stdenv, osx_private_sdk }:
appleDerivation {
buildInputs = [
libauto
libobjc
IOKit
];
propagatedBuildInputs = [
sqlite
apple_sdk.frameworks.PCSC
];
NIX_LDFLAGS = "-framework PCSC";
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"'
substituteInPlace lib/powerwatch.h --replace \
'<IOKit/pwr_mgt/IOPMLibPrivate.h>' \
'"${IOKit}/Library/Frameworks/IOKit.framework/Headers/pwr_mgt/IOPMLibPrivate.h"'
cp -R ${osx_private_sdk}/include/bsm lib
cp ${osx_private_sdk}/include/utilities_dtrace.h lib
'' + stdenv.lib.optionalString (!stdenv.cc.nativeLibc) ''
substituteInPlace lib/vproc++.cpp --replace /usr/local/include/vproc_priv.h ${stdenv.libc}/include/vproc_priv.h
'';
}