depot/third_party/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

19 lines
766 B
Nix

{ appleDerivation, xcbuildHook, xpc, dtrace, xnu }:
appleDerivation {
nativeBuildInputs = [ xcbuildHook dtrace ];
# buildInputs = [ Foundation xpc darling ];
buildInputs = [ xpc xnu ];
xcbuildFlags = [ "-target" "Security_frameworks_osx" ];
# 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
'';
}