f9fdf2d402
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
19 lines
770 B
Nix
19 lines
770 B
Nix
{ appleDerivation, xcbuildHook, xpc, dtrace, xnu }:
|
|
|
|
appleDerivation {
|
|
nativeBuildInputs = [ xcbuildHook dtrace ];
|
|
# buildInputs = [ Foundation xpc darling ];
|
|
buildInputs = [ xpc xnu ];
|
|
|
|
xcbuildFlags = [ "-target" "Security_frameworks_osx" ];
|
|
|
|
# env.NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers";
|
|
|
|
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
|
|
'';
|
|
}
|