fix filepaths for darwin.security_tool
This commit is contained in:
parent
c7cc743b52
commit
a7f09b201e
@ -148,7 +148,7 @@ in rec {
|
||||
};
|
||||
|
||||
overrides = super: {
|
||||
AppKit = stdenv.lib.overrideDerivation super.AppKit (drv: {
|
||||
CoreText = stdenv.lib.overrideDerivation super.CoreText (drv: {
|
||||
propagatedNativeBuildInputs = drv.propagatedNativeBuildInputs ++ [ pkgs.darwin.cf-private ];
|
||||
});
|
||||
|
||||
|
@ -19,7 +19,7 @@ appleDerivation {
|
||||
for file in lib/castContext.h lib/gladmanContext.h lib/desContext.h lib/rc4Context.h; do
|
||||
substituteInPlace ''$file --replace \
|
||||
'/usr/local/include/CommonCrypto/CommonCryptorSPI.h' \
|
||||
'${osx_private_sdk}/usr/include/CommonCrypto/CommonCryptorSPI.h'
|
||||
'${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/usr/include/CommonCrypto/CommonCryptorSPI.h'
|
||||
done
|
||||
|
||||
substituteInPlace lib/opensshWrap.cpp --replace RSA_DSA_Keys.h RSA_DSA_keys.h
|
||||
|
@ -6,7 +6,7 @@ appleDerivation {
|
||||
libsecurity_cdsa_plugin
|
||||
];
|
||||
patchPhase = ''
|
||||
cp ${osx_private_sdk}/usr/local/include/sandbox_private.h .
|
||||
cp ${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/usr/local/include/sandbox_private.h .
|
||||
substituteInPlace sandbox_private.h --replace '<sandbox.h>' '"${apple_sdk.sdk}/include/sandbox.h"'
|
||||
substituteInPlace lib/AtomicFile.cpp --replace '<sandbox.h>' '"sandbox_private.h"'
|
||||
'';
|
||||
|
@ -10,7 +10,7 @@ name: version: sha256: args: let
|
||||
|
||||
patchPhase = ''
|
||||
# allows including <Security/some-private-header.h>
|
||||
ln -s ${pkgs.darwin.osx_private_sdk}/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security
|
||||
ln -s ${pkgs.darwin.osx_private_sdk}/PrivateSDK10.9.sparse.sdk/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security
|
||||
|
||||
grep -Rl MacErrors.h . | while read file; do
|
||||
substituteInPlace "''$file" --replace \
|
||||
|
@ -15,25 +15,25 @@ appleDerivation {
|
||||
];
|
||||
patchPhase = ''
|
||||
substituteInPlace lib/Keychains.cpp --replace DLDbListCFPref.h DLDBListCFPref.h
|
||||
|
||||
|
||||
substituteInPlace lib/SecCertificate.cpp --replace '#include <Security/SecCertificatePriv.h>' ""
|
||||
|
||||
cp ${osx_private_sdk}/usr/include/xpc/private.h xpc
|
||||
|
||||
cp ${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/usr/include/xpc/private.h xpc
|
||||
cp ${apple_sdk.sdk}/include/xpc/*.h xpc
|
||||
cp ${osx_private_sdk}/usr/local/include/sandbox_private.h lib/sandbox.h
|
||||
|
||||
cp ${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/usr/local/include/sandbox_private.h lib/sandbox.h
|
||||
|
||||
substituteInPlace lib/SecItemPriv.h \
|
||||
--replace "extern CFTypeRef kSecAttrAccessGroup" "extern const CFTypeRef kSecAttrAccessGroup" \
|
||||
--replace "extern CFTypeRef kSecAttrIsSensitive" "extern const CFTypeRef kSecAttrIsSensitive" \
|
||||
--replace "extern CFTypeRef kSecAttrIsExtractable" "extern const CFTypeRef kSecAttrIsExtractable"
|
||||
|
||||
|
||||
substituteInPlace lib/Keychains.cpp --replace \
|
||||
'<CoreServices/../Frameworks/CarbonCore.framework/Headers/MacErrors.h>' \
|
||||
'"${apple_sdk.sdk}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"'
|
||||
|
||||
|
||||
substituteInPlace lib/CertificateValues.cpp --replace \
|
||||
'#include <Security/SecCertificatePriv.h>' ""
|
||||
|
||||
|
||||
substituteInPlace lib/DLDBListCFPref.cpp --replace \
|
||||
'dispatch_once_t AppSandboxChecked;' ''$'namespace Security {\ndispatch_once_t AppSandboxChecked;' \
|
||||
--replace 'return mLoginDLDbIdentifier;' 'return mLoginDLDbIdentifier; }' \
|
||||
|
@ -14,9 +14,9 @@ appleDerivation {
|
||||
substituteInPlace lib/debugging.cpp --replace PATH_MAX 1024
|
||||
substituteInPlace lib/superblob.h --replace 'result->at' 'result->template at'
|
||||
substituteInPlace lib/ccaudit.cpp --replace '<bsm/libbsm.h>' '"bsm/libbsm.h"'
|
||||
|
||||
cp ${osx_private_sdk}/usr/include/security_utilities/utilities_dtrace.h lib
|
||||
cp -R ${osx_private_sdk}/usr/local/include/bsm lib
|
||||
|
||||
cp ${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/usr/include/security_utilities/utilities_dtrace.h lib
|
||||
cp -R ${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/usr/local/include/bsm lib
|
||||
'' + stdenv.lib.optionalString (!stdenv.cc.nativeLibc) ''
|
||||
substituteInPlace lib/vproc++.cpp --replace /usr/local/include/vproc_priv.h ${stdenv.libc}/include/vproc_priv.h
|
||||
'';
|
||||
|
@ -1,4 +1,10 @@
|
||||
{ CoreServices, Foundation, PCSC, Security, GSS, Kerberos, makeWrapper, apple_sdk, fetchurl, gnustep-make, libobjc, libsecurity_apple_csp, libsecurity_apple_cspdl, libsecurity_apple_file_dl, libsecurity_apple_x509_cl, libsecurity_apple_x509_tp, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_cssm, libsecurity_filedb, libsecurity_keychain, libsecurity_mds, libsecurity_pkcs12, libsecurity_sd_cspdl, libsecurity_utilities, libsecurityd, osx_private_sdk, stdenv }:
|
||||
{ CoreServices, Foundation, PCSC, Security, GSS, Kerberos, makeWrapper, apple_sdk,
|
||||
fetchurl, gnustep-make, libobjc, libsecurity_apple_csp, libsecurity_apple_cspdl,
|
||||
libsecurity_apple_file_dl, libsecurity_apple_x509_cl, libsecurity_apple_x509_tp,
|
||||
libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin,
|
||||
libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_cssm, libsecurity_filedb,
|
||||
libsecurity_keychain, libsecurity_mds, libsecurity_pkcs12, libsecurity_sd_cspdl,
|
||||
libsecurity_utilities, libsecurityd, osx_private_sdk, Security-framework, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "55115";
|
||||
@ -11,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patchPhase = ''
|
||||
# copied from libsecurity_generic
|
||||
ln -s ${osx_private_sdk}/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security
|
||||
ln -s ${osx_private_sdk}/PrivateSDK10.9.sparse.sdk/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security
|
||||
|
||||
substituteInPlace cmsutil.c --replace \
|
||||
'<CoreServices/../Frameworks/CarbonCore.framework/Headers/MacErrors.h>' \
|
||||
@ -39,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||
"security_INSTALL_DIR=\$(out)/bin"
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ GSS Kerberos Security PCSC Foundation ];
|
||||
propagatedBuildInputs = [ GSS Kerberos Security-framework PCSC Foundation ];
|
||||
|
||||
__propagatedImpureHostDeps = [ "/System/Library/Keychains" ];
|
||||
|
||||
|
@ -9527,7 +9527,9 @@ let
|
||||
osx_sdk = callPackage ../os-specific/darwin/osx-sdk {};
|
||||
osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk {};
|
||||
|
||||
security_tool = (newScope (darwin.apple_sdk.frameworks // darwin)) ../os-specific/darwin/security-tool { };
|
||||
security_tool = (newScope (darwin.apple_sdk.frameworks // darwin)) ../os-specific/darwin/security-tool {
|
||||
Security-framework = darwin.apple_sdk.frameworks.Security;
|
||||
};
|
||||
|
||||
binutils = callPackage ../os-specific/darwin/binutils { inherit cctools; };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user