2020-04-24 23:36:52 +00:00
|
|
|
{ appleDerivation, xcbuildHook, xpc, dtrace, xnu }:
|
|
|
|
|
|
|
|
appleDerivation {
|
|
|
|
nativeBuildInputs = [ xcbuildHook dtrace ];
|
|
|
|
# buildInputs = [ Foundation xpc darling ];
|
|
|
|
buildInputs = [ xpc xnu ];
|
|
|
|
|
|
|
|
xcbuildFlags = [ "-target" "Security_frameworks_osx" ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
# env.NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
dtrace -h -C -s OSX/libsecurity_utilities/lib/security_utilities.d -o OSX/libsecurity_utilities/lib/utilities_dtrace.h
|
|
|
|
|
|
|
|
xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target copyHeadersToSystem
|
|
|
|
NIX_CFLAGS_COMPILE+=" -F./Products/Release"
|
|
|
|
ln -s $PWD/Products/Release/Security.bundle/Contents $PWD/Products/Release/Security.framework
|
|
|
|
'';
|
|
|
|
}
|