nixpkgs/pkgs/os-specific/darwin/apple-source-releases/security_systemkeychain/default.nix
Matthew Bauer 8505e710e7 Revert "darwin 10.12 commits"
Reverts commits bumping to macOS stuff to 10.12:

commit ec1f78d1cb.
commit d0dc91d24f.
commit a1d297374d.
commit 425112151d.
commit e6f7f2928f.
2019-01-03 15:20:26 -06:00

33 lines
1.0 KiB
Nix

{ appleDerivation, xcbuildHook, Security
, libsecurity_codesigning, libsecurity_utilities, libsecurity_cdsa_utilities
, xnu, osx_private_sdk, pcsclite}:
appleDerivation {
nativeBuildInputs = [ xcbuildHook ];
buildInputs = [ Security libsecurity_utilities
libsecurity_cdsa_utilities libsecurity_codesigning
pcsclite ];
NIX_LDFLAGS = "-lpcsclite";
# can't build the whole thing
xcbuildFlags = "-target codesign";
preBuild = ''
mkdir -p include/Security
cp ${osx_private_sdk.src}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/Security.framework/PrivateHeaders/*.h include/Security
cp ${osx_private_sdk.src}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/Security.framework/Headers/*.h include/Security
unpackFile ${xnu.src}
mkdir -p include/sys
cp -r xnu-*/bsd/sys/codesign.h include/sys/codesign.h
'';
NIX_CFLAGS_COMPILE = "-Iinclude";
installPhase = ''
mkdir -p $out/bin
cp Products/Release/codesign $out/bin/codesign
'';
}