From 43c72cb6afdf7625fa04b6218a116b4c3badf9d2 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sun, 21 Jun 2015 20:29:33 -0700 Subject: [PATCH 1/6] add security-tool --- .../build-managers/gnustep/make/default.nix | 31 +++++ .../build-managers/gnustep/xcode/default.nix | 23 ++++ pkgs/os-specific/darwin/apple-sdk/default.nix | 4 +- .../apple-source-releases/configd/default.nix | 2 + .../darwin/apple-source-releases/default.nix | 44 ++++-- .../apple-source-releases/libauto/default.nix | 7 +- .../libsecurity_apple_csp/GNUmakefile | 11 ++ .../libsecurity_apple_csp/default.nix | 31 +++++ .../libsecurity_apple_cspdl/GNUmakefile | 10 ++ .../libsecurity_apple_cspdl/default.nix | 16 +++ .../libsecurity_apple_file_dl/GNUmakefile | 10 ++ .../libsecurity_apple_file_dl/default.nix | 17 +++ .../libsecurity_apple_x509_cl/GNUmakefile | 10 ++ .../libsecurity_apple_x509_cl/default.nix | 18 +++ .../libsecurity_apple_x509_tp/GNUmakefile | 10 ++ .../libsecurity_apple_x509_tp/default.nix | 19 +++ .../libsecurity_asn1/GNUmakefile | 11 ++ .../libsecurity_asn1/default.nix | 14 ++ .../libsecurity_cdsa_client/GNUmakefile | 10 ++ .../libsecurity_cdsa_client/default.nix | 8 ++ .../libsecurity_cdsa_plugin/GNUmakefile | 10 ++ .../libsecurity_cdsa_plugin/default.nix | 15 ++ .../libsecurity_cdsa_utilities/GNUmakefile | 13 ++ .../libsecurity_cdsa_utilities/default.nix | 13 ++ .../handletemplates.patch | 19 +++ .../libsecurity_cdsa_utils/GNUmakefile | 13 ++ .../libsecurity_cdsa_utils/default.nix | 8 ++ .../libsecurity_codesigning/GNUmakefile | 10 ++ .../libsecurity_codesigning/default.nix | 7 + .../libsecurity_cssm/GNUmakefile | 11 ++ .../libsecurity_cssm/default.nix | 14 ++ .../libsecurity_filedb/GNUmakefile | 10 ++ .../libsecurity_filedb/default.nix | 13 ++ .../libsecurity_generic/default.nix | 58 ++++++++ .../libsecurity_generic/impure_deps.nix | 129 ++++++++++++++++++ .../libsecurity_keychain/GNUmakefile | 10 ++ .../libsecurity_keychain/default.nix | 47 +++++++ .../libsecurity_mds/GNUmakefile | 10 ++ .../libsecurity_mds/default.nix | 11 ++ .../libsecurity_ocspd/GNUmakefile | 10 ++ .../libsecurity_ocspd/default.nix | 20 +++ .../libsecurity_pkcs12/GNUmakefile | 11 ++ .../libsecurity_pkcs12/default.nix | 15 ++ .../libsecurity_sd_cspdl/GNUmakefile | 10 ++ .../libsecurity_sd_cspdl/default.nix | 10 ++ .../libsecurity_utilities/GNUmakefile | 11 ++ .../libsecurity_utilities/default.nix | 23 ++++ .../libsecurityd/GNUmakefile | 11 ++ .../libsecurityd/default.nix | 23 ++++ .../libsecurityd/xdr-arity.patch | 79 +++++++++++ .../security_dotmac_tp/GNUmakefile | 8 ++ .../security_dotmac_tp/default.nix | 4 + .../darwin/osx-private-sdk/default.nix | 46 ++----- pkgs/os-specific/darwin/osx-sdk/default.nix | 4 +- .../darwin/security-tool/GNUmakefile | 14 ++ .../darwin/security-tool/default.nix | 83 +++++++++-- .../darwin/security-tool/impure-deps.nix | 129 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 10 +- 58 files changed, 1186 insertions(+), 62 deletions(-) create mode 100644 pkgs/development/tools/build-managers/gnustep/make/default.nix create mode 100644 pkgs/development/tools/build-managers/gnustep/xcode/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/handletemplates.patch create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/impure_deps.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurityd/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurityd/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch create mode 100644 pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/GNUmakefile create mode 100644 pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/default.nix create mode 100644 pkgs/os-specific/darwin/security-tool/GNUmakefile create mode 100644 pkgs/os-specific/darwin/security-tool/impure-deps.nix diff --git a/pkgs/development/tools/build-managers/gnustep/make/default.nix b/pkgs/development/tools/build-managers/gnustep/make/default.nix new file mode 100644 index 000000000000..7fa9aad72dbe --- /dev/null +++ b/pkgs/development/tools/build-managers/gnustep/make/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "make-${version}"; + version = "1.0"; + + src = fetchurl { + url = "http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-make-2.6.6.tar.gz"; + sha256 = "07cqr8x17bia9w6clbmiv7ay6r9nplrjz2cyzinv4w7zfpc19vxw"; + }; + + patchPhase = '' + substituteInPlace GNUmakefile.in \ + --replace which type \ + --replace 'tooldir = $(DESTDIR)' 'tooldir = ' \ + --replace 'makedir = $(DESTDIR)' 'makedir = ' \ + --replace 'mandir = $(DESTDIR)' 'mandir = ' + + substituteInPlace FilesystemLayouts/apple \ + --replace /usr/local "" + ''; + + installFlags = "DESTDIR=$(out)"; + + postInstall = '' + mkdir -p $out/nix-support + cat >$out/nix-support/setup-hook <" ''$'#include \nstatic void msgtracer_log_with_keys(...) { };' diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/GNUmakefile new file mode 100644 index 000000000000..ca263228fde8 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/GNUmakefile @@ -0,0 +1,11 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_apple_csp + +security_apple_csp_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_apple_csp_HEADER_FILES_DIR = lib + +security_apple_csp_CC_FILES = $(wildcard lib/*.cpp) +security_apple_csp_C_FILES = $(wildcard lib/*.c) + +include $(GNUSTEP_MAKEFILES)/library.make 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 new file mode 100644 index 000000000000..add46454cbe7 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix @@ -0,0 +1,31 @@ +{ appleDerivation, apple_sdk, libsecurity_asn1, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_utilities, osx_private_sdk, stdenv }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_utilities + libsecurity_utilities + libsecurity_cdsa_plugin + libsecurity_asn1 + libsecurity_cdsa_utils + ]; + NIX_CFLAGS_COMPILE = "-Iopen_ssl"; + patchPhase = '' + for file in lib/BlockCryptor.h lib/RSA_DSA_signature.h lib/castContext.h \ + lib/RawSigner.h lib/MD2Object.h lib/HMACSHA1.h lib/bfContext.h lib/rc4Context.h; do + substituteInPlace ''$file --replace \ + '"CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h"' \ + '"${apple_sdk.sdk}/include/MacTypes.h"' + done + + 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' + done + + substituteInPlace lib/opensshWrap.cpp --replace RSA_DSA_Keys.h RSA_DSA_keys.h + '' + stdenv.lib.optionalString (!stdenv.cc.nativeLibc) '' + substituteInPlace lib/pbkdf2.c --replace \ + '' \ + '"${stdenv.libc}/include/ConditionalMacros.h"' + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/GNUmakefile new file mode 100644 index 000000000000..a0d48cf49650 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_apple_cspdl + +security_apple_cspdl_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_apple_cspdl_HEADER_FILES_DIR = lib + +security_apple_cspdl_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/default.nix new file mode 100644 index 000000000000..b80d4c8aad28 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/default.nix @@ -0,0 +1,16 @@ +{ appleDerivation, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_keychain, libsecurity_utilities, libsecurityd }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_plugin + libsecurity_cdsa_utilities + libsecurity_utilities + libsecurityd + libsecurity_cdsa_client + libsecurity_keychain + ]; + patchPhase = '' + for file in lib/*; do + sed -i 's/#include <\(.*\)>/#include "\1"/' ''$file + done + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/GNUmakefile new file mode 100644 index 000000000000..f52829c644da --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_apple_file_dl + +security_apple_file_dl_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_apple_file_dl_HEADER_FILES_DIR = lib + +security_apple_file_dl_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/default.nix new file mode 100644 index 000000000000..0eb2ee10fd84 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/default.nix @@ -0,0 +1,17 @@ +{ appleDerivation, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_filedb, libsecurity_keychain, libsecurity_utilities, libsecurityd }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_plugin + libsecurity_cdsa_utilities + libsecurity_utilities + libsecurityd + libsecurity_cdsa_client + libsecurity_keychain + libsecurity_filedb + ]; + patchPhase = '' + for file in lib/*; do + sed -i 's/#include <\(.*\)>/#include "\1"/' ''$file + done + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/GNUmakefile new file mode 100644 index 000000000000..c7c9c3d4e795 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_apple_x509_cl + +security_apple_x509_cl_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_apple_x509_cl_HEADER_FILES_DIR = lib + +security_apple_x509_cl_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/default.nix new file mode 100644 index 000000000000..d2f15e19ccf0 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/default.nix @@ -0,0 +1,18 @@ +{ appleDerivation, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_filedb, libsecurity_keychain, libsecurity_utilities, libsecurityd, osx_private_sdk }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_plugin + libsecurity_cdsa_utilities + libsecurity_utilities + libsecurityd + libsecurity_cdsa_client + libsecurity_keychain + libsecurity_filedb + libsecurity_asn1 + ]; + patchPhase = '' + for file in lib/*; do + sed -i 's/#include <\(.*\)>/#include "\1"/' ''$file + done + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/GNUmakefile new file mode 100644 index 000000000000..083a8a85d17d --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_apple_x509_tp + +security_apple_x509_tp_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_apple_x509_tp_HEADER_FILES_DIR = lib + +security_apple_x509_tp_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/default.nix new file mode 100644 index 000000000000..6410c134f89a --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/default.nix @@ -0,0 +1,19 @@ +{ appleDerivation, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_filedb, libsecurity_keychain, libsecurity_ocspd, libsecurity_utilities, libsecurityd }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_plugin + libsecurity_cdsa_utilities + libsecurity_utilities + libsecurityd + libsecurity_cdsa_client + libsecurity_keychain + libsecurity_filedb + libsecurity_asn1 + libsecurity_ocspd + ]; + patchPhase = '' + for file in lib/*; do + sed -i 's/#include <\(.*\)>/#include "\1"/' ''$file + done + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/GNUmakefile new file mode 100644 index 000000000000..1c3c4f0b25bf --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/GNUmakefile @@ -0,0 +1,11 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_asn1 + +security_asn1_C_FILES = $(wildcard lib/*.c) +security_asn1_CC_FILES = $(wildcard lib/*.cpp) + +security_asn1_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_asn1_HEADER_FILES_DIR = lib + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/default.nix new file mode 100644 index 000000000000..ab11d893d198 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/default.nix @@ -0,0 +1,14 @@ +{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_utilities, osx_private_sdk }: +appleDerivation { + __propagatedImpureHostDeps = [ + "/System/Library/Frameworks/Security.framework/Security" + "/System/Library/Frameworks/Security.framework/Resources" + "/System/Library/Frameworks/Security.framework/PlugIns" + "/System/Library/Frameworks/Security.framework/XPCServices" + "/System/Library/Frameworks/Security.framework/Versions" + ]; + propagatedBuildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + ]; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/GNUmakefile new file mode 100644 index 000000000000..91fb6bb679e5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_cdsa_client + +security_cdsa_client_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_cdsa_client_HEADER_FILES_DIR = lib + +security_cdsa_client_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/default.nix new file mode 100644 index 000000000000..2ecad568bf7e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/default.nix @@ -0,0 +1,8 @@ +{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_utilities, libsecurityd }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + libsecurityd + ]; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/GNUmakefile new file mode 100644 index 000000000000..9e1260f9b9c4 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_cdsa_plugin + +security_cdsa_plugin_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_cdsa_plugin_HEADER_FILES_DIR = lib + +security_cdsa_plugin_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/default.nix new file mode 100644 index 000000000000..b0c35f0e30c3 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/default.nix @@ -0,0 +1,15 @@ +{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_cssm, libsecurity_utilities, osx_private_sdk, perl }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_utilities + libsecurity_utilities + perl + ]; + patchPhase = '' + unpackFile ${libsecurity_cssm.src} + cp libsecurity_cssm*/lib/cssm{dli,aci,cli,cspi,tpi}.h lib + ''; + preBuild = '' + perl lib/generator.pl lib lib/generator.cfg lib lib || exit 1 + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/GNUmakefile new file mode 100644 index 000000000000..24bc1fe7e3af --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/GNUmakefile @@ -0,0 +1,13 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_cdsa_utilities + +security_cdsa_utilities_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_cdsa_utilities_HEADER_FILES_DIR = lib + +security_cdsa_utilities_CC_FILES = $(wildcard lib/*.cpp) lib/Schema.cpp lib/KeySchema.cpp + +lib/%.cpp: lib/%.m4 + m4 $< > $@ + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/default.nix new file mode 100644 index 000000000000..6f2436f21496 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/default.nix @@ -0,0 +1,13 @@ +{ CommonCrypto, appleDerivation, libsecurity_codesigning, libsecurity_utilities, m4, osx_private_sdk }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + m4 + ]; + patchPhase = '' + patch -p1 < ${./handletemplates.patch} + unpackFile ${libsecurity_codesigning.src} + mv libsecurity_codesigning*/lib security_codesigning + ''; + NIX_CFLAGS_COMPILE = "-I${CommonCrypto}/include/CommonCrypto"; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/handletemplates.patch b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/handletemplates.patch new file mode 100644 index 000000000000..e5a703b2a08f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/handletemplates.patch @@ -0,0 +1,19 @@ +--- a/lib/handletemplates.h 1969-12-31 16:00:01.000000000 -0800 ++++ b/lib/handletemplates.h 1969-12-31 16:00:01.000000000 -0800 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #if __GNUC__ > 2 + #include +@@ -129,7 +130,7 @@ + // @@@ Remove when 4003540 is fixed + template + static void findAllRefs(std::vector<_Handle> &refs) { +- state().findAllRefs(refs); ++ state().template findAllRefs(refs); + } + + protected: diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/GNUmakefile new file mode 100644 index 000000000000..7b5b7dc186a1 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/GNUmakefile @@ -0,0 +1,13 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_cdsa_utils + +security_cdsa_utils_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_cdsa_utils_HEADER_FILES_DIR = lib + +security_cdsa_utils_CC_FILES = $(wildcard lib/*.cpp) + +lib/%.cpp: lib/%.m4 + m4 $< > $@ + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/default.nix new file mode 100644 index 000000000000..d9b594bc47ca --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/default.nix @@ -0,0 +1,8 @@ +{ Security, appleDerivation, apple_sdk, cppcheck, libsecurity_cdsa_utilities, libsecurity_utilities, m4, osx_private_sdk }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + m4 + ]; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/GNUmakefile new file mode 100644 index 000000000000..e923b962c263 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_codesigning + +security_codesigning_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_codesigning_HEADER_FILES_DIR = lib + +security_codesigning_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/default.nix new file mode 100644 index 000000000000..c5ba9cc8d7ef --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/default.nix @@ -0,0 +1,7 @@ +{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_utilities }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + ]; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile new file mode 100644 index 000000000000..c7835aaa9b02 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile @@ -0,0 +1,11 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_cssm + +security_cssm_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_cssm_HEADER_FILES_DIR = lib + +security_cssm_CC_FILES = $(wildcard lib/*.cpp) +security_cssm_C_FILES = $(wildcard lib/*.c) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/default.nix new file mode 100644 index 000000000000..053dea134c72 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/default.nix @@ -0,0 +1,14 @@ +{ appleDerivation, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_codesigning, libsecurity_utilities, perl }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + libsecurity_cdsa_client + perl + libsecurity_cdsa_plugin + ]; + preBuild = '' + mkdir derived_src + perl lib/generator.pl lib lib/generator.cfg derived_src + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/GNUmakefile new file mode 100644 index 000000000000..4359810c56b3 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_filedb + +security_filedb_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_filedb_HEADER_FILES_DIR = lib + +security_filedb_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make 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 new file mode 100644 index 000000000000..86cc2a390db6 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix @@ -0,0 +1,13 @@ +{ appleDerivation, apple_sdk, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_utilities, osx_private_sdk }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + libsecurity_cdsa_plugin + ]; + patchPhase = '' + cp ${osx_private_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 new file mode 100644 index 000000000000..a94b9b455ef9 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix @@ -0,0 +1,58 @@ +{ appleDerivation_, applePackage, pkgs, stdenv }: +name: version: sha256: args: let + n = stdenv.lib.removePrefix "lib" name; + makeFile = ../. + builtins.toPath "/${name}/GNUmakefile"; + appleDerivation = appleDerivation_ name version sha256; + in applePackage name version sha256 (args // { + appleDerivation = a: + appleDerivation (stdenv.lib.mergeAttrsConcatenateValues { + __impureHostDeps = import ./impure_deps.nix; + + patchPhase = '' + # allows including + ln -s ${pkgs.darwin.osx_private_sdk}/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security + + grep -Rl MacErrors.h . | while read file; do + substituteInPlace "''$file" --replace \ + '' \ + '"${pkgs.darwin.apple_sdk.sdk}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"' + done || true # grep returns 1 if it can't find the string + + grep -Rl MacTypes.h . | while read file; do + substituteInPlace "''$file" --replace \ + '' \ + '"${pkgs.darwin.apple_sdk.sdk}/include/MacTypes.h"' + done || true # grep returns 1 if it can't find the string + ''; + preBuild = '' + ln -s lib ${n} + makeFlagsArray=(-j''$NIX_BUILD_CORES) + ''; + buildInputs = [ + pkgs.gnustep-make + ]; + makeFlags = [ + "-f${makeFile}" + "MAKEFILE_NAME=${makeFile}" + "GNUSTEP_ABSOLUTE_INSTALL_PATHS=yes" + "LIB_LINK_INSTALL_DIR=\$(out)/lib" + ]; + installFlags = [ + "${n}_INSTALL_DIR=\$(out)/lib" + "${n}_HEADER_FILES_INSTALL_DIR=\$(out)/include/${n}" + "GNUSTEP_HEADERS=" + ]; + NIX_CFLAGS_COMPILE = [ + "-isystem lib" + "-iframework ${pkgs.darwin.Security}/Library/Frameworks" + "-I." + "-Wno-deprecated-declarations" + ]; + NIX_LDFLAGS = with pkgs.darwin; with apple_sdk.frameworks; [ + "-L${libobjc}/lib" + "-F${Foundation}/Library/Frameworks" + "-F${AppKit}/Library/Frameworks" + "-no_dtrace_dof" + ]; + } a); + }) diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/impure_deps.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/impure_deps.nix new file mode 100644 index 000000000000..7725b9f3d1a2 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/impure_deps.nix @@ -0,0 +1,129 @@ +# generated using a ruby script +[ + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib" + "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis" + "/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox" + "/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit" + "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition" + "/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio" + "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth" + "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData" + "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation" + "/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit" + "/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText" + "/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo" + "/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN" + "/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration" + "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation" + "/System/Library/Frameworks/GSS.framework/Versions/A/GSS" + "/System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth" + "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit" + "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib" + "/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos" + "/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS" + "/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL" + "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory" + "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL" + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage" + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore" + "/System/Library/Frameworks/Security.framework/Versions/A/Security" + "/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation" + "/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement" + "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration" + "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211" + "/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG" + "/System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA" + "/System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup" + "/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary" + "/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth" + "/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication" + "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI" + "/System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi" + "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport" + "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" + "/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols" + "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" + "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore" + "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" + "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal" + "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" + "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" + "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport" + "/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth" + "/System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis" + "/System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices" + "/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing" + "/System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore" + "/System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication" + "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC" + "/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation" + "/System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity" + "/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport" + "/usr/lib/libCRFSuite.dylib" + "/usr/lib/libOpenScriptingUtil.dylib" + "/usr/lib/libarchive.2.dylib" + "/usr/lib/libbsm.0.dylib" + "/usr/lib/libbz2.1.0.dylib" + "/usr/lib/libc++.1.dylib" + "/usr/lib/libc++abi.dylib" + "/usr/lib/libcmph.dylib" + "/usr/lib/libcups.2.dylib" + "/usr/lib/libextension.dylib" + "/usr/lib/libheimdal-asn1.dylib" + "/usr/lib/libiconv.2.dylib" + "/usr/lib/libicucore.A.dylib" + "/usr/lib/liblangid.dylib" + "/usr/lib/liblzma.5.dylib" + "/usr/lib/libmecabra.dylib" + "/usr/lib/libpam.2.dylib" + "/usr/lib/libresolv.9.dylib" + "/usr/lib/libsqlite3.dylib" + "/usr/lib/libxar.1.dylib" + "/usr/lib/libxml2.2.dylib" + "/usr/lib/libxslt.1.dylib" + "/usr/lib/libz.1.dylib" +] diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/GNUmakefile new file mode 100644 index 000000000000..8830006f00e5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_keychain + +security_keychain_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_keychain_HEADER_FILES_DIR = lib + +security_keychain_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make 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 new file mode 100644 index 000000000000..de97950b765e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix @@ -0,0 +1,47 @@ +{ CF, Security, appleDerivation, apple_sdk, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_ocspd, libsecurity_pkcs12, libsecurity_utilities, libsecurityd, openssl, osx_private_sdk, security_dotmac_tp }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_client + libsecurity_cdsa_utilities + libsecurityd + CF + libsecurity_asn1 + libsecurity_pkcs12 + libsecurity_cdsa_utils + openssl + libsecurity_ocspd + security_dotmac_tp + ]; + 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 ${apple_sdk.sdk}/include/xpc/*.h xpc + cp ${osx_private_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; }' \ + --replace '_xpc_runtime_is_app_sandboxed()' 'false' + # hope that doesn't hurt anything + + substituteInPlace lib/KCEventNotifier.h --replace \ + 'CoreFoundation/CFNotificationCenter.h' \ + '${apple_sdk.sdk}/Library/Frameworks/CoreFoundation.framework/Versions/A/Headers/CFNotificationCenter.h' + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile new file mode 100644 index 000000000000..119a43621fbb --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_mds + +security_mds_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_mds_HEADER_FILES_DIR = lib + +security_mds_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/default.nix new file mode 100644 index 000000000000..cd691f71e95f --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/default.nix @@ -0,0 +1,11 @@ +{ appleDerivation, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_filedb, libsecurity_utilities, libsecurityd }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_plugin + libsecurity_cdsa_utilities + libsecurity_filedb + libsecurity_utilities + libsecurity_cdsa_client + libsecurityd + ]; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/GNUmakefile new file mode 100644 index 000000000000..140c5a909a66 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_ocspd + +security_ocspd_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_ocspd_HEADER_FILES_DIR = lib + +security_ocspd_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/default.nix new file mode 100644 index 000000000000..25701442d2b7 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/default.nix @@ -0,0 +1,20 @@ +{ appleDerivation, bootstrap_cmds, libsecurity_cdsa_utilities, libsecurity_utilities, osx_private_sdk }: +appleDerivation { + buildInputs = [ + libsecurity_utilities + libsecurity_cdsa_utilities + bootstrap_cmds + ]; + postUnpack = '' + pushd libsecurity* + ls -lah + mkdir -p lib + cp common/* lib + cp client/* lib + popd + ''; + preBuild = '' + make -f mig/mig.mk SRCROOT=. BUILT_PRODUCTS_DIR=. || exit 1 + cp derived_src/* lib + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/GNUmakefile new file mode 100644 index 000000000000..b2af7e72c41b --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/GNUmakefile @@ -0,0 +1,11 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_pkcs12 + +security_pkcs12_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_pkcs12_HEADER_FILES_DIR = lib + +security_pkcs12_CC_FILES = $(wildcard lib/*.cpp) +security_pkcs12_C_FILES = $(wildcard lib/*.c) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/default.nix new file mode 100644 index 000000000000..f84c2d8963fc --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/default.nix @@ -0,0 +1,15 @@ +{ appleDerivation, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_utils, libsecurity_keychain, osx_private_sdk }: +appleDerivation { + patchPhase = '' + substituteInPlace lib/pkcsoids.h --replace '#error' '#warning' + ''; + preBuild = '' + unpackFile ${libsecurity_keychain.src} + mv libsecurity_keychain*/lib security_keychain + ''; + buildInputs = [ + libsecurity_asn1 + libsecurity_cdsa_utils + libsecurity_cdsa_client + ]; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/GNUmakefile new file mode 100644 index 000000000000..47a1c609d066 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/GNUmakefile @@ -0,0 +1,10 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_sd_cspdl + +security_sd_cspdl_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_sd_cspdl_HEADER_FILES_DIR = lib + +security_sd_cspdl_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/default.nix new file mode 100644 index 000000000000..224910916615 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/default.nix @@ -0,0 +1,10 @@ +{ appleDerivation, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_utilities, libsecurityd }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_plugin + libsecurity_utilities + libsecurity_cdsa_utilities + libsecurityd + libsecurity_cdsa_client + ]; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/GNUmakefile new file mode 100644 index 000000000000..d3ba09142c96 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/GNUmakefile @@ -0,0 +1,11 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_utilities + +security_utilities_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_utilities_HEADER_FILES_DIR = lib + +security_utilities_C_FILES = $(wildcard lib/*.c) +security_utilities_CC_FILES = $(wildcard lib/*.cpp) + +include $(GNUSTEP_MAKEFILES)/library.make 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 new file mode 100644 index 000000000000..8cc74e2210f9 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix @@ -0,0 +1,23 @@ +{ IOKit, appleDerivation, apple_sdk, libauto, libobjc, libsecurity_codesigning, osx_private_sdk, sqlite, stdenv }: +appleDerivation { + buildInputs = [ + libauto + libobjc + IOKit + sqlite + apple_sdk.frameworks.PCSC + ]; + patchPhase = '' + substituteInPlace lib/errors.h --replace \ + '' \ + '"MacTypes.h"' + 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 + '' + 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/apple-source-releases/libsecurityd/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/GNUmakefile new file mode 100644 index 000000000000..6058043e79f5 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/GNUmakefile @@ -0,0 +1,11 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = securityd + +securityd_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +securityd_HEADER_FILES_DIR = lib + +securityd_CC_FILES = $(wildcard lib/*.cpp) +securityd_C_FILES = $(wildcard lib/*.c) + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/default.nix new file mode 100644 index 000000000000..d311f6783374 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/default.nix @@ -0,0 +1,23 @@ +{ appleDerivation, bootstrap_cmds, libsecurity_cdsa_client, libsecurity_cdsa_utilities, libsecurity_utilities, osx_private_sdk }: +appleDerivation { + buildInputs = [ + libsecurity_cdsa_utilities + libsecurity_utilities + bootstrap_cmds + ]; + patchPhase = '' + unpackFile ${libsecurity_cdsa_client.src} + mv libsecurity_cdsa_client*/lib security_cdsa_client + ln -s lib securityd_client + + patch -p1 < ${./xdr-arity.patch} + ''; + preBuild = '' + make -f mig/mig.mk SRCROOT=. BUILT_PRODUCTS_DIR=. + cp derived_src/* lib + rm lib/ucspClientC.c + ''; + postInstall = '' + ln -s ''$out/include/securityd ''$out/include/securityd_client + ''; +} \ No newline at end of file diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch b/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch new file mode 100644 index 000000000000..5d0328629f19 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch @@ -0,0 +1,79 @@ +diff --git a/lib/sec_xdr.c b/lib/sec_xdr.c +index fe5f038..6239b6c 100644 +--- a/lib/sec_xdr.c ++++ b/lib/sec_xdr.c +@@ -223,7 +223,7 @@ bool_t copyin(void *data, xdrproc_t proc, void** copy, u_int *size) + sec_xdrmem_create(&xdr, (char *)xdr_data, length, XDR_ENCODE); + + // cast to void* - function can go both ways (xdr->x_op) +- if (proc(&xdr, data)) { ++ if (proc(&xdr, data, 0)) { + *copy = xdr_data; + if (size) *size = length; + return (TRUE); +@@ -261,7 +261,7 @@ bool_t copyout(const void *copy, u_int size, xdrproc_t proc, void **data, u_int + if (!sec_xdr_arena_init(&arena, &xdr, length_out ? length_out : length_required, length_out ? *data : NULL)) + return (FALSE); + +- if (proc(&xdr, data)) ++ if (proc(&xdr, data, 0)) + { + *length = length_required; + return (TRUE); +@@ -284,7 +284,7 @@ bool_t copyout_chunked(const void *copy, u_int size, xdrproc_t proc, void **data + + void *data_out = NULL; + +- if (proc(&xdr, &data_out)) ++ if (proc(&xdr, &data_out, 0)) + { + *data = data_out; + return (TRUE); +diff --git a/lib/sec_xdr_array.c b/lib/sec_xdr_array.c +index 152a71b..e5ec1ad 100644 +--- a/lib/sec_xdr_array.c ++++ b/lib/sec_xdr_array.c +@@ -147,7 +147,7 @@ sec_xdr_array(XDR *xdrs, uint8_t **addrp, u_int *sizep, u_int maxsize, u_int els + for (i = 0; (i < c) && stat; i++) { + if ((xdrs->x_op == XDR_DECODE) && sizeof_alloc) + memset(obj, 0, elsize); +- stat = (*elproc)(xdrs, target); ++ stat = (*elproc)(xdrs, target, 0); + if ((xdrs->x_op == XDR_ENCODE) || !sizeof_alloc) + target += elsize; + } +diff --git a/lib/sec_xdr_reference.c b/lib/sec_xdr_reference.c +index a66fb37..ab5b4c4 100644 +--- a/lib/sec_xdr_reference.c ++++ b/lib/sec_xdr_reference.c +@@ -121,7 +121,7 @@ sec_xdr_reference(XDR *xdrs, uint8_t **pp, u_int size, xdrproc_t proc) + break; + } + +- stat = (*proc)(xdrs, loc); ++ stat = (*proc)(xdrs, loc, 0); + + if (xdrs->x_op == XDR_FREE) { + sec_mem_free(xdrs, loc, size); +diff --git a/lib/sec_xdr_sizeof.c b/lib/sec_xdr_sizeof.c +index a18bcd0..8c33dbc 100644 +--- a/lib/sec_xdr_sizeof.c ++++ b/lib/sec_xdr_sizeof.c +@@ -190,7 +190,7 @@ sec_xdr_sizeof_in(func, data) + + sec_xdr_arena_allocator_t size_alloc; + sec_xdr_arena_init_size_alloc(&size_alloc, &x); +- stat = func(&x, data); ++ stat = func(&x, data, 0); + if (x.x_private) + free(x.x_private); + return (stat == TRUE ? (unsigned) x.x_handy: 0); +@@ -210,7 +210,7 @@ sec_xdr_sizeof_out(copy, size, func, data) + + sec_xdr_arena_allocator_t size_alloc; + sec_xdr_arena_init_size_alloc(&size_alloc, &x); +- stat = func(&x, data); ++ stat = func(&x, data, 0); + if (size_alloc.data) + free(size_alloc.data); + return (stat == TRUE ? (unsigned long)size_alloc.offset : 0); diff --git a/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/GNUmakefile new file mode 100644 index 000000000000..6f6a50bd57a2 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/GNUmakefile @@ -0,0 +1,8 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +LIBRARY_NAME = security_dotmac_tp + +security_dotmac_tp_HEADER_FILES = $(notdir $(wildcard lib/*.h)) +security_dotmac_tp_HEADER_FILES_DIR = lib + +include $(GNUSTEP_MAKEFILES)/library.make diff --git a/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/default.nix b/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/default.nix new file mode 100644 index 000000000000..bfbfb945957e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/default.nix @@ -0,0 +1,4 @@ +{ appleDerivation }: + +appleDerivation { +} diff --git a/pkgs/os-specific/darwin/osx-private-sdk/default.nix b/pkgs/os-specific/darwin/osx-private-sdk/default.nix index 85e1dc50f359..febcb6b5d0cd 100644 --- a/pkgs/os-specific/darwin/osx-private-sdk/default.nix +++ b/pkgs/os-specific/darwin/osx-private-sdk/default.nix @@ -1,34 +1,16 @@ -{ stdenv, fetchFromGitHub, python, osx_sdk }: +{ stdenv, fetchzip }: -let - sdkVersion = "10.9"; -in stdenv.mkDerivation { - name = "PrivateMacOSX${sdkVersion}.sdk"; - - src = fetchFromGitHub { - owner = "copumpkin"; - repo = "OSXPrivateSDK"; - rev = "bde9cba13e6ae62a8e4e0f405008ea719526e7ad"; - sha256 = "1vj3fxwp32irxjk987p7a223sm5bl5rrlajcvgy69k0wb0fp0krc"; - }; - - buildInputs = [ python ]; - - configurePhase = "true"; - - buildPhase = '' - python PrivateSDK.py -i ${osx_sdk}/Developer/SDKs/MacOSX${sdkVersion}.sdk -o PrivateMacOSX${sdkVersion}.sdk - ''; - - installPhase = '' - mkdir -p $out/Developer/SDKs/ - mv PrivateMacOSX${sdkVersion}.sdk $out/Developer/SDKs - ''; - - meta = with stdenv.lib; { - description = "A private Mac OS ${sdkVersion} SDK, suitable for building many of Apple's open source releases"; - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - license = licenses.unfree; - }; +let full = stdenv.lib.overrideDerivation (fetchzip { + url = "https://github.com/samdmarshall/OSXPrivateSDK/tarball/69bf3c7f7140ed6ab2b6684b427bd457209858fe"; + name = "osx-private-sdk-10.9"; + sha256 = "1agl4kyry6m7yz3sql5mrbvmd1xkmb4nbq976phcpk19inans1zm"; +}) (drv: { + postFetch = '' + unpackFile() { + tar xzf "$1" + } + '' + drv.postFetch; +}); in { + outPath = "${full}/PrivateSDK10.9"; + passthru.sdk10 = "${full}/PrivateSDK10.10"; } diff --git a/pkgs/os-specific/darwin/osx-sdk/default.nix b/pkgs/os-specific/darwin/osx-sdk/default.nix index 612bf003743c..875479b4f29d 100644 --- a/pkgs/os-specific/darwin/osx-sdk/default.nix +++ b/pkgs/os-specific/darwin/osx-sdk/default.nix @@ -2,7 +2,7 @@ let version = "10.9"; -in stdenv.mkDerivation { +in stdenv.mkDerivation rec { name = "MacOSX10.9.sdk"; src = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; @@ -23,4 +23,4 @@ in stdenv.mkDerivation { platforms = platforms.darwin; license = licenses.unfree; }; -} \ No newline at end of file +} diff --git a/pkgs/os-specific/darwin/security-tool/GNUmakefile b/pkgs/os-specific/darwin/security-tool/GNUmakefile new file mode 100644 index 000000000000..ae25f6a67c02 --- /dev/null +++ b/pkgs/os-specific/darwin/security-tool/GNUmakefile @@ -0,0 +1,14 @@ +include $(GNUSTEP_MAKEFILES)/common.make + +TOOL_NAME = security +security_C_FILES = $(wildcard *.c) +security_CC_FILES = $(wildcard *.cpp) + +security_LDFLAGS = \ + -lsecurity_cdsa_utilities -lsecurity_cdsa_utils -lsecurity_keychain -lsecurity_cssm \ + -lsecurity_cdsa_client -lsecurity_utilities -lsecurity_asn1 -lsecurity_mds \ + -lsecurity_cdsa_plugin -lsecurity_pkcs12 -lsecurity_apple_csp -lsecurity_apple_cspdl \ + -lsecurity_apple_file_dl -lsecurity_apple_x509_cl -lsecurity_apple_x509_tp \ + -lsecurity_sd_cspdl -lsecurity_filedb -lsecurityd -framework Security -framework PCSC + +include $(GNUSTEP_MAKEFILES)/tool.make diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index 49d61f392c5e..ac495b63c0af 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -1,30 +1,85 @@ -{ stdenv, fetchurl, osx_private_sdk }: +{ CoreServices, Foundation, PCSC, Security, 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 }: stdenv.mkDerivation rec { - version = "55115"; - name = "SecurityTool-${version}"; + version = "55115"; + name = "SecurityTool-${version}"; src = fetchurl { url = "http://opensource.apple.com/tarballs/SecurityTool/SecurityTool-${version}.tar.gz"; sha256 = "0apcz4vy2z5645jhrs60wj3w27mncjjqv42h5lln36g6qs2n9113"; }; - configurePhase = ""; + __propagatedImpureHostDeps = import ./impure-deps.nix; - # Someday we shall purge this impurity! - buildPhase = '' - /usr/bin/xcodebuild SDKROOT=${osx_private_sdk}/Developer/SDKs/PrivateMacOSX10.9.sdk/ + patchPhase = '' + # copied from libsecurity_generic + ln -s ${osx_private_sdk}/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security + + substituteInPlace cmsutil.c --replace \ + '' \ + '"${apple_sdk.sdk}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"' + substituteInPlace createFVMaster.c --replace \ + '' \ + '"${apple_sdk.sdk}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"' ''; - installPhase = '' - mkdir -p $out/bin/ - cp build/Release/security $out/bin + postUnpack = '' + unpackFile ${Security.src} + cp Security-*/utilities/src/fileIo.c SecurityTool* + cp Security-*/utilities/src/fileIo.h SecurityTool* ''; + preBuild = '' + makeFlagsArray=(-j''$NIX_BUILD_CORES) + ''; + + NIX_LDFLAGS = "-no_dtrace_dof"; + + makeFlags = "-f ${./GNUmakefile} MAKEFILE_NAME=${./GNUmakefile}"; + + installFlags = [ + "security_INSTALL_DIR=\$(out)/bin" + ]; + + buildInputs = [ + gnustep-make + Security + Foundation + libsecurity_asn1 + libsecurity_utilities + libsecurity_cdsa_utilities + libobjc + libsecurity_cdsa_client + libsecurity_keychain + libsecurity_cssm + libsecurity_cdsa_utils + libsecurity_mds + libsecurity_cdsa_plugin + libsecurity_apple_csp + libsecurity_apple_cspdl + libsecurity_apple_file_dl + libsecurity_apple_x509_cl + libsecurity_apple_x509_tp + libsecurity_pkcs12 + libsecurity_sd_cspdl + libsecurity_filedb + libsecurityd + ]; + + NIX_CFLAGS_COMPILE = [ + "-F${Security}/Library/Frameworks" + "-F${PCSC}/Library/Frameworks" + "-Wno-deprecated-declarations" + ]; + meta = with stdenv.lib; { description = "Command line interface to Mac OS X keychains and Security framework"; - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - license = licenses.apsl20; + maintainers = with maintainers; [ + copumpkin + joelteon + ]; + platforms = platforms.darwin; + license = licenses.apsl20; }; -} \ No newline at end of file +} + diff --git a/pkgs/os-specific/darwin/security-tool/impure-deps.nix b/pkgs/os-specific/darwin/security-tool/impure-deps.nix new file mode 100644 index 000000000000..0d9da5953493 --- /dev/null +++ b/pkgs/os-specific/darwin/security-tool/impure-deps.nix @@ -0,0 +1,129 @@ +[ + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib" + "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib" + "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD" + "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis" + "/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox" + "/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit" + "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink" + "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition" + "/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio" + "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth" + "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData" + "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation" + "/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices" + "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit" + "/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText" + "/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo" + "/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN" + "/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration" + "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation" + "/System/Library/Frameworks/GSS.framework/Versions/A/GSS" + "/System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth" + "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit" + "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib" + "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib" + "/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos" + "/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS" + "/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL" + "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory" + "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib" + "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL" + "/System/Library/Frameworks/PCSC.framework/Versions/A/PCSC" + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage" + "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore" + "/System/Library/Frameworks/Security.framework/Versions/A/Security" + "/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation" + "/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement" + "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration" + "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211" + "/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG" + "/System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA" + "/System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup" + "/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary" + "/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth" + "/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication" + "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI" + "/System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi" + "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport" + "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" + "/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols" + "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" + "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore" + "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" + "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal" + "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" + "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" + "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport" + "/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth" + "/System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis" + "/System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices" + "/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing" + "/System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore" + "/System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication" + "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC" + "/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation" + "/System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity" + "/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport" + "/usr/lib/libCRFSuite.dylib" + "/usr/lib/libOpenScriptingUtil.dylib" + "/usr/lib/libarchive.2.dylib" + "/usr/lib/libbsm.0.dylib" + "/usr/lib/libbz2.1.0.dylib" + "/usr/lib/libc++.1.dylib" + "/usr/lib/libc++abi.dylib" + "/usr/lib/libcmph.dylib" + "/usr/lib/libcups.2.dylib" + "/usr/lib/libextension.dylib" + "/usr/lib/libheimdal-asn1.dylib" + "/usr/lib/libiconv.2.dylib" + "/usr/lib/libicucore.A.dylib" + "/usr/lib/liblangid.dylib" + "/usr/lib/liblzma.5.dylib" + "/usr/lib/libmecabra.dylib" + "/usr/lib/libpam.2.dylib" + "/usr/lib/libresolv.9.dylib" + "/usr/lib/libsqlite3.dylib" + "/usr/lib/libxar.1.dylib" + "/usr/lib/libxml2.2.dylib" + "/usr/lib/libxslt.1.dylib" + "/usr/lib/libz.1.dylib" +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2736481473e6..7b620f174b69 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9348,9 +9348,9 @@ let xcode = callPackage ../os-specific/darwin/xcode {}; osx_sdk = callPackage ../os-specific/darwin/osx-sdk {}; - osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk { inherit osx_sdk; }; + osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk {}; - security_tool = callPackage ../os-specific/darwin/security-tool { inherit osx_private_sdk; }; + security_tool = (newScope (darwin.apple_sdk.frameworks // darwin)) ../os-specific/darwin/security-tool { }; binutils = callPackage ../os-specific/darwin/binutils { inherit cctools; }; @@ -9364,6 +9364,12 @@ let libobjc = apple-source-releases.objc4; }; + gnustep-make = callPackage ../development/tools/build-managers/gnustep/make {}; + gnustep-xcode = callPackage ../development/tools/build-managers/gnustep/xcode { + inherit (darwin.apple_sdk.frameworks) Foundation; + inherit (darwin) libobjc; + }; + devicemapper = lvm2; disk_indicator = callPackage ../os-specific/linux/disk-indicator { }; From 7851df44541588c8b089b863b6cd1239ed41e2aa Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Tue, 30 Jun 2015 16:10:51 -0700 Subject: [PATCH 2/6] fix input propagation on security-tool --- pkgs/os-specific/darwin/security-tool/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index ac495b63c0af..e1e51e6a7c9e 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -9,8 +9,6 @@ stdenv.mkDerivation rec { sha256 = "0apcz4vy2z5645jhrs60wj3w27mncjjqv42h5lln36g6qs2n9113"; }; - __propagatedImpureHostDeps = import ./impure-deps.nix; - patchPhase = '' # copied from libsecurity_generic ln -s ${osx_private_sdk}/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders Security @@ -41,10 +39,10 @@ stdenv.mkDerivation rec { "security_INSTALL_DIR=\$(out)/bin" ]; + propagatedBuildInputs = [ Security PCSC Foundation ]; + buildInputs = [ gnustep-make - Security - Foundation libsecurity_asn1 libsecurity_utilities libsecurity_cdsa_utilities From ac3acae7a5a2884fda5751fbd62a8a56580de4b8 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Tue, 30 Jun 2015 16:11:16 -0700 Subject: [PATCH 3/6] use security_tool in x509-system --- .../haskell-modules/configuration-common.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index c70fb5c0bc77..ad9f0b2c54af 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -209,12 +209,14 @@ self: super: { # Prevents needing to add security_tool as a build tool to all of x509-system's # dependencies. # TODO: use pkgs.darwin.security_tool once we can build it - x509-system = let security_tool = "/usr"; - in overrideCabal super.x509-system (drv: { - patchPhase = (drv.patchPhase or "") + pkgs.stdenv.lib.optionalString pkgs.stdenv.isDarwin '' - substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security - ''; - }); + x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc + then let inherit (pkgs.darwin) security_tool; + in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: { + patchPhase = (drv.patchPhase or "") + '' + substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security + ''; + }) + else super.x509-system; double-conversion = if !pkgs.stdenv.isDarwin then super.double-conversion From 0f763a12bf5dc926f045f040fd708012db9f8f53 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 2 Jul 2015 18:59:30 -0700 Subject: [PATCH 4/6] update PCSC dependencies --- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index ca700a9be7e6..222168d39da1 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -76,7 +76,7 @@ with frameworks; with libs; { OpenAL = []; OpenCL = [ IOSurface OpenGL ]; OpenGL = []; - PCSC = []; + PCSC = [ CoreData ]; PreferencePanes = []; PubSub = []; Python = [ ApplicationServices ]; From 630bff3b7d51637d18fbf820dd21e5985f8c7e8f Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 2 Jul 2015 18:59:59 -0700 Subject: [PATCH 5/6] remove unused security-tool deps file --- .../darwin/security-tool/impure-deps.nix | 129 ------------------ 1 file changed, 129 deletions(-) delete mode 100644 pkgs/os-specific/darwin/security-tool/impure-deps.nix diff --git a/pkgs/os-specific/darwin/security-tool/impure-deps.nix b/pkgs/os-specific/darwin/security-tool/impure-deps.nix deleted file mode 100644 index 0d9da5953493..000000000000 --- a/pkgs/os-specific/darwin/security-tool/impure-deps.nix +++ /dev/null @@ -1,129 +0,0 @@ -[ - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib" - "/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib" - "/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD" - "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis" - "/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox" - "/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit" - "/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork" - "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound" - "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox" - "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink" - "/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition" - "/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio" - "/System/Library/Frameworks/CoreBluetooth.framework/Versions/A/CoreBluetooth" - "/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData" - "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation" - "/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices" - "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit" - "/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText" - "/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo" - "/System/Library/Frameworks/CoreWLAN.framework/Versions/A/CoreWLAN" - "/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration" - "/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation" - "/System/Library/Frameworks/GSS.framework/Versions/A/GSS" - "/System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth" - "/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit" - "/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib" - "/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib" - "/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos" - "/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS" - "/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL" - "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory" - "/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib" - "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL" - "/System/Library/Frameworks/PCSC.framework/Versions/A/PCSC" - "/System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage" - "/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore" - "/System/Library/Frameworks/Security.framework/Versions/A/Security" - "/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation" - "/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement" - "/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration" - "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Apple80211" - "/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG" - "/System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA" - "/System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup" - "/System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary" - "/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth" - "/System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication" - "/System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI" - "/System/Library/PrivateFrameworks/CoreWiFi.framework/Versions/A/CoreWiFi" - "/System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport" - "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" - "/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols" - "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" - "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore" - "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" - "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal" - "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" - "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" - "/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport" - "/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth" - "/System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis" - "/System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices" - "/System/Library/PrivateFrameworks/Sharing.framework/Versions/A/Sharing" - "/System/Library/PrivateFrameworks/SpeechRecognitionCore.framework/Versions/A/SpeechRecognitionCore" - "/System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication" - "/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC" - "/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation" - "/System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity" - "/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport" - "/usr/lib/libCRFSuite.dylib" - "/usr/lib/libOpenScriptingUtil.dylib" - "/usr/lib/libarchive.2.dylib" - "/usr/lib/libbsm.0.dylib" - "/usr/lib/libbz2.1.0.dylib" - "/usr/lib/libc++.1.dylib" - "/usr/lib/libc++abi.dylib" - "/usr/lib/libcmph.dylib" - "/usr/lib/libcups.2.dylib" - "/usr/lib/libextension.dylib" - "/usr/lib/libheimdal-asn1.dylib" - "/usr/lib/libiconv.2.dylib" - "/usr/lib/libicucore.A.dylib" - "/usr/lib/liblangid.dylib" - "/usr/lib/liblzma.5.dylib" - "/usr/lib/libmecabra.dylib" - "/usr/lib/libpam.2.dylib" - "/usr/lib/libresolv.9.dylib" - "/usr/lib/libsqlite3.dylib" - "/usr/lib/libxar.1.dylib" - "/usr/lib/libxml2.2.dylib" - "/usr/lib/libxslt.1.dylib" - "/usr/lib/libz.1.dylib" -] From 066412c7b0bd175ae2d22e97745e01f38454ce53 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Sun, 5 Jul 2015 01:41:56 -0700 Subject: [PATCH 6/6] clean up propagated stuff for x509-system --- .../development/haskell-modules/configuration-common.nix | 4 +++- pkgs/os-specific/darwin/apple-sdk/impure-deps.nix | 8 ++++++++ pkgs/os-specific/darwin/security-tool/default.nix | 9 +++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index ad9f0b2c54af..3586fd0a2324 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -208,13 +208,15 @@ self: super: { # Prevents needing to add security_tool as a build tool to all of x509-system's # dependencies. - # TODO: use pkgs.darwin.security_tool once we can build it x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc then let inherit (pkgs.darwin) security_tool; in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: { patchPhase = (drv.patchPhase or "") + '' substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security ''; + __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ + "/System/Library/Keychains" + ]; }) else super.x509-system; diff --git a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix index 0d2f2728406a..54a6dcfaeaf7 100644 --- a/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix +++ b/pkgs/os-specific/darwin/apple-sdk/impure-deps.nix @@ -16,6 +16,12 @@ rec { "/usr/lib/libpam.2.dylib" "/usr/lib/libxar.1.dylib" ]; + GSS = [ + "/System/Library/Frameworks/GSS.framework" + ]; + Kerberos = [ + "/System/Library/Frameworks/Kerberos.framework" + ]; CoreServices = [ "/System/Library/Frameworks/CoreServices.framework" "/System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore" @@ -76,6 +82,8 @@ rec { "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv" "/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore" "/System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage" + "/System/Library/PrivateFrameworks/Heimdal.framework/Heimdal" + "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/Current" "/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal" "/System/Library/PrivateFrameworks/IconServices.framework/Versions/A/IconServices" "/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling" diff --git a/pkgs/os-specific/darwin/security-tool/default.nix b/pkgs/os-specific/darwin/security-tool/default.nix index e1e51e6a7c9e..866d006238df 100644 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ b/pkgs/os-specific/darwin/security-tool/default.nix @@ -1,4 +1,4 @@ -{ CoreServices, Foundation, PCSC, Security, 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, stdenv }: stdenv.mkDerivation rec { version = "55115"; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { "security_INSTALL_DIR=\$(out)/bin" ]; - propagatedBuildInputs = [ Security PCSC Foundation ]; + propagatedBuildInputs = [ GSS Kerberos Security PCSC Foundation ]; buildInputs = [ gnustep-make @@ -62,6 +62,7 @@ stdenv.mkDerivation rec { libsecurity_sd_cspdl libsecurity_filedb libsecurityd + makeWrapper ]; NIX_CFLAGS_COMPILE = [ @@ -70,6 +71,10 @@ stdenv.mkDerivation rec { "-Wno-deprecated-declarations" ]; + postInstall = '' + wrapProgram $out/bin/security --set DYLD_INSERT_LIBRARIES /usr/lib/libsqlite3.dylib + ''; + meta = with stdenv.lib; { description = "Command line interface to Mac OS X keychains and Security framework"; maintainers = with maintainers; [