2019-02-07 01:13:51 +00:00
|
|
|
{ stdenv, appleDerivation, xcbuildHook, Foundation, xpc, darling, dtrace, xnu }:
|
2015-02-08 06:53:52 +00:00
|
|
|
|
|
|
|
appleDerivation {
|
2019-02-07 01:13:51 +00:00
|
|
|
nativeBuildInputs = [ xcbuildHook dtrace ];
|
|
|
|
# buildInputs = [ Foundation xpc darling ];
|
|
|
|
buildInputs = [ xpc xnu ];
|
2015-02-08 06:53:52 +00:00
|
|
|
|
2019-02-07 01:13:51 +00:00
|
|
|
xcbuildFlags = "-target Security_frameworks_osx";
|
2015-02-08 06:53:52 +00:00
|
|
|
|
2019-02-07 01:13:51 +00:00
|
|
|
# NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers";
|
2015-02-08 06:53:52 +00:00
|
|
|
|
2019-02-07 01:13:51 +00:00
|
|
|
preBuild = ''
|
|
|
|
dtrace -h -C -s OSX/libsecurity_utilities/lib/security_utilities.d -o OSX/libsecurity_utilities/lib/utilities_dtrace.h
|
2015-02-08 06:53:52 +00:00
|
|
|
|
2019-02-07 01:13:51 +00:00
|
|
|
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
|
2015-02-08 06:53:52 +00:00
|
|
|
'';
|
|
|
|
}
|