From a7f09b201e85f3f30a83eb57751dda29d2aa1003 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 15 Oct 2015 20:49:29 -0700 Subject: [PATCH] fix filepaths for darwin.security_tool --- pkgs/os-specific/darwin/apple-sdk/default.nix | 2 +- .../libsecurity_apple_csp/default.nix | 2 +- .../libsecurity_filedb/default.nix | 2 +- .../libsecurity_generic/default.nix | 2 +- .../libsecurity_keychain/default.nix | 16 ++++++++-------- .../libsecurity_utilities/default.nix | 6 +++--- .../os-specific/darwin/security-tool/default.nix | 12 +++++++++--- pkgs/top-level/all-packages.nix | 4 +++- 8 files changed, 27 insertions(+), 19 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 59a816e9b943..ff2d8b590b22 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -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 ]; }); diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix index add46454cbe7..04b1e2f21fe1 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix @@ -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 diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix index 86cc2a390db6..0234cbc62792 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix @@ -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 '' '"${apple_sdk.sdk}/include/sandbox.h"' substituteInPlace lib/AtomicFile.cpp --replace '' '"sandbox_private.h"' ''; diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix index a94b9b455ef9..4a739032e2ae 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix @@ -10,7 +10,7 @@ name: version: sha256: args: let patchPhase = '' # allows including - 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 \ diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix index de97950b765e..34a2a49ea0e4 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix @@ -15,25 +15,25 @@ appleDerivation { ]; patchPhase = '' substituteInPlace lib/Keychains.cpp --replace DLDbListCFPref.h DLDBListCFPref.h - + substituteInPlace lib/SecCertificate.cpp --replace '#include ' "" - - 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 \ '' \ '"${apple_sdk.sdk}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"' - + substituteInPlace lib/CertificateValues.cpp --replace \ '#include ' "" - + substituteInPlace lib/DLDBListCFPref.cpp --replace \ 'dispatch_once_t AppSandboxChecked;' ''$'namespace Security {\ndispatch_once_t AppSandboxChecked;' \ --replace 'return mLoginDLDbIdentifier;' 'return mLoginDLDbIdentifier; }' \ diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix index 8cc74e2210f9..23ac246b4afa 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix @@ -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"' - - 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 ''; diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index 7cff4fc3eef4..f0877aa3404e 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -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 \ '' \ @@ -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" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c1362445f155..cf40adb5c7ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };