From d4ff2313e69247afcf078536c65cd5f82751e1b8 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 29 Oct 2018 10:07:30 -0500 Subject: [PATCH 01/70] llvmPackages: 5 -> 7 (bump our default LLVM) --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4e2cfd9d0e84..df5ba4d79186 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7544,7 +7544,7 @@ in llvm_37 = llvmPackages_37.llvm; llvm_35 = llvmPackages_35.llvm; - llvmPackages = recurseIntoAttrs llvmPackages_5; + llvmPackages = recurseIntoAttrs llvmPackages_7; llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 ({ isl = isl_0_14; From dd649a09c333c5a9b6091ef7835ac46dec68b8f2 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 29 Oct 2018 10:08:58 -0500 Subject: [PATCH 02/70] llvmPackages: keep darwin at llvm5 My previous attempts to bump the Darwin stdenv version didn't seem to work, but AFAIK doing so should be straightforward for anyone with a Darwin builder and the interest in tackling this. While not the preferred solution, adding a conditional lets us move on, as we missed 6 entirely due to no one getting around to resolving the Darwin bootstrap accordingly. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index df5ba4d79186..54d5849d3ed7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7544,7 +7544,7 @@ in llvm_37 = llvmPackages_37.llvm; llvm_35 = llvmPackages_35.llvm; - llvmPackages = recurseIntoAttrs llvmPackages_7; + llvmPackages = recurseIntoAttrs (if stdenv.isDarwin then llvmPackages_5 else llvmPackages_7); llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 ({ isl = isl_0_14; From 564bf8da2bb2c0f0813b41edd2255b9886f2c373 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 29 Oct 2018 10:25:19 -0500 Subject: [PATCH 03/70] all-packages.nix: remove llvm7 overrides, this is now the default --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 54d5849d3ed7..1acea30d4f04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8793,9 +8793,7 @@ in cpplint = callPackage ../development/tools/analysis/cpplint { }; - cquery = callPackage ../development/tools/misc/cquery { - llvmPackages = llvmPackages_latest; - }; + cquery = callPackage ../development/tools/misc/cquery { }; ccls = callPackage ../development/tools/misc/ccls { llvmPackages = llvmPackages_7; From 4c3c8f4a7d5d82e3a148819d8c80bdef6bcb0c6f Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 29 Oct 2018 10:29:11 -0500 Subject: [PATCH 04/70] all-packages: keep llvm7 overrides for now, not default on Darwin yet --- pkgs/top-level/all-packages.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1acea30d4f04..1551b2b3a1bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8793,7 +8793,11 @@ in cpplint = callPackage ../development/tools/analysis/cpplint { }; - cquery = callPackage ../development/tools/misc/cquery { }; + cquery = callPackage ../development/tools/misc/cquery { + # 7 is the default, but only on Linux, so keep this for now + llvmPackages = llvmPackages_7; + }; + ccls = callPackage ../development/tools/misc/ccls { llvmPackages = llvmPackages_7; @@ -11950,6 +11954,7 @@ in libGLSupported = lib.elem stdenv.hostPlatform.system lib.platforms.mesaPlatforms; mesa_noglu = callPackage ../development/libraries/mesa { + # 7 is the default, but only on Linux, so keep this for now llvmPackages = llvmPackages_7; inherit (darwin.apple_sdk.frameworks) OpenGL; inherit (darwin.apple_sdk.libs) Xplugin; From d69cc779b520ea74a5b52fa5691f3f8fd7fe9cf3 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 6 Feb 2019 20:13:51 -0500 Subject: [PATCH 05/70] Revert "Revert "darwin 10.12 commits"" This reverts commit 8505e710e707b2e425379dc356721194f742d8d0. --- .../haskell-modules/configuration-nix.nix | 19 --- pkgs/development/tools/xcbuild/toolchains.nix | 1 + pkgs/os-specific/darwin/apple-sdk/default.nix | 22 +-- .../Libc/CrashReporterClient.h | 51 ++++++ .../apple-source-releases/Libc/default.nix | 2 + .../Libsystem/default.nix | 20 ++- .../Libsystem/system_c_symbols | 27 +++ .../Libsystem/system_kernel_symbols | 158 ++++++++++++++++++ .../apple-source-releases/Security/boot.nix | 116 +++++++++++++ .../Security/default.nix | 119 ++----------- .../SmartCardServices/default.nix | 42 ----- .../apple-source-releases/adv_cmds/boot.nix | 91 ++++++++++ .../adv_cmds/default.nix | 103 ++++-------- .../apple-source-releases/adv_cmds/xcode.nix | 59 ------- .../bootstrap_cmds/default.nix | 1 + .../darwin/apple-source-releases/default.nix | 139 +++++++-------- .../diskdev_cmds/default.nix | 4 +- .../apple-source-releases/dtrace/default.nix | 85 +++++----- .../apple-source-releases/dtrace/xcode.nix | 47 ------ .../file_cmds/default.nix | 4 +- .../apple-source-releases/hfs/default.nix | 8 + .../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 | 11 -- .../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 | 33 ---- .../libsecurity_cssm/GNUmakefile | 11 -- .../libsecurity_cssm/default.nix | 14 -- .../libsecurity_filedb/GNUmakefile | 10 -- .../libsecurity_filedb/default.nix | 13 -- .../libsecurity_generic/default.nix | 63 ------- .../libsecurity_generic/impure_deps.nix | 128 -------------- .../libsecurity_keychain/GNUmakefile | 10 -- .../libsecurity_keychain/default.nix | 43 ----- .../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 | 28 ---- .../libsecurityd/GNUmakefile | 11 -- .../libsecurityd/default.nix | 23 --- .../libsecurityd/xdr-arity.patch | 79 --------- .../apple-source-releases/libutil/default.nix | 32 +++- .../apple-source-releases/libutil/new.nix | 29 ---- .../security_dotmac_tp/GNUmakefile | 8 - .../security_dotmac_tp/default.nix | 4 - .../security_systemkeychain/default.nix | 32 ---- .../apple-source-releases/top/default.nix | 4 +- .../apple-source-releases/xnu/default.nix | 93 ++++++----- pkgs/os-specific/darwin/darling/default.nix | 3 + .../darwin/security-tool/GNUmakefile | 14 -- .../darwin/security-tool/default.nix | 101 ----------- pkgs/top-level/darwin-packages.nix | 4 - 76 files changed, 701 insertions(+), 1612 deletions(-) create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Libc/CrashReporterClient.h create mode 100644 pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/SmartCardServices/default.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/dtrace/xcode.nix create mode 100644 pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/handletemplates.patch delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/impure_deps.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurityd/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurityd/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/default.nix delete mode 100644 pkgs/os-specific/darwin/apple-source-releases/security_systemkeychain/default.nix delete mode 100644 pkgs/os-specific/darwin/security-tool/GNUmakefile delete mode 100644 pkgs/os-specific/darwin/security-tool/default.nix diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index af5bd2220d47..1be90f902e68 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -128,25 +128,6 @@ self: super: builtins.intersectAttrs super { # the system-fileio tests use canonicalizePath, which fails in the sandbox system-fileio = if pkgs.stdenv.isDarwin then dontCheck super.system-fileio else super.system-fileio; - # Prevents needing to add `security_tool` as a run-time dependency for - # everything using x509-system to give access to the `security` executable. - x509-system = if pkgs.stdenv.hostPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc - then let inherit (pkgs.darwin) security_tool; - in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: { - # darwin.security_tool is broken in Mojave (#45042) - - # We will use the system provided security for now. - # Beware this WILL break in sandboxes! - - # TODO(matthewbauer): If someone really needs this to work in sandboxes, - # I think we can add a propagatedImpureHost dep here, but I’m hoping to - # get a proper fix available soonish. - postPatch = (drv.postPatch or "") + '' - substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security - ''; - }) - else super.x509-system; - # https://github.com/NixOS/cabal2nix/issues/136 and https://github.com/NixOS/cabal2nix/issues/216 gio = disableHardening (addPkgconfigDepend (addBuildTool super.gio self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"]; glib = disableHardening (addPkgconfigDepend (addBuildTool super.glib self.buildHaskellPackages.gtk2hs-buildtools) pkgs.glib) ["fortify"]; diff --git a/pkgs/development/tools/xcbuild/toolchains.nix b/pkgs/development/tools/xcbuild/toolchains.nix index 92ff35ac8b53..e435f0978c5e 100644 --- a/pkgs/development/tools/xcbuild/toolchains.nix +++ b/pkgs/development/tools/xcbuild/toolchains.nix @@ -67,6 +67,7 @@ runCommand "Toolchains" {} ('' done ln -s ${buildPackages.darwin.bootstrap_cmds}/bin/mig $toolchain/bin + mkdir -p $toolchain/libexec ln -s ${buildPackages.darwin.bootstrap_cmds}/libexec/migcom $toolchain/libexec ln -s ${mkdep-darwin-src} $toolchain/bin/mkdep '') diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index c23a2148143a..71574998885f 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -1,30 +1,22 @@ -{ stdenv, fetchurl, xar, xz, cpio, pkgs, python, lib }: +{ stdenv, fetchurl, xar, cpio, pkgs, python, pbzx, lib }: let - # TODO: make this available to other packages and generalize the unpacking a bit - # from https://gist.github.com/pudquick/ff412bcb29c9c1fa4b8d - # This isn't needed until we get to SDK 10.11, but that presents other challenges - # unpbzx = fetchurl { - # url = "https://gist.githubusercontent.com/pudquick/ff412bcb29c9c1fa4b8d/raw/24b25538ea8df8d0634a2a6189aa581ccc6a5b4b/parse_pbzx2.py"; - # sha256 = "0jgp6qbfl36i0jlz7as5zk2w20z4ca8wlrhdw49lwsld6wi3rfhc"; - # }; - # sadly needs to be exported because security_tool needs it sdk = stdenv.mkDerivation rec { - version = "10.10"; + version = "10.12"; name = "MacOS_SDK-${version}"; - # This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.10.merged-1.sucatalog, which we found by: + # This URL comes from https://swscan.apple.com/content/catalogs/others/index-10.12.merged-1.sucatalog, which we found by: # 1. Google: site:swscan.apple.com and look for a name that seems appropriate for your version # 2. In the resulting file, search for a file called DevSDK ending in .pkg # 3. ??? # 4. Profit src = fetchurl { - url = "http://swcdn.apple.com/content/downloads/22/52/031-45139/hcjjv7cm4n6yqk56ict73qqw15ikm5iaql/DevSDK_OSX1010.pkg"; - sha256 = "08bxa93zw7r4vzs28j9giq2qyk3b68ky6jx1bb9850gflr3nvgq1"; + url = "http://swcdn.apple.com/content/downloads/28/09/091-29862/pafhn2u002b9slnrxzy9p86rpedycnjhb5/DevSDK_OSX1012.pkg"; + sha256 = "1sggc70rypqwcjwr7ciavw8sczwll16cwqxdxrbw7r2qvy3b0nhx"; }; - buildInputs = [ xar xz cpio python ]; + buildInputs = [ xar cpio python pbzx ]; phases = [ "unpackPhase" "installPhase" "fixupPhase" ]; outputs = [ "out" "dev" "man" ]; @@ -37,7 +29,7 @@ let start="$(pwd)" mkdir -p $out cd $out - cat $start/Payload | gzip -d | cpio -idm + pbzx -n $start/Payload | cpio -idm mv usr/* . rmdir usr diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/CrashReporterClient.h b/pkgs/os-specific/darwin/apple-source-releases/Libc/CrashReporterClient.h new file mode 100644 index 000000000000..a1cbb72b9176 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/CrashReporterClient.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2010 Apple Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + +/*********************************************************************** + * Not to be installed in /usr/local/include + ***********************************************************************/ + +#ifndef _LIBC_CRASHREPORTERCLIENT_H +#define _LIBC_CRASHREPORTERCLIENT_H + +#include "stdint.h" + +/* Fake the CrashReporterClient API */ +#define CRGetCrashLogMessage() 0 +#define CRSetCrashLogMessage(m) true + +#define CRASH_REPORTER_CLIENT_HIDDEN __attribute__((visibility("hidden"))) +#define CRASHREPORTER_ANNOTATIONS_VERSION 4 +#define CRASHREPORTER_ANNOTATIONS_SECTION "__crash_info" + +struct crashreporter_annotations_t { + uint64_t version; // unsigned long + uint64_t message; // char * + uint64_t signature_string; // char * + uint64_t backtrace; // char * + uint64_t message2; // char * + uint64_t thread; // uint64_t + uint64_t dialog_mode; // unsigned int +}; + +#endif diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix index 542ea20de11e..6ebb470145d5 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libc/default.nix @@ -11,6 +11,8 @@ appleDerivation { export PRIVATE_HEADERS_FOLDER_PATH=include bash xcodescripts/headers.sh + cp ${./CrashReporterClient.h} $out/include/CrashReporterClient.h + cp ${Libc_10-9}/include/NSSystemDirectories.h $out/include # Ugh Apple stopped releasing this stuff so we need an older one... diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix index 1e27ead69f1b..a0edfbbb3b59 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -1,9 +1,11 @@ -{ stdenv, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo, - dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto, copyfile, - removefile, libresolv, Libnotify, libplatform, libpthread, mDNSResponder, launchd, libutil }: +{ stdenv, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo +, dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto +, copyfile, removefile, libresolv, Libnotify, libplatform, libpthread +, mDNSResponder, launchd, libutil, hfs }: appleDerivation rec { - phases = [ "unpackPhase" "installPhase" ]; + dontBuild = true; + dontFixup = true; nativeBuildInputs = [ cpio ]; @@ -17,19 +19,21 @@ appleDerivation rec { cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/Availability*.h $out/include cp ${xnu}/Library/Frameworks/Kernel.framework/Versions/A/Headers/stdarg.h $out/include - for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} ${libclosure} ${CarbonHeaders} \ - ${libdispatch} ${ncurses.dev} ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ - ${Libnotify} ${libplatform} ${mDNSResponder} ${launchd} ${libutil} ${libpthread}; do + for dep in ${Libc} ${Libm} ${Libinfo} ${dyld} ${architecture} \ + ${libclosure} ${CarbonHeaders} ${libdispatch} ${ncurses.dev} \ + ${CommonCrypto} ${copyfile} ${removefile} ${libresolv} \ + ${Libnotify} ${libplatform} ${mDNSResponder} ${launchd} \ + ${libutil} ${libpthread} ${hfs}; do (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) done - (cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o) cat < $out/include/TargetConditionals.h #ifndef __TARGETCONDITIONALS__ #define __TARGETCONDITIONALS__ #define TARGET_OS_MAC 1 + #define TARGET_OS_OSX 1 #define TARGET_OS_WIN32 0 #define TARGET_OS_UNIX 0 #define TARGET_OS_EMBEDDED 0 diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols index 4d83c5cfe9bd..1ec6c6332cf4 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_c_symbols @@ -232,6 +232,8 @@ __os_assert_log_ctx __os_assumes_log __os_assumes_log_ctx __os_avoid_tail_call +__os_crash +__os_crash_callback __os_debug_log __os_debug_log_error_str __putenvp @@ -263,6 +265,7 @@ __unsetenvp __utmpxname _a64l _abort +_abort_report_np _abs _acl_add_flag_np _acl_add_perm @@ -345,6 +348,7 @@ _backtrace _backtrace_symbols _backtrace_symbols_fd _basename +_basename_r _bcmp _bcopy _brk @@ -377,8 +381,12 @@ _chmodx_np _clearerr _clearerr_unlocked _clock +_clock_getres +_clock_gettime +_clock_gettime_nsec_np _clock_port _clock_sem +_clock_settime _closedir _compat_mode _confstr @@ -411,6 +419,7 @@ _digittoint _digittoint_l _dirfd _dirname +_dirname_r _div _dprintf _dprintf_l @@ -771,8 +780,12 @@ _mergesort_b _mkdirx_np _mkdtemp _mkfifox_np +_mkostemp +_mkostemps _mkpath_np +_mkpathat_np _mkstemp +_mkstemp_dprotected_np _mkstemps _mktemp _mktime @@ -805,6 +818,7 @@ _nice _nl_langinfo _nl_langinfo_l _nrand48 +_nvis _off32 _off64 _offtime @@ -959,6 +973,7 @@ _sleep _sleep$NOCANCEL _snprintf _snprintf_l +_snvis _sockatmark _sprintf _sprintf_l @@ -988,6 +1003,7 @@ _strcoll_l _strcpy _strcspn _strdup +_strenvisx _strerror _strerror_r _strfmon @@ -1006,14 +1022,23 @@ _strncpy _strndup _strnlen _strnstr +_strnunvis +_strnunvisx +_strnvis +_strnvisx _strpbrk _strptime _strptime_l _strrchr +_strsenvisx _strsep _strsignal +_strsnvis +_strsnvisx _strspn _strstr +_strsvis +_strsvisx _strtod _strtod_l _strtof @@ -1046,6 +1071,7 @@ _strvisx _strxfrm _strxfrm_l _suboptarg +_svis _swab _swprintf _swprintf_l @@ -1087,6 +1113,7 @@ _timelocal _timeoff _times _timezone +_timingsafe_bcmp _tmpfile _tmpnam _toascii diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols index 4d1a1f521b06..7c5b90f95ed7 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/system_kernel_symbols @@ -3,6 +3,7 @@ _____old_semwait_signal_nocancel _____sigwait_nocancel ____kernelVersionNumber ____kernelVersionString +___abort_with_payload ___accept ___accept_nocancel ___access_extended @@ -13,6 +14,11 @@ ___bsdthread_ctl ___bsdthread_register ___bsdthread_terminate ___carbon_delete +___channel_get_info +___channel_get_opt +___channel_open +___channel_set_opt +___channel_sync ___chmod ___chmod_extended ___close_nocancel @@ -32,6 +38,7 @@ ___fchmod_extended ___fcntl ___fcntl_nocancel ___fork +___fs_snapshot ___fstat64_extended ___fstat_extended ___fsync_nocancel @@ -57,6 +64,8 @@ ___ioctl ___iopolicysys ___kdebug_trace ___kdebug_trace64 +___kdebug_trace_string +___kdebug_typefilter ___kill ___lchown ___libkernel_init @@ -79,6 +88,7 @@ ___mac_set_file ___mac_set_link ___mac_set_proc ___mac_syscall +___microstackshot ___mkdir_extended ___mkfifo_extended ___mmap @@ -90,6 +100,13 @@ ___msgsys ___msync ___msync_nocancel ___munmap +___nexus_create +___nexus_deregister +___nexus_destroy +___nexus_get_opt +___nexus_open +___nexus_register +___nexus_set_opt ___old_semwait_signal ___open ___open_dprotected_np @@ -97,12 +114,17 @@ ___open_extended ___open_nocancel ___openat ___openat_nocancel +___os_nexus_ifattach +___os_nexus_ifdetach +___persona ___pipe ___poll_nocancel ___posix_spawn ___pread_nocancel ___proc_info ___process_policy +___pselect +___pselect_nocancel ___psynch_cvbroad ___psynch_cvclrprepost ___psynch_cvsignal @@ -133,6 +155,7 @@ ___recvmsg ___recvmsg_nocancel ___rename ___renameat +___renameatx_np ___rmdir ___sandbox_me ___sandbox_mm @@ -175,6 +198,7 @@ ___sigsuspend ___sigsuspend_nocancel ___sigwait ___socketpair +___stack_snapshot_with_config ___stat64_extended ___stat_extended ___syscall @@ -182,8 +206,11 @@ ___syscall_logger ___sysctl ___sysctlbyname ___telemetry +___terminate_with_payload ___thread_selfid ___thread_selfusage +___ulock_wait +___ulock_wake ___umask_extended ___unlink ___unlinkat @@ -191,6 +218,7 @@ ___vfork ___wait4 ___wait4_nocancel ___waitid_nocancel +___work_interval_ctl ___workq_kernreturn ___workq_open ___write_nocancel @@ -202,6 +230,7 @@ __get_cpu_capabilities __getprivatesystemidentifier __host_page_size __init_cpu_capabilities +__kernelrpc_host_create_mach_voucher __kernelrpc_mach_port_allocate __kernelrpc_mach_port_allocate_full __kernelrpc_mach_port_allocate_name @@ -257,13 +286,17 @@ __kernelrpc_mach_vm_map __kernelrpc_mach_vm_map_trap __kernelrpc_mach_vm_protect __kernelrpc_mach_vm_protect_trap +__kernelrpc_mach_vm_purgable_control +__kernelrpc_mach_vm_purgable_control_trap __kernelrpc_mach_vm_read __kernelrpc_mach_vm_remap +__kernelrpc_mach_voucher_extract_attr_recipe __kernelrpc_task_set_port_space __kernelrpc_thread_policy __kernelrpc_thread_policy_set __kernelrpc_thread_set_policy __kernelrpc_vm_map +__kernelrpc_vm_purgable_control __kernelrpc_vm_read __kernelrpc_vm_remap __mach_errors @@ -272,6 +305,9 @@ __mach_snprintf __mach_vsnprintf __os_alloc_once_table __register_gethostuuid_callback +__thread_set_tsd_base +_abort_with_payload +_abort_with_reason _accept _accept$NOCANCEL _access @@ -312,6 +348,8 @@ _clock_set_attributes _clock_set_time _clock_sleep _clock_sleep_trap +_clonefile +_clonefileat _close _close$NOCANCEL _coalition_create @@ -345,6 +383,7 @@ _fchmod _fchmodat _fchown _fchownat +_fclonefileat _fcntl _fcntl$NOCANCEL _fdatasync @@ -358,9 +397,16 @@ _flistxattr _flock _fpathconf _fremovexattr +_fs_snapshot_create +_fs_snapshot_delete +_fs_snapshot_list +_fs_snapshot_mount +_fs_snapshot_rename +_fs_snapshot_revert _fsctl _fsetattrlist _fsetxattr +_fsgetpath _fstat _fstat$INODE64 _fstat64 @@ -384,6 +430,7 @@ _getdirentries _getdirentriesattr _getdtablesize _getegid +_getentropy _geteuid _getfh _getfsstat @@ -409,6 +456,7 @@ _getsockopt _getuid _getwgroups_np _getxattr +_grab_pgo_data _guarded_close_np _guarded_kqueue_np _guarded_open_dprotected_np @@ -416,14 +464,18 @@ _guarded_open_np _guarded_pwrite_np _guarded_write_np _guarded_writev_np +_host_check_multiuser_mode _host_create_mach_voucher +_host_create_mach_voucher_trap _host_default_memory_manager _host_get_UNDServer +_host_get_atm_diagnostic_flag _host_get_boot_info _host_get_clock_control _host_get_clock_service _host_get_exception_ports _host_get_io_master +_host_get_multiuser_config_flags _host_get_special_port _host_info _host_kernel_version @@ -443,7 +495,9 @@ _host_security_set_task_token _host_self _host_self_trap _host_set_UNDServer +_host_set_atm_diagnostic_flag _host_set_exception_ports +_host_set_multiuser_config_flags _host_set_special_port _host_statistics _host_statistics64 @@ -456,15 +510,28 @@ _internal_catch_exc_subsystem _ioctl _issetugid _kas_info +_kdebug_is_enabled +_kdebug_signpost +_kdebug_signpost_end +_kdebug_signpost_start _kdebug_trace +_kdebug_trace_string +_kdebug_typefilter _kevent _kevent64 +_kevent_qos _kext_request _kill _kmod_control _kmod_create _kmod_destroy _kmod_get_info +_kpersona_alloc +_kpersona_dealloc +_kpersona_find +_kpersona_get +_kpersona_info +_kpersona_pidinfo _kqueue _lchown _ledger @@ -487,14 +554,20 @@ _lstat$INODE64 _lstat64 _mach_absolute_time _mach_approximate_time +_mach_boottime_usec +_mach_continuous_approximate_time +_mach_continuous_time _mach_error _mach_error_full_diag _mach_error_string _mach_error_type +_mach_generate_activity_id +_mach_get_times _mach_host_self _mach_init _mach_make_memory_entry _mach_make_memory_entry_64 +_mach_memory_info _mach_memory_object_memory_entry _mach_memory_object_memory_entry_64 _mach_msg @@ -554,6 +627,7 @@ _mach_task_self _mach_task_self_ _mach_thread_self _mach_timebase_info +_mach_timebase_info_trap _mach_vm_allocate _mach_vm_behavior_set _mach_vm_copy @@ -580,6 +654,7 @@ _mach_voucher_debug_info _mach_voucher_extract_all_attr_recipes _mach_voucher_extract_attr_content _mach_voucher_extract_attr_recipe +_mach_voucher_extract_attr_recipe_trap _mach_wait_until _mach_zone_force_gc _mach_zone_info @@ -598,6 +673,7 @@ _mig_get_reply_port _mig_put_reply_port _mig_reply_setup _mig_strncpy +_mig_strncpy_zerofill _mincore _minherit _mk_timer_arm @@ -630,7 +706,10 @@ _msync$NOCANCEL _munlock _munlockall _munmap +_necp_client_action _necp_match_policy +_necp_open +_netagent_trigger _netname_check_in _netname_check_out _netname_look_up @@ -645,6 +724,44 @@ _open_dprotected_np _openat _openat$NOCANCEL _openbyid_np +_os_channel_advance_slot +_os_channel_attr_clone +_os_channel_attr_create +_os_channel_attr_destroy +_os_channel_attr_get +_os_channel_attr_get_key +_os_channel_attr_set +_os_channel_attr_set_key +_os_channel_available_slot_count +_os_channel_create +_os_channel_create_extended +_os_channel_destroy +_os_channel_get_fd +_os_channel_get_next_slot +_os_channel_pending +_os_channel_read_attr +_os_channel_read_nexus_extension_info +_os_channel_ring_id +_os_channel_rx_ring +_os_channel_set_slot_properties +_os_channel_sync +_os_channel_tx_ring +_os_channel_write_attr +_os_nexus_attr_clone +_os_nexus_attr_create +_os_nexus_attr_destroy +_os_nexus_attr_get +_os_nexus_attr_set +_os_nexus_controller_alloc_provider_instance +_os_nexus_controller_bind_provider_instance +_os_nexus_controller_create +_os_nexus_controller_deregister_provider +_os_nexus_controller_destroy +_os_nexus_controller_free_provider_instance +_os_nexus_controller_get_fd +_os_nexus_controller_read_provider_attr +_os_nexus_controller_register_provider +_os_nexus_controller_unbind_provider_instance _panic _panic_init _pathconf @@ -669,6 +786,7 @@ _posix_spawn_file_actions_addopen _posix_spawn_file_actions_destroy _posix_spawn_file_actions_init _posix_spawnattr_destroy +_posix_spawnattr_get_darwin_role_np _posix_spawnattr_get_qos_clamp_np _posix_spawnattr_getbinpref_np _posix_spawnattr_getcpumonitor @@ -680,7 +798,12 @@ _posix_spawnattr_getprocesstype_np _posix_spawnattr_getsigdefault _posix_spawnattr_getsigmask _posix_spawnattr_init +_posix_spawnattr_set_darwin_role_np _posix_spawnattr_set_importancewatch_port_np +_posix_spawnattr_set_persona_gid_np +_posix_spawnattr_set_persona_groups_np +_posix_spawnattr_set_persona_np +_posix_spawnattr_set_persona_uid_np _posix_spawnattr_set_qos_clamp_np _posix_spawnattr_setauditsessionport_np _posix_spawnattr_setbinpref_np @@ -689,6 +812,7 @@ _posix_spawnattr_setcpumonitor _posix_spawnattr_setcpumonitor_default _posix_spawnattr_setexceptionports_np _posix_spawnattr_setflags +_posix_spawnattr_setjetsam_ext _posix_spawnattr_setmacpolicyinfo_np _posix_spawnattr_setpcontrol_np _posix_spawnattr_setpgroup @@ -698,6 +822,7 @@ _posix_spawnattr_setsigmask _posix_spawnattr_setspecialport_np _pread _pread$NOCANCEL +_proc_clear_cpulimits _proc_clear_delayidlesleep _proc_clear_dirty _proc_clear_vmpressure @@ -715,8 +840,10 @@ _proc_importance_assertion_begin_with_msg _proc_importance_assertion_complete _proc_kmsgbuf _proc_libversion +_proc_list_uptrs _proc_listallpids _proc_listchildpids +_proc_listcoalitions _proc_listpgrppids _proc_listpids _proc_listpidspath @@ -728,6 +855,7 @@ _proc_pidinfo _proc_pidoriginatorinfo _proc_pidpath _proc_regionfilename +_proc_resume_cpumon _proc_rlimit_control _proc_set_cpumon_defaults _proc_set_cpumon_params @@ -737,6 +865,7 @@ _proc_set_dirty _proc_set_owner_vmpressure _proc_set_wakemon_defaults _proc_set_wakemon_params +_proc_setcpu_percentage _proc_setpcontrol _proc_setthread_cpupercent _proc_suppress @@ -790,6 +919,8 @@ _removexattr _rename _rename_ext _renameat +_renameatx_np +_renamex_np _revoke _rmdir _searchfs @@ -876,6 +1007,16 @@ _sigsuspend$NOCANCEL _socket _socket_delegate _socketpair +_stackshot_capture_with_config +_stackshot_config_create +_stackshot_config_dealloc +_stackshot_config_dealloc_buffer +_stackshot_config_get_stackshot_buffer +_stackshot_config_get_stackshot_size +_stackshot_config_set_delta_timestamp +_stackshot_config_set_flags +_stackshot_config_set_pid +_stackshot_config_set_size_hint _stat _stat$INODE64 _stat64 @@ -897,18 +1038,26 @@ _task_assign _task_assign_default _task_create _task_for_pid +_task_generate_corpse _task_get_assignment +_task_get_dyld_image_infos _task_get_emulation_vector _task_get_exception_ports _task_get_mach_voucher _task_get_special_port _task_get_state _task_info +_task_map_corpse_info +_task_map_corpse_info_64 _task_name_for_pid _task_policy _task_policy_get _task_policy_set _task_purgable_info +_task_register_dyld_get_process_state +_task_register_dyld_image_infos +_task_register_dyld_set_dyld_state +_task_register_dyld_shared_cache_image_info _task_resume _task_resume2 _task_sample @@ -931,7 +1080,10 @@ _task_swap_exception_ports _task_swap_mach_voucher _task_terminate _task_threads +_task_unregister_dyld_image_infos _task_zone_info +_terminate_with_payload +_terminate_with_reason _thread_abort _thread_abort_safely _thread_assign @@ -942,6 +1094,7 @@ _thread_depress_abort _thread_get_assignment _thread_get_exception_ports _thread_get_mach_voucher +_thread_get_register_pointer_values _thread_get_special_port _thread_get_state _thread_info @@ -968,6 +1121,7 @@ _undelete _unlink _unlinkat _unmount +_usrctl _utimes _vfork _vfs_purge @@ -1008,6 +1162,10 @@ _waitevent _waitid _waitid$NOCANCEL _watchevent +_work_interval_create +_work_interval_destroy +_work_interval_notify +_work_interval_notify_simple _write _write$NOCANCEL _writev diff --git a/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix b/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix new file mode 100644 index 000000000000..e04142b8b11e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/Security/boot.nix @@ -0,0 +1,116 @@ +{ appleDerivation }: + +appleDerivation { + phases = [ "unpackPhase" "installPhase" ]; + + __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" + ]; + + installPhase = '' + ###### IMPURITIES + mkdir -p $out/Library/Frameworks/Security.framework + pushd $out/Library/Frameworks/Security.framework + ln -s /System/Library/Frameworks/Security.framework/Security + ln -s /System/Library/Frameworks/Security.framework/Resources + ln -s /System/Library/Frameworks/Security.framework/PlugIns + ln -s /System/Library/Frameworks/Security.framework/XPCServices + popd + + ###### HEADERS + + export dest=$out/Library/Frameworks/Security.framework/Headers + mkdir -p $dest + + cp libsecurity_asn1/lib/SecAsn1Coder.h $dest + cp libsecurity_asn1/lib/SecAsn1Templates.h $dest + cp libsecurity_asn1/lib/SecAsn1Types.h $dest + cp libsecurity_asn1/lib/oidsalg.h $dest + cp libsecurity_asn1/lib/oidsattr.h $dest + + cp libsecurity_authorization/lib/AuthSession.h $dest + cp libsecurity_authorization/lib/Authorization.h $dest + cp libsecurity_authorization/lib/AuthorizationDB.h $dest + cp libsecurity_authorization/lib/AuthorizationPlugin.h $dest + cp libsecurity_authorization/lib/AuthorizationTags.h $dest + + cp libsecurity_cms/lib/CMSDecoder.h $dest + cp libsecurity_cms/lib/CMSEncoder.h $dest + + cp libsecurity_codesigning/lib/CSCommon.h $dest + cp libsecurity_codesigning/lib/CodeSigning.h $dest + cp libsecurity_codesigning/lib/SecCode.h $dest + cp libsecurity_codesigning/lib/SecCodeHost.h $dest + cp libsecurity_codesigning/lib/SecRequirement.h $dest + cp libsecurity_codesigning/lib/SecStaticCode.h $dest + cp libsecurity_codesigning/lib/SecTask.h $dest + + cp libsecurity_cssm/lib/certextensions.h $dest + cp libsecurity_cssm/lib/cssm.h $dest + cp libsecurity_cssm/lib/cssmaci.h $dest + cp libsecurity_cssm/lib/cssmapi.h $dest + cp libsecurity_cssm/lib/cssmapple.h $dest + cp libsecurity_cssm/lib/cssmcli.h $dest + cp libsecurity_cssm/lib/cssmconfig.h $dest + cp libsecurity_cssm/lib/cssmcspi.h $dest + cp libsecurity_cssm/lib/cssmdli.h $dest + cp libsecurity_cssm/lib/cssmerr.h $dest + cp libsecurity_cssm/lib/cssmkrapi.h $dest + cp libsecurity_cssm/lib/cssmkrspi.h $dest + cp libsecurity_cssm/lib/cssmspi.h $dest + cp libsecurity_cssm/lib/cssmtpi.h $dest + cp libsecurity_cssm/lib/cssmtype.h $dest + cp libsecurity_cssm/lib/eisl.h $dest + cp libsecurity_cssm/lib/emmspi.h $dest + cp libsecurity_cssm/lib/emmtype.h $dest + cp libsecurity_cssm/lib/oidsbase.h $dest + cp libsecurity_cssm/lib/oidscert.h $dest + cp libsecurity_cssm/lib/oidscrl.h $dest + cp libsecurity_cssm/lib/x509defs.h $dest + + cp libsecurity_keychain/lib/SecACL.h $dest + cp libsecurity_keychain/lib/SecAccess.h $dest + cp libsecurity_keychain/lib/SecBase.h $dest + cp libsecurity_keychain/lib/SecCertificate.h $dest + cp libsecurity_keychain/lib/SecCertificatePriv.h $dest # Private + cp libsecurity_keychain/lib/SecCertificateOIDs.h $dest + cp libsecurity_keychain/lib/SecIdentity.h $dest + cp libsecurity_keychain/lib/SecIdentitySearch.h $dest + cp libsecurity_keychain/lib/SecImportExport.h $dest + cp libsecurity_keychain/lib/SecItem.h $dest + cp libsecurity_keychain/lib/SecKey.h $dest + cp libsecurity_keychain/lib/SecKeychain.h $dest + cp libsecurity_keychain/lib/SecKeychainItem.h $dest + cp libsecurity_keychain/lib/SecKeychainSearch.h $dest + cp libsecurity_keychain/lib/SecPolicy.h $dest + cp libsecurity_keychain/lib/SecPolicySearch.h $dest + cp libsecurity_keychain/lib/SecRandom.h $dest + cp libsecurity_keychain/lib/SecTrust.h $dest + cp libsecurity_keychain/lib/SecTrustSettings.h $dest + cp libsecurity_keychain/lib/SecTrustedApplication.h $dest + cp libsecurity_keychain/lib/Security.h $dest + + cp libsecurity_manifest/lib/SecureDownload.h $dest + + cp libsecurity_mds/lib/mds.h $dest + cp libsecurity_mds/lib/mds_schema.h $dest + + cp libsecurity_ssl/lib/CipherSuite.h $dest + cp libsecurity_ssl/lib/SecureTransport.h $dest + + cp libsecurity_transform/lib/SecCustomTransform.h $dest + cp libsecurity_transform/lib/SecDecodeTransform.h $dest + cp libsecurity_transform/lib/SecDigestTransform.h $dest + cp libsecurity_transform/lib/SecEncodeTransform.h $dest + cp libsecurity_transform/lib/SecEncryptTransform.h $dest + cp libsecurity_transform/lib/SecReadTransform.h $dest + cp libsecurity_transform/lib/SecSignVerifyTransform.h $dest + cp libsecurity_transform/lib/SecTransform.h $dest + cp libsecurity_transform/lib/SecTransformReadTransform.h $dest + + ''; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix index e04142b8b11e..be744fa88736 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Security/default.nix @@ -1,116 +1,19 @@ -{ appleDerivation }: +{ stdenv, appleDerivation, xcbuildHook, Foundation, xpc, darling, dtrace, xnu }: appleDerivation { - phases = [ "unpackPhase" "installPhase" ]; + nativeBuildInputs = [ xcbuildHook dtrace ]; + # buildInputs = [ Foundation xpc darling ]; + buildInputs = [ xpc xnu ]; - __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" - ]; + xcbuildFlags = "-target Security_frameworks_osx"; - installPhase = '' - ###### IMPURITIES - mkdir -p $out/Library/Frameworks/Security.framework - pushd $out/Library/Frameworks/Security.framework - ln -s /System/Library/Frameworks/Security.framework/Security - ln -s /System/Library/Frameworks/Security.framework/Resources - ln -s /System/Library/Frameworks/Security.framework/PlugIns - ln -s /System/Library/Frameworks/Security.framework/XPCServices - popd + # NIX_CFLAGS_COMPILE = "-Wno-error -I${xnu}/include/libkern -DPRIVATE -I${xnu}/Library/Frameworks/System.framework/Headers"; - ###### HEADERS - - export dest=$out/Library/Frameworks/Security.framework/Headers - mkdir -p $dest - - cp libsecurity_asn1/lib/SecAsn1Coder.h $dest - cp libsecurity_asn1/lib/SecAsn1Templates.h $dest - cp libsecurity_asn1/lib/SecAsn1Types.h $dest - cp libsecurity_asn1/lib/oidsalg.h $dest - cp libsecurity_asn1/lib/oidsattr.h $dest - - cp libsecurity_authorization/lib/AuthSession.h $dest - cp libsecurity_authorization/lib/Authorization.h $dest - cp libsecurity_authorization/lib/AuthorizationDB.h $dest - cp libsecurity_authorization/lib/AuthorizationPlugin.h $dest - cp libsecurity_authorization/lib/AuthorizationTags.h $dest - - cp libsecurity_cms/lib/CMSDecoder.h $dest - cp libsecurity_cms/lib/CMSEncoder.h $dest - - cp libsecurity_codesigning/lib/CSCommon.h $dest - cp libsecurity_codesigning/lib/CodeSigning.h $dest - cp libsecurity_codesigning/lib/SecCode.h $dest - cp libsecurity_codesigning/lib/SecCodeHost.h $dest - cp libsecurity_codesigning/lib/SecRequirement.h $dest - cp libsecurity_codesigning/lib/SecStaticCode.h $dest - cp libsecurity_codesigning/lib/SecTask.h $dest - - cp libsecurity_cssm/lib/certextensions.h $dest - cp libsecurity_cssm/lib/cssm.h $dest - cp libsecurity_cssm/lib/cssmaci.h $dest - cp libsecurity_cssm/lib/cssmapi.h $dest - cp libsecurity_cssm/lib/cssmapple.h $dest - cp libsecurity_cssm/lib/cssmcli.h $dest - cp libsecurity_cssm/lib/cssmconfig.h $dest - cp libsecurity_cssm/lib/cssmcspi.h $dest - cp libsecurity_cssm/lib/cssmdli.h $dest - cp libsecurity_cssm/lib/cssmerr.h $dest - cp libsecurity_cssm/lib/cssmkrapi.h $dest - cp libsecurity_cssm/lib/cssmkrspi.h $dest - cp libsecurity_cssm/lib/cssmspi.h $dest - cp libsecurity_cssm/lib/cssmtpi.h $dest - cp libsecurity_cssm/lib/cssmtype.h $dest - cp libsecurity_cssm/lib/eisl.h $dest - cp libsecurity_cssm/lib/emmspi.h $dest - cp libsecurity_cssm/lib/emmtype.h $dest - cp libsecurity_cssm/lib/oidsbase.h $dest - cp libsecurity_cssm/lib/oidscert.h $dest - cp libsecurity_cssm/lib/oidscrl.h $dest - cp libsecurity_cssm/lib/x509defs.h $dest - - cp libsecurity_keychain/lib/SecACL.h $dest - cp libsecurity_keychain/lib/SecAccess.h $dest - cp libsecurity_keychain/lib/SecBase.h $dest - cp libsecurity_keychain/lib/SecCertificate.h $dest - cp libsecurity_keychain/lib/SecCertificatePriv.h $dest # Private - cp libsecurity_keychain/lib/SecCertificateOIDs.h $dest - cp libsecurity_keychain/lib/SecIdentity.h $dest - cp libsecurity_keychain/lib/SecIdentitySearch.h $dest - cp libsecurity_keychain/lib/SecImportExport.h $dest - cp libsecurity_keychain/lib/SecItem.h $dest - cp libsecurity_keychain/lib/SecKey.h $dest - cp libsecurity_keychain/lib/SecKeychain.h $dest - cp libsecurity_keychain/lib/SecKeychainItem.h $dest - cp libsecurity_keychain/lib/SecKeychainSearch.h $dest - cp libsecurity_keychain/lib/SecPolicy.h $dest - cp libsecurity_keychain/lib/SecPolicySearch.h $dest - cp libsecurity_keychain/lib/SecRandom.h $dest - cp libsecurity_keychain/lib/SecTrust.h $dest - cp libsecurity_keychain/lib/SecTrustSettings.h $dest - cp libsecurity_keychain/lib/SecTrustedApplication.h $dest - cp libsecurity_keychain/lib/Security.h $dest - - cp libsecurity_manifest/lib/SecureDownload.h $dest - - cp libsecurity_mds/lib/mds.h $dest - cp libsecurity_mds/lib/mds_schema.h $dest - - cp libsecurity_ssl/lib/CipherSuite.h $dest - cp libsecurity_ssl/lib/SecureTransport.h $dest - - cp libsecurity_transform/lib/SecCustomTransform.h $dest - cp libsecurity_transform/lib/SecDecodeTransform.h $dest - cp libsecurity_transform/lib/SecDigestTransform.h $dest - cp libsecurity_transform/lib/SecEncodeTransform.h $dest - cp libsecurity_transform/lib/SecEncryptTransform.h $dest - cp libsecurity_transform/lib/SecReadTransform.h $dest - cp libsecurity_transform/lib/SecSignVerifyTransform.h $dest - cp libsecurity_transform/lib/SecTransform.h $dest - cp libsecurity_transform/lib/SecTransformReadTransform.h $dest + preBuild = '' + dtrace -h -C -s OSX/libsecurity_utilities/lib/security_utilities.d -o OSX/libsecurity_utilities/lib/utilities_dtrace.h + xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target copyHeadersToSystem + NIX_CFLAGS_COMPILE+=" -F./Products/Release" + ln -s $PWD/Products/Release/Security.bundle/Contents $PWD/Products/Release/Security.framework ''; } diff --git a/pkgs/os-specific/darwin/apple-source-releases/SmartCardServices/default.nix b/pkgs/os-specific/darwin/apple-source-releases/SmartCardServices/default.nix deleted file mode 100644 index 6e9003350780..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/SmartCardServices/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ stdenv, appleDerivation, xcbuildHook, gnumake, Security -, libsecurity_utilities, libsecurity_cdsa_utilities }: - -appleDerivation { - nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ libsecurity_utilities libsecurity_cdsa_utilities ]; - - DSTROOT = "$out"; - - NIX_CFLAGS_COMPILE = "-I."; - preBuild = '' - mkdir -p Security - cp ${Security}/Library/Frameworks/Security.framework/Headers/*.h Security - ''; - - patchPhase = '' - substituteInPlace SmartCardServices.xcodeproj/project.pbxproj \ - --replace "/usr/bin/gnumake" "${gnumake}/bin/make" - substituteInPlace src/PCSC/PCSC.exp \ - --replace _PCSCVersionString "" \ - --replace _PCSCVersionNumber "" - substituteInPlace Makefile.installPhase \ - --replace chown "# chown" \ - --replace /usr/bin/ "" - ''; - - installPhase = '' - make -f Makefile.installPhase install - make -f Makefile-exec.installPhase install - mv $out/usr/* $out - rmdir $out/usr - - mkdir -p $out/Library/Frameworks - cp -r Products/Release/PCSC.bundle $out/Library/Frameworks/PCSC.framework - ''; - - meta = with stdenv.lib; { - maintainers = with maintainers; [ matthewbauer ]; - platforms = platforms.darwin; - license = licenses.apsl20; - }; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix new file mode 100644 index 000000000000..318e2728fc2e --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/boot.nix @@ -0,0 +1,91 @@ +{ stdenv, appleDerivation, fetchzip, bsdmake, perl, flex, yacc +}: + +# this derivation sucks +# locale data was removed after adv_cmds-118, so our base is that because it's easier than +# replicating the bizarre bsdmake file structure +# +# sadly adv_cmds-118 builds a mklocale and colldef that generate files that our libc can no +# longer understand +# +# the more recent adv_cmds release is used for everything else in this package + +let recentAdvCmds = fetchzip { + url = "http://opensource.apple.com/tarballs/adv_cmds/adv_cmds-158.tar.gz"; + sha256 = "0z081kcprzg5jcvqivfnwvvv6wfxzkjg2jc2lagsf8c7j7vgm8nn"; +}; + +in appleDerivation { + nativeBuildInputs = [ bsdmake perl yacc flex ]; + buildInputs = [ flex ]; + + patchPhase = '' + substituteInPlace BSDmakefile \ + --replace chgrp true \ + --replace /Developer/Makefiles/bin/compress-man-pages.pl true \ + --replace "ps.tproj" "" --replace "gencat.tproj" "" --replace "md.tproj" "" \ + --replace "tabs.tproj" "" --replace "cap_mkdb.tproj" "" \ + --replace "!= tconf --test TARGET_OS_EMBEDDED" "= NO" + + substituteInPlace Makefile --replace perl true + + for subproject in colldef mklocale monetdef msgdef numericdef timedef; do + substituteInPlace usr-share-locale.tproj/$subproject/BSDmakefile \ + --replace /usr/share/locale "" \ + --replace '-o ''${BINOWN} -g ''${BINGRP}' "" \ + --replace "rsync -a" "cp -r" + done + ''; + + preBuild = '' + cp -r --no-preserve=all ${recentAdvCmds}/colldef . + pushd colldef + mv locale/collate.h . + flex -t -8 -i scan.l > scan.c + yacc -d parse.y + clang *.c -o colldef -lfl + popd + mv colldef/colldef colldef.tproj/colldef + + cp -r --no-preserve=all ${recentAdvCmds}/mklocale . + pushd mklocale + flex -t -8 -i lex.l > lex.c + yacc -d yacc.y + clang *.c -o mklocale -lfl + popd + mv mklocale/mklocale mklocale.tproj/mklocale + ''; + + buildPhase = '' + runHook preBuild + + bsdmake -C usr-share-locale.tproj + + clang ${recentAdvCmds}/ps/*.c -o ps + ''; + + installPhase = '' + bsdmake -C usr-share-locale.tproj install DESTDIR="$locale/share/locale" + + # need to get rid of runtime dependency on flex + # install -d 0755 $locale/bin + # install -m 0755 colldef.tproj/colldef $locale/bin + # install -m 0755 mklocale.tproj/mklocale $locale/bin + + install -d 0755 $ps/bin + install ps $ps/bin/ps + touch "$out" + ''; + + outputs = [ + "out" + "ps" + "locale" + ]; + setOutputFlags = false; + + meta = { + platforms = stdenv.lib.platforms.darwin; + maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; + }; +} diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix index 1d8ebac74b0e..0cbd7d81b902 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix @@ -1,69 +1,36 @@ -{ stdenv, appleDerivation, fetchzip, bsdmake, perl, flex, yacc -}: +{ stdenv, appleDerivation, xcbuild, ncurses, libutil }: -# this derivation sucks -# locale data was removed after adv_cmds-118, so our base is that because it's easier than -# replicating the bizarre bsdmake file structure -# -# sadly adv_cmds-118 builds a mklocale and colldef that generate files that our libc can no -# longer understand -# -# the more recent adv_cmds release is used for everything else in this package +appleDerivation { + # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264 -let recentAdvCmds = fetchzip { - url = "https://opensource.apple.com/tarballs/adv_cmds/adv_cmds-158.tar.gz"; - sha256 = "0z081kcprzg5jcvqivfnwvvv6wfxzkjg2jc2lagsf8c7j7vgm8nn"; -}; - -in appleDerivation { - nativeBuildInputs = [ bsdmake perl yacc flex ]; - buildInputs = [ flex ]; + # pkill requires special private headers that are unavailable in + # NixPkgs. These ones are needed: + # - xpc/xpxc.h + # - os/base_private.h + # - _simple.h + # We disable it here for now. TODO: build pkill inside adv_cmds + # We also disable locale here because of some issues with a missing + # "lstdc++". patchPhase = '' - substituteInPlace BSDmakefile \ - --replace chgrp true \ - --replace /Developer/Makefiles/bin/compress-man-pages.pl true \ - --replace "ps.tproj" "" --replace "gencat.tproj" "" --replace "md.tproj" "" \ - --replace "tabs.tproj" "" --replace "cap_mkdb.tproj" "" \ - --replace "!= tconf --test TARGET_OS_EMBEDDED" "= NO" - - substituteInPlace Makefile --replace perl true - - for subproject in colldef mklocale monetdef msgdef numericdef timedef; do - substituteInPlace usr-share-locale.tproj/$subproject/BSDmakefile \ - --replace /usr/share/locale "" \ - --replace '-o ''${BINOWN} -g ''${BINGRP}' "" \ - --replace "rsync -a" "cp -r" - done - ''; - - preBuild = '' - cp -r --no-preserve=all ${recentAdvCmds}/colldef . - pushd colldef - mv locale/collate.h . - flex -t -8 -i scan.l > scan.c - yacc -d parse.y - clang *.c -o colldef -lfl - popd - mv colldef/colldef colldef.tproj/colldef - - cp -r --no-preserve=all ${recentAdvCmds}/mklocale . - pushd mklocale - flex -t -8 -i lex.l > lex.c - yacc -d yacc.y - clang *.c -o mklocale -lfl - popd - mv mklocale/mklocale mklocale.tproj/mklocale + substituteInPlace adv_cmds.xcodeproj/project.pbxproj \ + --replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \ + --replace "FDF278D60FC6204E00D7A3C6 /* locale.cc in Sources */," "" \ + --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib' ''; buildPhase = '' - runHook preBuild + targets=$(xcodebuild -list \ + | awk '/Targets:/{p=1;print;next} p&&/^\s*$/{p=0};p' \ + | tail -n +2 | sed 's/^[ \t]*//' \ + | grep -v -e Desktop -e Embedded -e mklocale -e colldef) - bsdmake -C usr-share-locale.tproj - - clang ${recentAdvCmds}/ps/*.c -o ps + for i in $targets; do + xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target $i + done ''; + # temporary install phase until xcodebuild has "install" support installPhase = '' for f in Products/Release/*; do if [ -f $f ]; then @@ -71,27 +38,19 @@ in appleDerivation { fi done - bsdmake -C usr-share-locale.tproj install DESTDIR="$locale/share/locale" + mkdir -p $out/System/Library/LaunchDaemons + install fingerd/finger.plist $out/System/Library/LaunchDaemons - # need to get rid of runtime dependency on flex - # install -d 0755 $locale/bin - # install -m 0755 colldef.tproj/colldef $locale/bin - # install -m 0755 mklocale.tproj/mklocale $locale/bin - - install -d 0755 $ps/bin - install ps $ps/bin/ps - touch "$out" + # from variant_links.sh + # ln -s $out/bin/pkill $out/bin/pgrep + # ln -s $out/share/man/man1/pkill.1 $out/share/man/man1/pgrep.1 ''; - outputs = [ - "out" - "ps" - "locale" - ]; - setOutputFlags = false; + nativeBuildInputs = [ xcbuild ]; + buildInputs = [ ncurses libutil ]; meta = { platforms = stdenv.lib.platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; + maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; }; } diff --git a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix b/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix deleted file mode 100644 index 45912041a24c..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/adv_cmds/xcode.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ stdenv, appleDerivation, xcbuild, ncurses, libutil-new }: - -appleDerivation { - # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264 - - # pkill requires special private headers that are unavailable in - # NixPkgs. These ones are needed: - # - xpc/xpxc.h - # - os/base_private.h - # - _simple.h - # We disable it here for now. TODO: build pkill inside adv_cmds - - # We also disable locale here because of some issues with a missing - # "lstdc++". - patchPhase = '' - substituteInPlace adv_cmds.xcodeproj/project.pbxproj \ - --replace "FD201DC214369B4200906237 /* pkill.c in Sources */," "" \ - --replace "FDF278D60FC6204E00D7A3C6 /* locale.cc in Sources */," "" \ - --replace '/usr/lib/libtermcap.dylib' 'libncurses.dylib' \ - --replace 'DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";' "" - ''; - - buildPhase = '' - targets=$(xcodebuild -list \ - | awk '/Targets:/{p=1;print;next} p&&/^\s*$/{p=0};p' \ - | tail -n +2 | sed 's/^[ \t]*//' \ - | grep -v -e Desktop -e Embedded -e mklocale -e colldef) - - for i in $targets; do - xcodebuild SYMROOT=$PWD/Products OBJROOT=$PWD/Intermediates -target $i - done - ''; - - # temporary install phase until xcodebuild has "install" support - installPhase = '' - mkdir -p $out/bin/ - install Products/Release/* $out/bin/ - - for n in 1 8; do - mkdir -p $out/share/man/man$n - install */*.$n $out/share/man/man$n - done - - mkdir -p $out/System/Library/LaunchDaemons - install fingerd/finger.plist $out/System/Library/LaunchDaemons - - # from variant_links.sh - # ln -s $out/bin/pkill $out/bin/pgrep - # ln -s $out/share/man/man1/pkill.1 $out/share/man/man1/pgrep.1 - ''; - - nativeBuildInputs = [ xcbuild ]; - buildInputs = [ ncurses libutil-new ]; - - meta = { - platforms = stdenv.lib.platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; - }; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix index 591e7bd52303..256781f61b11 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/bootstrap_cmds/default.nix @@ -32,6 +32,7 @@ appleDerivation { chmod +x mig.sh cp mig.sh $out/bin/mig cp migcom $out/libexec + ln -s $out/libexec/migcom $out/bin/migcom cp mig.1 $out/share/man/man1 cp migcom.1 $out/share/man/man1 diff --git a/pkgs/os-specific/darwin/apple-source-releases/default.nix b/pkgs/os-specific/darwin/apple-source-releases/default.nix index c9473bca06d4..d5094e1f91e4 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/default.nix @@ -6,9 +6,31 @@ let # a stdenv out of something like this. With some care we can probably get rid of this, but for # now it's staying here. versions = { + "osx-10.12.6" = { + xnu = "3789.70.16"; + libiconv = "50"; + Libnotify = "165.20.1"; + objc4 = "709.1"; + dyld = "433.5"; + CommonCrypto = "60092.50.5"; + copyfile = "138"; + ppp = "838.50.1"; + libclosure = "67"; + Libinfo = "503.50.4"; + Libsystem = "1238.60.2"; + removefile = "45"; + libresolv = "64"; + libplatform = "126.50.8"; + mDNSResponder = "765.50.9"; + libutil = "47.30.1"; + libunwind = "35.3"; + Libc = "1158.50.2"; + dtrace = "209.50.12"; + libpthread = "218.60.3"; + hfs = "366.70.1"; + }; "osx-10.11.6" = { PowerManagement = "572.50.1"; - SmartCardServices = "55111"; dtrace = "168"; xnu = "3248.60.10"; libpthread = "138.10.4"; @@ -58,7 +80,6 @@ let ICU = "531.48"; libdispatch = "442.1.4"; Security = "57031.40.6"; - security_systemkeychain = "55202"; IOAudioFamily = "203.3"; IOFireWireFamily = "458"; @@ -94,28 +115,6 @@ let "osx-10.8.4" = { IOUSBFamily = "560.4.2"; }; - "osx-10.7.5" = { - libsecurity_apple_csp = "55003"; - libsecurity_apple_cspdl = "55000"; - libsecurity_apple_file_dl = "55000"; - libsecurity_apple_x509_cl = "55004"; - libsecurity_apple_x509_tp = "55009.3"; - libsecurity_asn1 = "55000.2"; - libsecurity_cdsa_client = "55000"; - libsecurity_cdsa_plugin = "55001"; - libsecurity_cdsa_utilities = "55006"; - libsecurity_cdsa_utils = "55000"; - libsecurity_codesigning = "55037.15"; - libsecurity_cssm = "55005.5"; - libsecurity_filedb = "55016.1"; - libsecurity_keychain = "55050.9"; - libsecurity_mds = "55000"; - libsecurity_ocspd = "55010"; - libsecurity_pkcs12 = "55000"; - libsecurity_sd_cspdl = "55003"; - libsecurity_utilities = "55030.3"; - libsecurityd = "55004"; - }; "osx-10.7.4" = { Libm = "2026"; }; @@ -166,10 +165,6 @@ let callPackage = pkgs.newScope (packages // pkgs.darwin // { inherit appleDerivation name version; }); in callPackage (./. + "/${namePath}"); - libsecPackage = pkgs.callPackage ./libsecurity_generic { - inherit applePackage appleDerivation_; - }; - IOKitSpecs = { IOAudioFamily = fetchApple "osx-10.10.5" "0ggq7za3iq8g02j16rj67prqhrw828jsw3ah3bxq8a1cvr55aqnq"; IOFireWireFamily = fetchApple "osx-10.10.5" "059qa1m668kwvchl90cqcx35b31zaqdg61zi11y1imn5s389y2g1"; @@ -194,60 +189,58 @@ let IOKitSrcs = stdenv.lib.mapAttrs (name: value: if stdenv.lib.isFunction value then value name else value) IOKitSpecs; - adv_cmds = applePackage "adv_cmds" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {}; + # Only used for bootstrapping. It’s convenient because it was the last version to come with a real makefile. + adv_cmds-boot = applePackage "adv_cmds/boot.nix" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {}; packages = { - SmartCardServices = applePackage "SmartCardServices" "osx-10.11.6" "1qqjlbi6j37mw9p3qpfnwf14xh9ff8h5786bmvzwc4kblfglabkm" {}; - - inherit (adv_cmds) ps locale; + inherit (adv_cmds-boot) ps locale; architecture = applePackage "architecture" "osx-10.11.6" "1pbpjcd7is69hn8y29i98ci0byik826if8gnp824ha92h90w0fq3" {}; bootstrap_cmds = applePackage "bootstrap_cmds" "dev-tools-7.0" "1v5dv2q3af1xwj5kz0a5g54fd5dm6j4c9dd2g66n4kc44ixyrhp3" {}; bsdmake = applePackage "bsdmake" "dev-tools-3.2.6" "11a9kkhz5bfgi1i8kpdkis78lhc6b5vxmhd598fcdgra1jw4iac2" {}; CarbonHeaders = applePackage "CarbonHeaders" "osx-10.6.2" "1zam29847cxr6y9rnl76zqmkbac53nx0szmqm9w5p469a6wzjqar" {}; - CommonCrypto = applePackage "CommonCrypto" "osx-10.11.6" "0vllfpb8f4f97wj2vpdd7w5k9ibnsbr6ff1zslpp6q323h01n25y" {}; - configd = applePackage "configd" "osx-10.8.5" "1gxakahk8gallf16xmhxhprdxkh3prrmzxnmxfvj0slr0939mmr2" {}; - copyfile = applePackage "copyfile" "osx-10.11.6" "1rkf3iaxmjz5ycgrmf0g971kh90jb2z1zqxg5vlqz001s4y457gs" {}; + CommonCrypto = applePackage "CommonCrypto" "osx-10.12.6" "0sgsqjcxbdm2g2zfpc50mzmk4b4ldyw7xvvkwiayhpczg1fga4ff" {}; + configd = applePackage "configd" "osx-10.8.5" "1gxakahk8gallf16xmhxhprdxkh3prrmzxnmxfvj0slr0939mmr2" { + Security = applePackage "Security/boot.nix" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; + }; + copyfile = applePackage "copyfile" "osx-10.12.6" "0a70bvzndkava1a946cdq42lnjhg7i7b5alpii3lap6r5fkvas0n" {}; Csu = applePackage "Csu" "osx-10.11.6" "0yh5mslyx28xzpv8qww14infkylvc1ssi57imhi471fs91sisagj" {}; - dtrace = applePackage "dtrace" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; - dtrace-xcode = applePackage "dtrace/xcode.nix" "osx-10.11.6" "04mi0jy8gy0w59rk9i9dqznysv6fzz1v5mq779s41cp308yi0h1c" {}; - dyld = applePackage "dyld" "osx-10.11.6" "0qkjmjazm2zpgvwqizhandybr9cm3gz9pckx8rmf0py03faafc08" {}; + dtrace = applePackage "dtrace" "osx-10.12.6" "0hpd6348av463yqf70n3xkygwmf1i5zza8kps4zys52sviqz3a0l" {}; + dyld = applePackage "dyld" "osx-10.12.6" "0q4jmk78b5ajn33blh4agyq6v2a63lpb3fln78az0dy12bnp1qqk" {}; eap8021x = applePackage "eap8021x" "osx-10.11.6" "0iw0qdib59hihyx2275rwq507bq2a06gaj8db4a8z1rkaj1frskh" {}; - - # Splicing is currently broken in Nixpkgs - # cctools need to be specified manually here to handle this ICU = applePackage "ICU" "osx-10.10.5" "1qihlp42n5g4dl0sn0f9pc0bkxy1452dxzf0vr6y5gqpshlzy03p" {}; - IOKit = applePackage "IOKit" "osx-10.11.6" "0kcbrlyxcyirvg5p95hjd9k8a01k161zg0bsfgfhkb90kh2s8x00" { inherit IOKitSrcs; }; launchd = applePackage "launchd" "osx-10.9.5" "0w30hvwqq8j5n90s3qyp0fccxflvrmmjnicjri4i1vd2g196jdgj" {}; libauto = applePackage "libauto" "osx-10.9.5" "17z27yq5d7zfkwr49r7f0vn9pxvj95884sd2k6lq6rfaz9gxqhy3" {}; - Libc = applePackage "Libc" "osx-10.11.5" "1qv7r0dgz06jy9i5agbqzxgdibb0m8ylki6g5n5pary88lzrawfd" { + Libc = applePackage "Libc" "osx-10.12.6" "183wcy1nlj2wkpfsx3k3lyv917mk8r2p72qw8lb89mbjsw3yw0xx" { Libc_10-9 = fetchzip { url = "http://www.opensource.apple.com/tarballs/Libc/Libc-997.90.3.tar.gz"; sha256 = "1xchgxkxg5288r2b9yfrqji2gsgdap92k4wx2dbjwslixws12pq7"; }; + Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {}; }; - Libc_old = applePackage "Libc/825_40_1.nix" "osx-10.8.5" "0xsx1im52gwlmcrv4lnhhhn9dyk5ci6g27k6yvibn9vj8fzjxwcf" {}; libclosure = applePackage "libclosure" "osx-10.11.6" "1zqy1zvra46cmqv6vsf1mcsz3a76r9bky145phfwh4ab6y15vjpq" {}; libdispatch = applePackage "libdispatch" "osx-10.10.5" "0jsfbzp87lwk9snlby0hd4zvj7j894p5q3cw0wdx9ny1mcp3kdcj" {}; - libiconv = applePackage "libiconv" "osx-10.11.6" "11h6lfajydri4widis62q8scyz7z8l6msqyx40ly4ahsdlbl0981" {}; + libiconv = applePackage "libiconv" "osx-10.12.6" "1gg5h6z8sk851bhv87vyxzs54jmqz6lh57ny8j4s51j7srja0nly" {}; Libinfo = applePackage "Libinfo" "osx-10.11.6" "0qjgkd4y8sjvwjzv5wwyzkb61pg8wwg95bkp721dgzv119dqhr8x" {}; Libm = applePackage "Libm" "osx-10.7.4" "02sd82ig2jvvyyfschmb4gpz6psnizri8sh6i982v341x6y4ysl7" {}; - Libnotify = applePackage "Libnotify" "osx-10.11.6" "0zbcyxlcfhf91jxczhd5bq9qfgvg494gwwp3l7q5ayb2qdihzr8b" {}; - libplatform = applePackage "libplatform" "osx-10.11.6" "1v4ik6vlklwsi0xb1g5kmhy29j9xk5m2y8xb9zbi1k4ng8x39czk" {}; - libpthread = applePackage "libpthread" "osx-10.11.6" "1kbw738cmr9pa7pz1igmajs307clfq7gv2vm1sqdzhcnnjxbl28w" {}; - libresolv = applePackage "libresolv" "osx-10.11.6" "09flfdi3dlzq0yap32sxidacpc4nn4va7z12a6viip21ix2xb2gf" {}; - Libsystem = applePackage "Libsystem" "osx-10.11.6" "1nfkmbqml587v2s1d1y2s2v8nmr577jvk51y6vqrfvsrhdhc2w94" {}; - libutil = applePackage "libutil" "osx-10.11.6" "1gmgmcyqdyc684ih7dimdmxdljnq7mzjy5iqbf589wc0pa8h5abm" {}; - libutil-new = applePackage "libutil/new.nix" "osx-10.11.6" "1gmgmcyqdyc684ih7dimdmxdljnq7mzjy5iqbf589wc0pa8h5abm" {}; - libunwind = applePackage "libunwind" "osx-10.11.6" "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {}; - mDNSResponder = applePackage "mDNSResponder" "osx-10.11.6" "069incq28a78yh1bnr17h9cd5if5mwqpq8ahnkyxxx25fkaxgzcf" {}; - objc4 = applePackage "objc4" "osx-10.11.6" "00b7vbgxni8frrqyi69b4njjihlwydzjd9zj9x4z5dbx8jabkvrj" {}; - ppp = applePackage "ppp" "osx-10.11.6" "1dql6r1v0vbcs04958nn2i6p31yfsxyy51jca63bm5mf0gxalk3f" {}; - removefile = applePackage "removefile" "osx-10.11.6" "1b6r74ry3k01kypvlaclf33fha15pcm0kzx9zrymlg66wg0s0i3r" {}; - Security = applePackage "Security" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; - xnu = applePackage "xnu" "osx-10.11.6" "0yhziq4dqqcbjpf6vyqn8xhwva2zb525gndkx8cp8alzwp76jnr9" {}; + Libnotify = applePackage "Libnotify" "osx-10.12.6" "0p5qhvalf6j1w6n8xwywhn6dvbpzv74q5wqrgs8rwfpf74wg6s9z" {}; + libplatform = applePackage "libplatform" "osx-10.12.6" "0rh1f5ybvwz8s0nwfar8s0fh7jbgwqcy903cv2x8m15iq1x599yn" {}; + libpthread = applePackage "libpthread" "osx-10.12.6" "1j6541rcgjpas1fc77ip5krjgw4bvz6jq7bq7h9q7axb0jv2ns6c" {}; + libresolv = applePackage "libresolv" "osx-10.12.6" "077j6ljfh7amqpk2146rr7dsz5vasvr3als830mgv5jzl7l6vz88" {}; + Libsystem = applePackage "Libsystem" "osx-10.12.6" "1082ircc1ggaq3wha218vmfa75jqdaqidsy1bmrc4ckfkbr3bwx2" { + libutil = pkgs.darwin.libutil.override { headersOnly = true; }; + hfs = pkgs.darwin.hfs.override { headersOnly = true; }; + }; + libutil = applePackage "libutil" "osx-10.12.6" "0lqdxaj82h8yjbjm856jjz9k2d96k0viimi881akfng08xk1246y" {}; + libunwind = applePackage "libunwind" "osx-10.12.6" "0miffaa41cv0lzf8az5k1j1ng8jvqvxcr4qrlkf3xyj479arbk1b" {}; + mDNSResponder = applePackage "mDNSResponder" "osx-10.12.6" "02ms1p8zlgmprzn65jzr7yaqxykh3zxjcrw0c06aayim6h0dsqfy" {}; + objc4 = applePackage "objc4" "osx-10.12.6" "1cj1vhbcs9pkmag2ms8wslagicnq9bxi2qjkszmp3ys7z7ccrbwz" {}; + ppp = applePackage "ppp" "osx-10.12.6" "1kcc2nc4x1kf8sz0a23i6nfpvxg381kipi0qdisrp8x9z2gbkxb8" {}; + removefile = applePackage "removefile" "osx-10.12.6" "0jzjxbmxgjzhssqd50z7kq9dlwrv5fsdshh57c0f8mdwcs19bsyx" {}; + xnu = applePackage "xnu" "osx-10.12.6" "1sjb0i7qzz840v2h4z3s4jyjisad4r5yyi6sg8pakv3wd81i5fg5" {}; + hfs = applePackage "hfs" "osx-10.12.6" "1mj3xvqpq1mgd80b6kl1s04knqnap7hccr0gz8rjphalq14rbl5g" {}; Librpcsvc = applePackage "Librpcsvc" "osx-10.11.6" "1zwfwcl9irxl1dlnf2b4v30vdybp0p0r6n6g1pd14zbdci1jcg2k" {}; - adv_cmds = applePackage "adv_cmds/xcode.nix" "osx-10.11.6" "12gbv35i09aij9g90p6b3x2f3ramw43qcb2gjrg8lzkzmwvcyw9q" {}; + adv_cmds = applePackage "adv_cmds" "osx-10.11.6" "12gbv35i09aij9g90p6b3x2f3ramw43qcb2gjrg8lzkzmwvcyw9q" {}; basic_cmds = applePackage "basic_cmds" "osx-10.11.6" "0hvab4b1v5q2x134hdkal0rmz5gsdqyki1vb0dbw4py1bqf0yaw9" {}; developer_cmds = applePackage "developer_cmds" "osx-10.11.6" "1r9c2b6dcl22diqf90x58psvz797d3lxh4r2wppr7lldgbgn24di" {}; diskdev_cmds = applePackage "diskdev_cmds" "osx-10.11.6" "1ssdyiaq5m1zfy96yy38yyknp682ki6bvabdqd5z18fa0rv3m2ar" {}; @@ -259,28 +252,8 @@ let top = applePackage "top" "osx-10.11.6" "0i9120rfwapgwdvjbfg0ya143i29s1m8zbddsxh39pdc59xnsg5l" {}; PowerManagement = applePackage "PowerManagement" "osx-10.11.6" "1llimhvp0gjffd47322lnjq7cqwinx0c5z7ikli04ad5srpa68mh" {}; - security_systemkeychain = applePackage "security_systemkeychain" "osx-10.10.5" "0xviskdgxsail15npi0billyiysvljlmg38mmhnr7qi4ymnnjr90" {}; - - libsecurity_apple_csp = libsecPackage "libsecurity_apple_csp" "osx-10.7.5" "1ngyn1ik27n4x981px3kfd1z1n8zx7r5w812b6qfjpy5nw4h746w" {}; - libsecurity_apple_cspdl = libsecPackage "libsecurity_apple_cspdl" "osx-10.7.5" "1svqa5fhw7p7njzf8bzg7zgc5776aqjhdbnlhpwmr5hmz5i0x8r7" {}; - libsecurity_apple_file_dl = libsecPackage "libsecurity_apple_file_dl" "osx-10.7.5" "1dfqani3n135i3iqmafc1k9awmz6s0a78zifhk15rx5a8ps870bl" {}; - libsecurity_apple_x509_cl = libsecPackage "libsecurity_apple_x509_cl" "osx-10.7.5" "1gji2i080560s08k1nigsla1zdmi6slyv97xaj5vqxjpxb0g1xf5" {}; - libsecurity_apple_x509_tp = libsecPackage "libsecurity_apple_x509_tp" "osx-10.7.5" "1bsms3nvi62wbvjviwjhjhzhylad8g6vmvlj3ngd0wyd0ywxrs46" {}; - libsecurity_asn1 = libsecPackage "libsecurity_asn1" "osx-10.7.5" "0i8aakjxdfj0lqcgqmbip32g7r4h57xhs8w0sxfvfl45q22s782w" {}; - libsecurity_cdsa_client = libsecPackage "libsecurity_cdsa_client" "osx-10.7.5" "127jxnypkycy8zqwicfv333h11318m00gd37jnswbrpg44xd1wdy" {}; - libsecurity_cdsa_plugin = libsecPackage "libsecurity_cdsa_plugin" "osx-10.7.5" "0ifmx85rs51i7zjm015s8kc2dqyrlvbr39lw9xzxgd2ds33i4lfj" {}; - libsecurity_cdsa_utilities = libsecPackage "libsecurity_cdsa_utilities" "osx-10.7.5" "1kzsl0prvfa8a0m3j3pcxq06aix1csgayd3lzx27iqg84c8mhzan" {}; - libsecurity_cdsa_utils = libsecPackage "libsecurity_cdsa_utils" "osx-10.7.5" "0q55jizav6n0lkj7lcmcr2mjdhnbnnn525fa9ipwgvzbspihw0g6" {}; - libsecurity_codesigning = libsecPackage "libsecurity_codesigning" "osx-10.7.5" "0vf5nj2g383b4hknlp51qll5pm8z4qbf56dnc16n3wm8gj82iasy" {}; - libsecurity_cssm = libsecPackage "libsecurity_cssm" "osx-10.7.5" "0l6ia533bhr8kqp2wa712bnzzzisif3kbn7h3bzzf4nps4wmwzn4" {}; - libsecurity_filedb = libsecPackage "libsecurity_filedb" "osx-10.7.5" "1r0ik95xapdl6l2lhd079vpq41jjgshz2hqb8490gpy5wyc49cxb" {}; - libsecurity_keychain = libsecPackage "libsecurity_keychain" "osx-10.7.5" "15wf2slcgyns61kk7jndgm9h22vidyphh9x15x8viyprra9bkhja" {}; - libsecurity_mds = libsecPackage "libsecurity_mds" "osx-10.7.5" "0vin5hnzvkx2rdzaaj2gxmx38amxlyh6j24a8gc22y09d74p5lzs" {}; - libsecurity_ocspd = libsecPackage "libsecurity_ocspd" "osx-10.7.5" "1bxzpihc6w0ji4x8810a4lfkq83787yhjl60xm24bv1prhqcm73b" {}; - libsecurity_pkcs12 = libsecPackage "libsecurity_pkcs12" "osx-10.7.5" "1yq8p2sp39q40fxshb256b7jn9lvmpymgpm8yz9kqrf980xddgsg" {}; - libsecurity_sd_cspdl = libsecPackage "libsecurity_sd_cspdl" "osx-10.7.5" "10v76xycfnvz1n0zqfbwn3yh4w880lbssqhkn23iim3ihxgm5pbd" {}; - libsecurity_utilities = libsecPackage "libsecurity_utilities" "osx-10.7.5" "0ayycfy9jm0n0c7ih9f3m69ynh8hs80v8yicq47aa1h9wclbxg8r" {}; - libsecurityd = libsecPackage "libsecurityd" "osx-10.7.5" "1ywm2qj8l7rhaxy5biwxsyavd0d09d4bzchm03nlvwl313p2747x" {}; - security_dotmac_tp = libsecPackage "security_dotmac_tp" "osx-10.9.5" "1l4fi9qhrghj0pkvywi8da22bh06c5bv3l40a621b5g258na50pl" {}; + # TODO(matthewbauer): + # To be removed, once I figure out how to build a newer Security version. + Security = applePackage "Security/boot.nix" "osx-10.9.5" "1nv0dczf67dhk17hscx52izgdcyacgyy12ag0jh6nl5hmfzsn8yy" {}; }; in packages diff --git a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix index 08c7a883502d..6d3bd103811d 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/diskdev_cmds/default.nix @@ -1,9 +1,9 @@ { stdenv, appleDerivation, xcbuildHook -, Libc, xnu, libutil-new }: +, Libc, xnu, libutil }: appleDerivation { nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ libutil-new ]; + buildInputs = [ libutil ]; NIX_CFLAGS_COMPILE = "-I."; NIX_LDFLAGS = "-lutil"; diff --git a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix index fd2c95563b48..8706d22be19b 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/dtrace/default.nix @@ -1,50 +1,53 @@ -{ appleDerivation, cctools, zlib }: +{ appleDerivation, xcbuildHook, CoreSymbolication +, xnu, bison, flex, darling, stdenv, fixDarwinDylibNames }: appleDerivation { - buildInputs = [ cctools zlib ]; + nativeBuildInputs = [ xcbuildHook flex bison fixDarwinDylibNames ]; + buildInputs = [ CoreSymbolication darling xnu ]; + NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers -Wno-error=implicit-function-declaration"; + NIX_LDFLAGS = "-L./Products/Release"; + xcbuildFlags = "-target dtrace_frameworks -target dtrace"; - buildPhase = '' - export CFLAGS=" -I$PWD/head -I$PWD/sys -I$PWD/libelf -I$PWD/libdwarf" + doCheck = false; + checkPhase = "xcodebuild -target dtrace_tests"; - pushd libelf - for f in *.c; do - if [ "$f" != "lintsup.c" ]; then # Apple doesn't use it, so I don't either - cc -D_INT64_TYPE -D_LONGLONG_TYPE -D_ILP32 $CFLAGS -c $f - fi - done - libtool -static -o libelf.a *.o - popd - - pushd libdwarf - ./configure CFLAGS="$CFLAGS -Icmplrs" - make - popd - - cp libelf/libelf.a tools/ctfconvert - cp libdwarf/libdwarf.a tools/ctfconvert - - pushd tools/ctfconvert - for f in ../../darwin_shim.c *.c; do - cc -DNDEBUG -DNS_BLOCK_ASSERTIONS $CFLAGS -c $f - done - - export COMMON="alist.o ctf.o darwin_shim.o hash.o iidesc.o input.o list.o \ - memory.o output.o stack.o strtab.o symbol.o tdata.o traverse.o util.o" - - export CONVERT="ctfconvert.o dwarf.o merge.o st_bugs.o st_parse.o stabs.o" - export MERGE="barrier.o ctfmerge.o dwarf.o fifo.o merge.o st_bugs.o st_parse.o stabs.o utils.o" - export DUMP="dump.o fifo.o utils.o" - - clang -o ctfconvert $CONVERT $COMMON -L. -lz -lelf -ldwarf - clang -o ctfmerge $MERGE $COMMON -L. -lz -lelf -ldwarf - clang -o ctfdump $DUMP $COMMON -L. -lz -lelf - popd + postPatch = '' + substituteInPlace dtrace.xcodeproj/project.pbxproj \ + --replace "/usr/sbin" "" + substituteInPlace libdtrace/dt_open.c \ + --replace /usr/bin/clang ${stdenv.cc.cc}/bin/clang \ + --replace /usr/bin/ld ${stdenv.cc.bintools.bintools}/bin/ld \ + --replace /usr/lib/dtrace/dt_cpp.h $out/include/dt_cpp.h \ + --replace /usr/lib/dtrace $out/lib/dtrace ''; + # hack to handle xcbuild's broken lex handling + preBuild = '' + pushd libdtrace + yacc -d dt_grammar.y + flex -l -d dt_lex.l + popd + + substituteInPlace dtrace.xcodeproj/project.pbxproj \ + --replace '6EBC9800099BFBBF0001019C /* dt_grammar.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; name = dt_grammar.y; path = libdtrace/dt_grammar.y; sourceTree = ""; };' '6EBC9800099BFBBF0001019C /* y.tab.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = y.tab.c; path = libdtrace/y.tab.c; sourceTree = ""; };' \ + --replace '6EBC9808099BFBBF0001019C /* dt_lex.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; name = dt_lex.l; path = libdtrace/dt_lex.l; sourceTree = ""; };' '6EBC9808099BFBBF0001019C /* lex.yy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lex.yy.c; path = libdtrace/lex.yy.c; sourceTree = ""; };' + ''; + + # xcbuild doesn't support install installPhase = '' - mkdir -p $out/bin - cp tools/ctfconvert/ctfconvert $out/bin - cp tools/ctfconvert/ctfmerge $out/bin - cp tools/ctfconvert/ctfdump $out/bin + mkdir -p $out + + cp -r Products/Release/usr/include $out/include + cp scripts/dt_cpp.h $out/include/dt_cpp.h + + mkdir $out/lib + cp Products/Release/*.dylib $out/lib + + mkdir $out/bin + cp Products/Release/dtrace $out/bin + + mkdir -p $out/lib/dtrace + + install_name_tool -change $PWD/Products/Release/libdtrace.dylib $out/lib/libdtrace.dylib $out/bin/dtrace ''; } diff --git a/pkgs/os-specific/darwin/apple-source-releases/dtrace/xcode.nix b/pkgs/os-specific/darwin/apple-source-releases/dtrace/xcode.nix deleted file mode 100644 index f8636403ed54..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/dtrace/xcode.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ appleDerivation, xcbuildHook, CoreSymbolication -, xnu, bison, flex, darling, stdenv }: - -appleDerivation { - nativeBuildInputs = [ xcbuildHook flex bison ]; - buildInputs = [ CoreSymbolication darling ]; - NIX_CFLAGS_COMPILE = "-DCTF_OLD_VERSIONS -DPRIVATE -DYYDEBUG=1 -I${xnu}/Library/Frameworks/System.framework/Headers"; - NIX_LDFLAGS = "-L./Products/Release"; - xcbuildFlags = "-target dtrace"; - - patchPhase = '' - substituteInPlace dtrace.xcodeproj/project.pbxproj --replace "/usr/sbin" "" - substituteInPlace libdtrace/dt_open.c \ - --replace "/usr/bin/clang" "${stdenv.cc}/bin/cpp" \ - --replace "/usr/bin/ld" "${stdenv.cc}/bin/ld" \ - --replace "/usr/bin/dtrace" $out/lib/dtrace - ''; - - # hack to handle xcbuild's broken lex handling - preBuild = '' - cd libdtrace - yacc -d dt_grammar.y - flex -l -d dt_lex.l - cd .. - - substituteInPlace dtrace.xcodeproj/project.pbxproj \ - --replace '6EBC9800099BFBBF0001019C /* dt_grammar.y */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.yacc; name = dt_grammar.y; path = libdtrace/dt_grammar.y; sourceTree = ""; };' '6EBC9800099BFBBF0001019C /* y.tab.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = y.tab.c; path = libdtrace/y.tab.c; sourceTree = ""; };' \ - --replace '6EBC9808099BFBBF0001019C /* dt_lex.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; name = dt_lex.l; path = libdtrace/dt_lex.l; sourceTree = ""; };' '6EBC9808099BFBBF0001019C /* lex.yy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lex.yy.c; path = libdtrace/lex.yy.c; sourceTree = ""; };' - ''; - - # xcbuild doesn't support install - installPhase = '' - mkdir -p $out - - cp -r Products/Release/usr $out - mv $out/usr/* $out - rmdir $out/usr - - mkdir $out/lib - cp Products/Release/*.dylib $out/lib - - mkdir $out/bin - cp Products/Release/dtrace $out/bin - - mkdir -p $out/lib/dtrace - ''; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix index 2f5e4f542d7e..f0394a20c2cc 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/file_cmds/default.nix @@ -1,8 +1,8 @@ -{ stdenv, appleDerivation, xcbuildHook, zlib, bzip2, lzma, ncurses, libutil-new }: +{ stdenv, appleDerivation, xcbuildHook, zlib, bzip2, lzma, ncurses, libutil }: appleDerivation rec { nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ zlib bzip2 lzma ncurses libutil-new ]; + buildInputs = [ zlib bzip2 lzma ncurses libutil ]; # some commands not working: # mtree: _simple.h not found diff --git a/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix b/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix new file mode 100644 index 000000000000..ab294b143d39 --- /dev/null +++ b/pkgs/os-specific/darwin/apple-source-releases/hfs/default.nix @@ -0,0 +1,8 @@ +{ appleDerivation, lib, headersOnly ? false }: + +appleDerivation { + installPhase = lib.optionalString headersOnly '' + mkdir -p $out/include/hfs + cp core/*.h $out/include/hfs + ''; +} 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 deleted file mode 100644 index ca263228fde8..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 639d377d1b64..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_csp/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ appleDerivation, apple_sdk, libsecurity_asn1, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_utilities, CommonCrypto, 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"' \ - '"${stdenv.lib.getDev 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' \ - '${CommonCrypto}/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 deleted file mode 100644 index a0d48cf49650..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index b80d4c8aad28..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_cspdl/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ 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 deleted file mode 100644 index f52829c644da..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 0eb2ee10fd84..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_file_dl/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ 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 deleted file mode 100644 index c7c9c3d4e795..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index c5e9418ce913..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_cl/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ appleDerivation, libsecurity_asn1, 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 - 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 deleted file mode 100644 index 166b4e631c84..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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_C_FILES = $(wildcard lib/*.c) -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 deleted file mode 100644 index 6410c134f89a..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_apple_x509_tp/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ 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 deleted file mode 100644 index 1c3c4f0b25bf..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index a1c3204c15a4..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_asn1/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_utilities }: -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 deleted file mode 100644 index 91fb6bb679e5..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 2ecad568bf7e..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_client/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ 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 deleted file mode 100644 index 9e1260f9b9c4..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index b2dbb75f2971..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_plugin/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_cssm, libsecurity_utilities, 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 - ''; -} 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 deleted file mode 100644 index 24bc1fe7e3af..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index 26515353b730..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ CommonCrypto, appleDerivation, libsecurity_codesigning, libsecurity_utilities, m4 }: -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 deleted file mode 100644 index e5a703b2a08f..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utilities/handletemplates.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- 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 deleted file mode 100644 index 7b5b7dc186a1..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/GNUmakefile +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index e5637d6db410..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cdsa_utils/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_utilities, m4 }: -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 deleted file mode 100644 index e923b962c263..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index f5035a06f1e8..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_codesigning/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ appleDerivation, libsecurity_cdsa_utilities, libsecurity_utilities -, Security, xnu, xar, antlr, libsecurityd, apple_sdk -, dtrace-xcode, osx_private_sdk }: -appleDerivation { - buildInputs = [ libsecurity_utilities libsecurity_cdsa_utilities dtrace-xcode - Security xar antlr libsecurityd ]; - NIX_CFLAGS_COMPILE = "-Iinclude -I${xnu}/Library/Frameworks/System.framework/Headers"; - patchPhase = '' - substituteInPlace lib/policydb.cpp \ - --replace "new MutableDictionary::MutableDictionary()" NULL - substituteInPlace lib/xpcengine.h \ - --replace "#include " "" - substituteInPlace lib/policyengine.cpp \ - --replace "#include " "" - - rm lib/policyengine.cpp lib/quarantine++.cpp lib/codedirectory.cpp lib/xpcengine.cpp - ''; - preBuild = '' - mkdir -p include - cp ${osx_private_sdk.src}/PrivateSDK10.10.sparse.sdk/usr/include/quarantine.h include - mkdir -p include/CoreServices/ - cp ${osx_private_sdk.src}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/CoreServices.framework/PrivateHeaders/*.h include/CoreServices/ - - unpackFile ${Security.src} - mkdir -p include/securityd_client - cp Security-*/libsecurityd/lib/*.h include/securityd_client - mkdir -p include/xpc - cp ${apple_sdk.sdk.out}/include/xpc/*.h include/xpc - - sed -i '1i #define bool int' lib/security_codesigning.d - dtrace -h -C -s lib/security_codesigning.d -o codesigning_dtrace.h - ''; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile deleted file mode 100644 index c7835aaa9b02..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index cf9fe411533f..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_cssm/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ appleDerivation, libsecurity_cdsa_client, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, 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 deleted file mode 100644 index 4359810c56b3..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 435cd0f069f2..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_filedb/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ appleDerivation, apple_sdk, libsecurity_cdsa_plugin, libsecurity_cdsa_utilities, libsecurity_utilities, osx_private_sdk, lib }: -appleDerivation { - buildInputs = [ - libsecurity_utilities - libsecurity_cdsa_utilities - libsecurity_cdsa_plugin - ]; - patchPhase = '' - cp ${osx_private_sdk}/include/sandbox_private.h . - substituteInPlace sandbox_private.h --replace '' '"${lib.getDev 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 deleted file mode 100644 index 714524e8da58..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ appleDerivation_, applePackage, pkgs, stdenv }: -name: version: sha256: args: let - n = stdenv.lib.removePrefix "lib" name; - makeFile = ../. + "/${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 - cp -R ${pkgs.darwin.osx_private_sdk}/include/SecurityPrivateHeaders Security - - grep -Rl MacErrors.h . | while read file; do - substituteInPlace "''$file" --replace \ - '' \ - '"${pkgs.darwin.apple_sdk.sdk.out}/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 \ - '' \ - '"${stdenv.lib.getDev 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) - ''; - outputs = [ "out" "dev" ]; - buildInputs = [ - pkgs.gnustep.make - pkgs.darwin.apple_sdk.frameworks.AppKit - pkgs.darwin.apple_sdk.frameworks.Foundation - ]; - makeFlags = [ - "-f${makeFile}" - "MAKEFILE_NAME=${makeFile}" - "GNUSTEP_ABSOLUTE_INSTALL_PATHS=yes" - "GNUSTEP_MAKEFILES=${pkgs.gnustep.make}/share/GNUstep/Makefiles" - "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" - "-DNDEBUG" - ]; - 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 deleted file mode 100644 index f54d667d6ae8..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_generic/impure_deps.nix +++ /dev/null @@ -1,128 +0,0 @@ -# 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/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 deleted file mode 100644 index 8830006f00e5..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 724c4788b6cc..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_keychain/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ CF, 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, lib }: -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}/include/xpc/private.h xpc - cp ${lib.getDev apple_sdk.sdk}/include/xpc/*.h xpc - cp ${osx_private_sdk}/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.out}/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 - ''; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile b/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile deleted file mode 100644 index 119a43621fbb..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index cd691f71e95f..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_mds/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ 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 deleted file mode 100644 index 140c5a909a66..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 81551e9a76ef..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_ocspd/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ appleDerivation, bootstrap_cmds, libsecurity_cdsa_utilities, libsecurity_utilities }: -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 deleted file mode 100644 index b2af7e72c41b..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index b225d062dc94..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_pkcs12/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ appleDerivation, libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_utils, libsecurity_keychain }: -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 deleted file mode 100644 index 47a1c609d066..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -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 deleted file mode 100644 index 224910916615..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_sd_cspdl/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ 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 deleted file mode 100644 index d3ba09142c96..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 1ab950a9233c..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurity_utilities/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ IOKit, appleDerivation, apple_sdk, libauto, libobjc, sqlite, stdenv, osx_private_sdk }: -appleDerivation { - buildInputs = [ - libauto - libobjc - IOKit - ]; - propagatedBuildInputs = [ - sqlite - apple_sdk.frameworks.PCSC - ]; - NIX_LDFLAGS = "-framework 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"' - substituteInPlace lib/powerwatch.h --replace \ - '' \ - '"${IOKit}/Library/Frameworks/IOKit.framework/Headers/pwr_mgt/IOPMLibPrivate.h"' - cp -R ${osx_private_sdk}/include/bsm lib - cp ${osx_private_sdk}/include/utilities_dtrace.h 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 deleted file mode 100644 index 6058043e79f5..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/GNUmakefile +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index fb3441f70507..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ appleDerivation, bootstrap_cmds, libsecurity_cdsa_client, libsecurity_cdsa_utilities, libsecurity_utilities }: -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 - ''; - postFixup = '' - ln -s $dev/include/securityd $dev/include/securityd_client - ''; -} 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 deleted file mode 100644 index 5d0328629f19..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libsecurityd/xdr-arity.patch +++ /dev/null @@ -1,79 +0,0 @@ -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/libutil/default.nix b/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix index a6f484ba4e8d..87211f481d4f 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix @@ -1,13 +1,33 @@ -{ stdenv, appleDerivation }: +{ stdenv, lib, appleDerivation, xcbuildHook + +# headersOnly is true when building for libSystem +, headersOnly ? false }: -# all symbols are located in libSystem appleDerivation { - installPhase = '' - mkdir -p $out/include - cp *.h $out/include + nativeBuildInputs = lib.optional (!headersOnly) xcbuildHook; + + prePatch = '' + substituteInPlace tzlink.c \ + --replace '#include ' "" ''; - meta = with stdenv.lib; { + xcbuildFlags = "-target util"; + + installPhase = '' + mkdir -p $out/include + '' + lib.optionalString headersOnly '' + cp *.h $out/include + '' + lib.optionalString (!headersOnly)'' + mkdir -p $out/lib $out/include + + cp Products/Release/*.dylib $out/lib + cp Products/Release/*.h $out/include + + # TODO: figure out how to get this to be right the first time around + install_name_tool -id $out/lib/libutil.dylib $out/lib/libutil.dylib + ''; + + meta = with lib; { maintainers = with maintainers; [ copumpkin ]; platforms = platforms.darwin; license = licenses.apsl20; diff --git a/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix b/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix deleted file mode 100644 index 0115ce537e27..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, appleDerivation, xcbuildHook }: - -# TODO: make this the official libutil expression once we've integrated xcbuild in the bootstrap -appleDerivation { - nativeBuildInputs = [ xcbuildHook ]; - - prePatch = '' - substituteInPlace tzlink.c \ - --replace '#include ' "" - ''; - - xcbuildFlags = "-target util"; - - installPhase = '' - mkdir -p $out/lib $out/include - - cp Products/Release/*.dylib $out/lib - cp Products/Release/*.h $out/include - - # TODO: figure out how to get this to be right the first time around - install_name_tool -id $out/lib/libutil.dylib $out/lib/libutil.dylib - ''; - - meta = with stdenv.lib; { - maintainers = with maintainers; [ copumpkin ]; - platforms = platforms.darwin; - license = licenses.apsl20; - }; -} 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 deleted file mode 100644 index 6f6a50bd57a2..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/GNUmakefile +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index bfbfb945957e..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/security_dotmac_tp/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ appleDerivation }: - -appleDerivation { -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/security_systemkeychain/default.nix b/pkgs/os-specific/darwin/apple-source-releases/security_systemkeychain/default.nix deleted file mode 100644 index d5bc3483c389..000000000000 --- a/pkgs/os-specific/darwin/apple-source-releases/security_systemkeychain/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ appleDerivation, xcbuildHook, Security -, libsecurity_codesigning, libsecurity_utilities, libsecurity_cdsa_utilities -, xnu, osx_private_sdk, pcsclite}: - -appleDerivation { - nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ Security libsecurity_utilities - libsecurity_cdsa_utilities libsecurity_codesigning - pcsclite ]; - - NIX_LDFLAGS = "-lpcsclite"; - - # can't build the whole thing - xcbuildFlags = "-target codesign"; - - preBuild = '' - mkdir -p include/Security - cp ${osx_private_sdk.src}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/Security.framework/PrivateHeaders/*.h include/Security - cp ${osx_private_sdk.src}/PrivateSDK10.10.sparse.sdk/System/Library/Frameworks/Security.framework/Headers/*.h include/Security - - unpackFile ${xnu.src} - mkdir -p include/sys - cp -r xnu-*/bsd/sys/codesign.h include/sys/codesign.h - ''; - - NIX_CFLAGS_COMPILE = "-Iinclude"; - - installPhase = '' - mkdir -p $out/bin - cp Products/Release/codesign $out/bin/codesign - ''; -} diff --git a/pkgs/os-specific/darwin/apple-source-releases/top/default.nix b/pkgs/os-specific/darwin/apple-source-releases/top/default.nix index 3513cb2e172c..a2f912ca5782 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/top/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/top/default.nix @@ -1,8 +1,8 @@ -{xcbuildHook, appleDerivation, apple_sdk, ncurses, libutil-new, lib}: +{xcbuildHook, appleDerivation, apple_sdk, ncurses, libutil, lib}: appleDerivation { nativeBuildInputs = [ xcbuildHook ]; - buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil-new ]; + buildInputs = [ apple_sdk.frameworks.IOKit ncurses libutil ]; NIX_LDFLAGS = "-lutil"; installPhase = '' install -D Products/Release/libtop.a $out/lib/libtop.a diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 74c9f2543481..aaa3a1ebe327 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -1,11 +1,11 @@ -{ appleDerivation, bootstrap_cmds, bison, flex, gnum4, unifdef, perl, python }: +{ appleDerivation, lib, bootstrap_cmds, bison, flex +, gnum4, unifdef, perl, python +, headersOnly ? true }: -appleDerivation { - phases = [ "unpackPhase" "patchPhase" "installPhase" ]; +appleDerivation ({ + nativeBuildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python ]; - buildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python ]; - - patchPhase = '' + postPatch = '' substituteInPlace Makefile \ --replace "/bin/" "" \ --replace "MAKEJOBS := " '# MAKEJOBS := ' @@ -40,7 +40,27 @@ appleDerivation { patchShebangs . ''; - installPhase = '' + PLATFORM = "MacOSX"; + SDKVERSION = "10.11"; + CC = "cc"; + CXX = "c++"; + MIG = "mig"; + MIGCOM = "migcom"; + STRIP = "strip"; + NM = "nm"; + UNIFDEF = "unifdef"; + DSYMUTIL = "dsymutil"; + HOST_OS_VERSION = "10.10"; + HOST_CC = "cc"; + HOST_FLEX = "flex"; + HOST_BISON = "bison"; + HOST_GM4 = "m4"; + MIGCC = "cc"; + ARCHS = "x86_64"; + + NIX_CFLAGS_COMPILE = "-Wno-error"; + + preBuild = '' # This is a bit of a hack... mkdir -p sdk/usr/local/libexec @@ -56,49 +76,27 @@ appleDerivation { export SDKROOT_RESOLVED=$PWD/sdk export HOST_SDKROOT_RESOLVED=$PWD/sdk - export PLATFORM=MacOSX - export SDKVERSION=10.11 - - export CC=cc - export CXX=c++ - export MIG=${bootstrap_cmds}/bin/mig - export MIGCOM=${bootstrap_cmds}/libexec/migcom - export STRIP=sentinel-missing - export LIPO=sentinel-missing - export LIBTOOL=sentinel-missing - export NM=sentinel-missing - export UNIFDEF=${unifdef}/bin/unifdef - export DSYMUTIL=sentinel-missing - export CTFCONVERT=sentinel-missing - export CTFMERGE=sentinel-missing - export CTFINSERT=sentinel-missing - export NMEDIT=sentinel-missing - - export HOST_OS_VERSION=10.7 - export HOST_CC=cc - export HOST_FLEX=${flex}/bin/flex - export HOST_BISON=${bison}/bin/bison - export HOST_GM4=${gnum4}/bin/m4 - export HOST_CODESIGN='echo dummy_codesign' - export HOST_CODESIGN_ALLOCATE=echo export BUILT_PRODUCTS_DIR=. - export DSTROOT=$out - make installhdrs + ''; + buildFlags = lib.optionalString headersOnly "exporthdrs"; + installTargets = lib.optionalString headersOnly "installhdrs"; + + postInstall = lib.optionalString headersOnly '' mv $out/usr/include $out + (cd BUILD/obj/EXPORT_HDRS && find -type f -exec install -D \{} $out/include/\{} \;) + # TODO: figure out why I need to do this cp libsyscall/wrappers/*.h $out/include - mkdir -p $out/include/os - cp libsyscall/os/tsd.h $out/include/os/tsd.h + install -D libsyscall/os/tsd.h $out/include/os/tsd.h cp EXTERNAL_HEADERS/AssertMacros.h $out/include cp EXTERNAL_HEADERS/Availability*.h $out/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/ + cp -r EXTERNAL_HEADERS/corecrypto $out/include # Build the mach headers we crave - export MIGCC=cc - export ARCHS="x86_64" export SRCROOT=$PWD/libsyscall export DERIVED_SOURCES_DIR=$out/include export SDKROOT=$out @@ -108,14 +106,13 @@ appleDerivation { # Get rid of the System prefix mv $out/System/* $out/ + rmdir $out/System # TODO: do I need this? mv $out/internal_hdr/include/mach/*.h $out/include/mach # Get rid of some junk lying around - rm -rf $out/internal_hdr - rm -rf $out/usr - rm -rf $out/local + rm -rf $out/internal_hdr $out/usr $out/local # Add some symlinks ln -s $out/Library/Frameworks/System.framework/Versions/B \ @@ -123,8 +120,18 @@ appleDerivation { ln -s $out/Library/Frameworks/System.framework/Versions/Current/PrivateHeaders \ $out/Library/Frameworks/System.framework/Headers - # IOKit (and possibly the others) is incomplete, so let's not make it visible from here... + # IOKit (and possibly the others) is incomplete, + # so let's not make it visible from here... mkdir $out/Library/PrivateFrameworks mv $out/Library/Frameworks/IOKit.framework $out/Library/PrivateFrameworks ''; -} +} // lib.optionalAttrs headersOnly { + HOST_CODESIGN = "echo"; + HOST_CODESIGN_ALLOCATE = "echo"; + LIPO = "echo"; + LIBTOOL = "echo"; + CTFCONVERT = "echo"; + CTFMERGE = "echo"; + CTFINSERT = "echo"; + NMEDIT = "echo"; +}) diff --git a/pkgs/os-specific/darwin/darling/default.nix b/pkgs/os-specific/darwin/darling/default.nix index 6ed3b28eccc3..846831d0a879 100644 --- a/pkgs/os-specific/darwin/darling/default.nix +++ b/pkgs/os-specific/darwin/darling/default.nix @@ -26,6 +26,9 @@ stdenv.mkDerivation rec { mkdir -p $out/lib cp -rL src/sandbox/include/ $out/ cp libsystem_sandbox.dylib $out/lib/ + + mkdir -p $out/include + cp src/libaks/include/* $out/include ''; # buildInputs = [ cmake bison flex ]; diff --git a/pkgs/os-specific/darwin/security-tool/GNUmakefile b/pkgs/os-specific/darwin/security-tool/GNUmakefile deleted file mode 100644 index ae25f6a67c02..000000000000 --- a/pkgs/os-specific/darwin/security-tool/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index f161a7a88e17..000000000000 --- a/pkgs/os-specific/darwin/security-tool/default.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ Foundation, PCSC, Security, GSS, Kerberos, makeWrapper, apple_sdk, -fetchurl, gnustep, libobjc, libsecurity_apple_csp, libsecurity_apple_cspdl, -libsecurity_apple_file_dl, libsecurity_apple_x509_cl, libsecurity_apple_x509_tp, -libsecurity_asn1, libsecurity_cdsa_client, libsecurity_cdsa_plugin, -libsecurity_cdsa_utilities, libsecurity_cdsa_utils, libsecurity_cssm, libsecurity_filedb, -libsecurity_keychain, libsecurity_mds, libsecurity_pkcs12, libsecurity_sd_cspdl, -libsecurity_utilities, libsecurityd, osx_private_sdk, Security-framework, stdenv }: - -stdenv.mkDerivation rec { - version = "55115"; - name = "SecurityTool-${version}"; - - src = fetchurl { - url = "http://opensource.apple.com/tarballs/SecurityTool/SecurityTool-${version}.tar.gz"; - sha256 = "0apcz4vy2z5645jhrs60wj3w27mncjjqv42h5lln36g6qs2n9113"; - }; - - disallowedRequisites = [ apple_sdk.sdk ]; - - patchPhase = '' - # copied from libsecurity_generic - cp -R ${osx_private_sdk}/include/SecurityPrivateHeaders Security - - substituteInPlace cmsutil.c --replace \ - '' \ - '"${apple_sdk.sdk.out}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"' - substituteInPlace createFVMaster.c --replace \ - '' \ - '"${apple_sdk.sdk.out}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers/MacErrors.h"' - ''; - - 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}" - "GNUSTEP_MAKEFILES=${gnustep.make}/share/GNUstep/Makefiles" - ]; - - installFlags = [ - "security_INSTALL_DIR=\$(out)/bin" - ]; - - propagatedBuildInputs = [ GSS Kerberos Security-framework PCSC Foundation ]; - - __propagatedImpureHostDeps = [ "/System/Library/Keychains" ]; - - buildInputs = [ - gnustep.make - 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 - makeWrapper - ]; - - NIX_CFLAGS_COMPILE = [ - "-F${Security}/Library/Frameworks" - "-F${PCSC}/Library/Frameworks" - "-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 macOS keychains and Security framework"; - maintainers = with maintainers; [ - copumpkin - joelteon - ]; - platforms = platforms.darwin; - license = licenses.apsl20; - }; -} diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 1fc36139ac07..da1878c5fc12 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -61,10 +61,6 @@ in osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk { }; - security_tool = darwin.callPackage ../os-specific/darwin/security-tool { - Security-framework = darwin.apple_sdk.frameworks.Security; - }; - stubs = callPackages ../os-specific/darwin/stubs { }; trash = darwin.callPackage ../os-specific/darwin/trash { }; From ae1e940cc0c4767adba1ea8f4a25bda569be26c5 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 6 Feb 2019 20:27:25 -0500 Subject: [PATCH 06/70] darwin: move to llvm7 --- pkgs/stdenv/darwin/default.nix | 28 ++++++++++----------- pkgs/stdenv/darwin/make-bootstrap-tools.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/darwin-packages.nix | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index b7d8e3ba5236..af74be3a1c64 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -158,7 +158,7 @@ in rec { dyld = bootstrapTools; }; - llvmPackages_5 = { + llvmPackages_7 = { libcxx = stdenv.mkDerivation { name = "bootstrap-stage0-libcxx"; phases = [ "installPhase" "fixupPhase" ]; @@ -260,9 +260,9 @@ in rec { # Avoid pulling in a full python and its extra dependencies for the llvm/clang builds. libxml2 = super.libxml2.override { pythonSupport = false; }; - llvmPackages_5 = super.llvmPackages_5 // (let - libraries = super.llvmPackages_5.libraries.extend (_: _: { - inherit (llvmPackages_5) libcxx libcxxabi; + llvmPackages_7 = super.llvmPackages_7 // (let + libraries = super.llvmPackages_7.libraries.extend (_: _: { + inherit (llvmPackages_7) libcxx libcxxabi; }); in { inherit libraries; } // libraries); @@ -314,12 +314,12 @@ in rec { ]; }); - llvmPackages_5 = super.llvmPackages_5 // (let - tools = super.llvmPackages_5.tools.extend (llvmSelf: _: { - inherit (llvmPackages_5) llvm clang-unwrapped; + llvmPackages_7 = super.llvmPackages_7 // (let + tools = super.llvmPackages_7.tools.extend (llvmSelf: _: { + inherit (llvmPackages_7) llvm clang-unwrapped; }); - libraries = super.llvmPackages_5.libraries.extend (llvmSelf: _: { - inherit (llvmPackages_5) libcxx libcxxabi compiler-rt; + libraries = super.llvmPackages_7.libraries.extend (llvmSelf: _: { + inherit (llvmPackages_7) libcxx libcxxabi compiler-rt; }); in { inherit tools libraries; } // tools // libraries); @@ -353,12 +353,12 @@ in rec { ncurses libffi zlib llvm gmp pcre gnugrep coreutils findutils diffutils patchutils; - llvmPackages_5 = super.llvmPackages_5 // (let - tools = super.llvmPackages_5.tools.extend (_: super: { - inherit (llvmPackages_5) llvm clang-unwrapped; + llvmPackages_7 = super.llvmPackages_7 // (let + tools = super.llvmPackages_7.tools.extend (_: super: { + inherit (llvmPackages_7) llvm clang-unwrapped; }); - libraries = super.llvmPackages_5.libraries.extend (_: _: { - inherit (llvmPackages_5) compiler-rt libcxx libcxxabi; + libraries = super.llvmPackages_7.libraries.extend (_: _: { + inherit (llvmPackages_7) compiler-rt libcxx libcxxabi; }); in { inherit tools libraries; } // tools // libraries); diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 670215a735d7..6a28439daf58 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -3,7 +3,7 @@ with import pkgspath { inherit system; }; let - llvmPackages = llvmPackages_5; + llvmPackages = llvmPackages_7; in rec { coreutils_ = coreutils.override (args: { # We want coreutils without ACL support. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1551b2b3a1bb..5087400460bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7544,7 +7544,7 @@ in llvm_37 = llvmPackages_37.llvm; llvm_35 = llvmPackages_35.llvm; - llvmPackages = recurseIntoAttrs (if stdenv.isDarwin then llvmPackages_5 else llvmPackages_7); + llvmPackages = recurseIntoAttrs llvmPackages_7; llvmPackages_35 = callPackage ../development/compilers/llvm/3.5 ({ isl = isl_0_14; diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index da1878c5fc12..5ff97aa44401 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -15,7 +15,7 @@ in binutils-unwrapped = callPackage ../os-specific/darwin/binutils { inherit (darwin) cctools; inherit (pkgs) binutils-unwrapped; - inherit (pkgs.llvmPackages_5) llvm; + inherit (pkgs.llvmPackages_7) llvm; }; binutils = pkgs.wrapBintoolsWith { From 5fad67d3614a84118068e8657e894cc913e2325f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 8 Feb 2019 20:49:42 -0500 Subject: [PATCH 07/70] utils.bash: allow response files in bootstrapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit llvm uses response files in bootstrapping. It’s okay for them to happen even though we don’t use expandResponseParams here right now. --- pkgs/build-support/wrapper-common/utils.bash | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/build-support/wrapper-common/utils.bash b/pkgs/build-support/wrapper-common/utils.bash index 12b596a83e6f..4fd57162072e 100644 --- a/pkgs/build-support/wrapper-common/utils.bash +++ b/pkgs/build-support/wrapper-common/utils.bash @@ -86,9 +86,6 @@ expandResponseParams() { #shellcheck disable=SC2034 readarray -d '' params < <("@expandResponseParams@" "$@") return 0 - else - echo "Response files aren't supported during bootstrapping" >&2 - return 1 fi fi done From 0fe315c9b6080cd75f92fea1f97714b04abb4315 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 9 Feb 2019 14:00:48 -0500 Subject: [PATCH 08/70] treewide: remove old patches for macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These shouldn’t be needed now that we are on macOS 10.12. --- .../networking/browsers/firefox/common.nix | 8 +- .../llvm/7/compiler-rt-clock_gettime.patch | 74 -------- .../compilers/llvm/7/compiler-rt.nix | 5 +- pkgs/development/libraries/libdrm/default.nix | 5 - .../libraries/libdrm/libdrm-apple.patch | 88 ---------- .../libsnark/darwin-fix-clock-gettime.patch | 41 ----- .../libraries/libsnark/default.nix | 2 - .../libraries/mesa/darwin-clock-gettime.patch | 76 --------- pkgs/development/libraries/mesa/default.nix | 2 +- .../libraries/qt-5/5.11/default.nix | 22 +-- .../qt-5/5.11/qtbase-darwin-nseventtype.patch | 13 -- .../5.11/qtbase-darwin-revert-69221.patch | 73 -------- .../libraries/qt-5/5.11/qtbase-darwin.patch | 70 -------- .../5.11/qtbase-revert-no-macos10.10.patch | 102 ----------- .../qt-5/5.11/qtwebengine-clang-fix.patch | 30 ---- .../5.11/qtwebengine-darwin-old-sdk.patch | 21 --- .../5.11/qtwebengine-darwin-sdk-10.10.patch | 160 ------------------ .../5.11/qtwebkit-darwin-no-qos-classes.patch | 11 -- .../5.11/qtwebkit-darwin-no-readline.patch | 45 ----- .../libraries/qt-5/5.12/default.nix | 4 - .../qt-5/5.12/qtbase-darwin-nseventtype.patch | 13 -- .../libraries/qt-5/5.12/qtbase-darwin.patch | 70 -------- .../5.12/qtbase-revert-no-macos10.10.patch | 102 ----------- .../libraries/qt-5/5.9/default.nix | 2 +- .../libraries/qt-5/5.9/qtbase-darwin.patch | 35 ---- .../libraries/qt-5/modules/qtbase.nix | 35 +--- .../libraries/qt-5/modules/qtwebengine.nix | 18 +- .../python-modules/matplotlib/2.nix | 2 +- .../matplotlib/darwin-stdenv-2.2.3.patch | 10 -- .../matplotlib/darwin-stdenv.patch | 12 -- .../python-modules/matplotlib/default.nix | 3 +- pkgs/games/gargoyle/darwin.patch | 64 ------- pkgs/games/gargoyle/default.nix | 2 - 33 files changed, 22 insertions(+), 1198 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/7/compiler-rt-clock_gettime.patch delete mode 100644 pkgs/development/libraries/libdrm/libdrm-apple.patch delete mode 100644 pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch delete mode 100644 pkgs/development/libraries/mesa/darwin-clock-gettime.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch delete mode 100644 pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch delete mode 100644 pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch delete mode 100644 pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch delete mode 100644 pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch delete mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch delete mode 100644 pkgs/development/python-modules/matplotlib/darwin-stdenv-2.2.3.patch delete mode 100644 pkgs/development/python-modules/matplotlib/darwin-stdenv.patch delete mode 100644 pkgs/games/gargoyle/darwin.patch diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 3fae28be2bec..c0cfcf412c5e 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -153,15 +153,9 @@ stdenv.mkDerivation rec { ] ++ lib.optionals (!isTorBrowserLike) [ "-I${nss.dev}/include/nss" - ] - ++ lib.optional stdenv.isDarwin [ - "-isystem ${llvmPackages.libcxx}/include/c++/v1" - "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10" ]; - postPatch = lib.optionalString stdenv.isDarwin '' - substituteInPlace js/src/jsmath.cpp --replace 'defined(HAVE___SINCOS)' 0 - '' + lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) '' + postPatch = lib.optionalString (lib.versionAtLeast ffversion "63.0" && !isTorBrowserLike) '' substituteInPlace third_party/prio/prio/rand.c --replace 'nspr/prinit.h' 'prinit.h' ''; diff --git a/pkgs/development/compilers/llvm/7/compiler-rt-clock_gettime.patch b/pkgs/development/compilers/llvm/7/compiler-rt-clock_gettime.patch deleted file mode 100644 index f9323ed95c05..000000000000 --- a/pkgs/development/compilers/llvm/7/compiler-rt-clock_gettime.patch +++ /dev/null @@ -1,74 +0,0 @@ -commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d -Author: Tobias Mayer -Date: Wed Feb 13 12:44:17 2019 +0100 - - Provide clock_gettime for xray on macos < 10.12 - -diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc -index a46c151af..38aea6932 100644 ---- a/lib/xray/xray_basic_logging.cc -+++ b/lib/xray/xray_basic_logging.cc -@@ -36,6 +36,29 @@ - #include "xray_tsc.h" - #include "xray_utils.h" - -+#if __MACH__ -+#include -+#include -+enum clockid_t { -+ CLOCK_MONOTONIC = REALTIME_CLOCK, -+ CLOCK_REALTIME = REALTIME_CLOCK -+}; -+ -+int clock_gettime(clockid_t clock_id, struct timespec *ts) { -+ if (ts != NULL) { -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), clock_id, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ ts->tv_sec = mts.tv_sec; -+ ts->tv_nsec = mts.tv_nsec; -+ return 0; -+ } -+ return -1; -+} -+#endif -+ - namespace __xray { - - SpinMutex LogMutex; -diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc -index 4b308b27f..1d044c8fd 100644 ---- a/lib/xray/xray_fdr_logging.cc -+++ b/lib/xray/xray_fdr_logging.cc -@@ -38,6 +38,29 @@ - #include "xray_tsc.h" - #include "xray_utils.h" - -+#if __MACH__ -+#include -+#include -+enum clockid_t { -+ CLOCK_MONOTONIC = REALTIME_CLOCK, -+ CLOCK_REALTIME = REALTIME_CLOCK -+}; -+ -+int clock_gettime(clockid_t clock_id, struct timespec *ts) { -+ if (ts != NULL) { -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), clock_id, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ ts->tv_sec = mts.tv_sec; -+ ts->tv_nsec = mts.tv_nsec; -+ return 0; -+ } -+ return -1; -+} -+#endif -+ - namespace __xray { - - atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED}; diff --git a/pkgs/development/compilers/llvm/7/compiler-rt.nix b/pkgs/development/compilers/llvm/7/compiler-rt.nix index b44ba62ee924..de312468c541 100644 --- a/pkgs/development/compilers/llvm/7/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/7/compiler-rt.nix @@ -26,9 +26,8 @@ stdenv.mkDerivation rec { patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory - ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch - ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch; + ] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra diff --git a/pkgs/development/libraries/libdrm/default.nix b/pkgs/development/libraries/libdrm/default.nix index a0bd7d864548..a8daf5754165 100644 --- a/pkgs/development/libraries/libdrm/default.nix +++ b/pkgs/development/libraries/libdrm/default.nix @@ -14,17 +14,12 @@ stdenv.mkDerivation rec { buildInputs = [ libpthreadstubs libpciaccess valgrind-light ]; # libdrm as of 2.4.70 does not actually do anything with udev. - patches = stdenv.lib.optional stdenv.isDarwin ./libdrm-apple.patch; - postPatch = '' for a in */*-symbol-check ; do patchShebangs $a done ''; - preConfigure = stdenv.lib.optionalString stdenv.isDarwin - "echo : \\\${ac_cv_func_clock_gettime=\'yes\'} > config.cache"; - configureFlags = [ "--enable-install-test-programs" ] ++ stdenv.lib.optionals (stdenv.isAarch32 || stdenv.isAarch64) [ "--enable-tegra-experimental-api" "--enable-etnaviv-experimental-api" ] diff --git a/pkgs/development/libraries/libdrm/libdrm-apple.patch b/pkgs/development/libraries/libdrm/libdrm-apple.patch deleted file mode 100644 index 17b447789c2f..000000000000 --- a/pkgs/development/libraries/libdrm/libdrm-apple.patch +++ /dev/null @@ -1,88 +0,0 @@ -diff -Naur libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c libdrm-2.4.26/intel/intel_bufmgr_gem.c ---- libdrm-2.4.26-orig/intel/intel_bufmgr_gem.c 2011-04-01 10:30:51.000000000 -0400 -+++ libdrm-2.4.26/intel/intel_bufmgr_gem.c 2011-08-29 02:17:20.000000000 -0400 -@@ -51,6 +51,7 @@ - #include - #include - #include -+#include - - #include "errno.h" - #include "libdrm_lists.h" -@@ -987,9 +988,9 @@ - if (atomic_dec_and_test(&bo_gem->refcount)) { - drm_intel_bufmgr_gem *bufmgr_gem = - (drm_intel_bufmgr_gem *) bo->bufmgr; -- struct timespec time; -+ struct timeval time; - -- clock_gettime(CLOCK_MONOTONIC, &time); -+ gettimeofday(&time, NULL); - - pthread_mutex_lock(&bufmgr_gem->lock); - drm_intel_gem_bo_unreference_final(bo, time.tv_sec); -diff -Naur libdrm-2.4.26-orig/xf86drm.c libdrm-2.4.26/xf86drm.c ---- libdrm-2.4.26-orig/xf86drm.c 2011-03-21 09:39:24.000000000 -0400 -+++ libdrm-2.4.26/xf86drm.c 2011-08-29 02:17:49.000000000 -0400 -@@ -51,6 +51,9 @@ - #include - #include - #include -+#if defined(__APPLE__) && defined(__MACH__) -+#include -+#endif - - /* Not all systems have MAP_FAILED defined */ - #ifndef MAP_FAILED -@@ -1941,20 +1944,43 @@ - */ - int drmWaitVBlank(int fd, drmVBlankPtr vbl) - { -+#if defined(__APPLE__) && defined(__MACH__) -+ uint64_t start, end, elapsed, elapsedNano; -+ static const uint64_t maxElapsed = 2000000000; -+ static mach_timebase_info_data_t timebaseInfo; -+ if ( timebaseInfo.denom == 0 ) { -+ (void) mach_timebase_info(&timebaseInfo); -+ } -+#else - struct timespec timeout, cur; -+#endif - int ret; - -+#if defined(__APPLE__) && defined(__MACH__) -+ start = mach_absolute_time(); -+#else - ret = clock_gettime(CLOCK_MONOTONIC, &timeout); - if (ret < 0) { - fprintf(stderr, "clock_gettime failed: %s\n", strerror(ret)); - goto out; - } - timeout.tv_sec++; -+#endif - - do { - ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl); - vbl->request.type &= ~DRM_VBLANK_RELATIVE; - if (ret && errno == EINTR) { -+#if defined(__APPLE__) && defined(__MACH__) -+ end = mach_absolute_time(); -+ elapsed = end - start; -+ elapsedNano = elapsed * timebaseInfo.numer / timebaseInfo.denom; -+ if (elapsedNano > maxElapsed) { -+ errno = EBUSY; -+ ret = -1; -+ break; -+ } -+#else - clock_gettime(CLOCK_MONOTONIC, &cur); - /* Timeout after 1s */ - if (cur.tv_sec > timeout.tv_sec + 1 || -@@ -1964,6 +1990,7 @@ - ret = -1; - break; - } -+#endif - } - } while (ret && errno == EINTR); - diff --git a/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch b/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch deleted file mode 100644 index 2eee84d1c4b8..000000000000 --- a/pkgs/development/libraries/libsnark/darwin-fix-clock-gettime.patch +++ /dev/null @@ -1,41 +0,0 @@ -Adapted from https://github.com/zcash/libsnark/pull/10 - -diff --git a/depends/libff/libff/common/profiling.cpp b/depends/libff/libff/common/profiling.cpp -index f2a1985..319149c 100755 ---- a/depends/libff/libff/common/profiling.cpp -+++ b/depends/libff/libff/common/profiling.cpp -@@ -27,6 +27,13 @@ - #include - #endif - -+#ifdef __MACH__ -+#include -+#include -+#include -+#include -+#endif -+ - namespace libff { - - long long get_nsec_time() -@@ -42,10 +49,20 @@ long long get_nsec_cpu_time() - return 0; - #else - ::timespec ts; -+#ifdef __MACH__ -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ ts.tv_sec = mts.tv_sec; -+ ts.tv_nsec = mts.tv_nsec; -+#else - if ( ::clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) ) - throw ::std::runtime_error("clock_gettime(CLOCK_PROCESS_CPUTIME_ID) failed"); - // If we expected this to work, don't silently ignore failures, because that would hide the problem and incur an unnecessarily system-call overhead. So if we ever observe this exception, we should probably add a suitable #ifdef . - //TODO: clock_gettime(CLOCK_PROCESS_CPUTIME_ID) is not supported by native Windows. What about Cygwin? Should we #ifdef on CLOCK_PROCESS_CPUTIME_ID or on __linux__? -+#endif - return ts.tv_sec * 1000000000ll + ts.tv_nsec; - #endif - } diff --git a/pkgs/development/libraries/libsnark/default.nix b/pkgs/development/libraries/libsnark/default.nix index 4ea2209160f8..15d8169f1024 100644 --- a/pkgs/development/libraries/libsnark/default.nix +++ b/pkgs/development/libraries/libsnark/default.nix @@ -19,8 +19,6 @@ in stdenv.mkDerivation rec { fetchSubmodules = true; }; - patches = [ ./darwin-fix-clock-gettime.patch ]; - enableParallelBuilding = true; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/mesa/darwin-clock-gettime.patch b/pkgs/development/libraries/mesa/darwin-clock-gettime.patch deleted file mode 100644 index 94e90a1c5871..000000000000 --- a/pkgs/development/libraries/mesa/darwin-clock-gettime.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h -index 45cb6075e6..62937311b9 100644 ---- a/include/c11/threads_posix.h -+++ b/include/c11/threads_posix.h -@@ -36,6 +36,11 @@ - #include - #include /* for intptr_t */ - -+#ifdef __MACH__ -+#include -+#include -+#endif -+ - /* - Configuration macro: - -@@ -383,12 +388,25 @@ tss_set(tss_t key, void *val) - /*-------------------- 7.25.7 Time functions --------------------*/ - // 7.25.6.1 - #ifndef HAVE_TIMESPEC_GET -+ - static inline int - timespec_get(struct timespec *ts, int base) - { - if (!ts) return 0; - if (base == TIME_UTC) { -+#ifdef __MACH__ -+ if (ts != NULL) { -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ ts->tv_sec = mts.tv_sec; -+ ts->tv_nsec = mts.tv_nsec; -+ } -+#else - clock_gettime(CLOCK_REALTIME, ts); -+#endif - return base; - } - return 0; -diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c -index 1208ebb315..e1378fb1f0 100644 ---- a/src/egl/drivers/dri2/egl_dri2.c -+++ b/src/egl/drivers/dri2/egl_dri2.c -@@ -65,6 +65,11 @@ - #include "util/u_vector.h" - #include "mapi/glapi/glapi.h" - -+#ifdef __MACH__ -+#include -+#include -+#endif -+ - #define NUM_ATTRIBS 12 - - static void -@@ -3092,7 +3097,17 @@ dri2_client_wait_sync(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, - - /* We override the clock to monotonic when creating the condition - * variable. */ -+#ifdef __MACH__ -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ current.tv_sec = mts.tv_sec; -+ current.tv_nsec = mts.tv_nsec; -+#else - clock_gettime(CLOCK_MONOTONIC, ¤t); -+#endif - - /* calculating when to expire */ - expire.tv_nsec = timeout % 1000000000L; diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 5bc1dfaf8783..c9ce97849e1a 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -93,7 +93,7 @@ let self = stdenv.mkDerivation { ./symlink-drivers.patch ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl ./disk_cache-include-dri-driver-path-in-cache-key.patch - ] ++ lib.optional stdenv.isDarwin ./darwin-clock-gettime.patch; + ]; outputs = [ "out" "dev" "drivers" ] ++ lib.optional (elem "swrast" galliumDrivers) "osmesa"; diff --git a/pkgs/development/libraries/qt-5/5.11/default.nix b/pkgs/development/libraries/qt-5/5.11/default.nix index 379c370e1fcc..0b6ba8c8746f 100644 --- a/pkgs/development/libraries/qt-5/5.11/default.nix +++ b/pkgs/development/libraries/qt-5/5.11/default.nix @@ -51,29 +51,17 @@ let patches = { qtbase = [ ./qtbase.patch - ./qtbase-darwin.patch - ./qtbase-revert-no-macos10.10.patch ./qtbase-fixguicmake.patch - ] ++ optionals stdenv.isDarwin [ - ./qtbase-darwin-nseventtype.patch - ./qtbase-darwin-revert-69221.patch ]; qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; qttools = [ ./qttools.patch ]; - qtwebengine = [ ./qtwebengine-no-build-skip.patch ] - ++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch - ++ optionals stdenv.isDarwin [ - ./qtwebengine-darwin-no-platform-check.patch - ./qtwebengine-darwin-sdk-10.10.patch - ./qtwebengine-darwin-old-sdk.patch - ]; - qtwebkit = [ ./qtwebkit.patch ] - ++ optionals stdenv.isDarwin [ - ./qtwebkit-darwin-no-readline.patch - ./qtwebkit-darwin-no-qos-classes.patch - ]; + qtwebengine = [ + ./qtwebengine-no-build-skip.patch + ./qtwebengine-darwin-no-platform-check.patch + ]; + qtwebkit = [ ./qtwebkit.patch ]; }; mkDerivation = diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch deleted file mode 100644 index 9ef6e8ef0692..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-nseventtype.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible) - removeMonitor(); - monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) { - QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]); -- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]); -- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress; -+ const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]); -+ const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress; - QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint, - Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType); - }]; diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch deleted file mode 100644 index 73eea435f847..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin-revert-69221.patch +++ /dev/null @@ -1,73 +0,0 @@ -diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm -index 00c3f7c22c..94d35f59d6 100644 ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -1355,15 +1355,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel) - { - QMacAutoReleasePool pool; - -- Qt::WindowType type = window()->type(); -- Qt::WindowFlags flags = window()->flags(); -- -- // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow -- // a window to be created within the area of the screen that has a Y coordinate (I quadrant) -- // higher than the height of the screen in its non-rotated state, unless the window is -- // created with the NSWindowStyleMaskBorderless style mask. -- NSWindowStyleMask styleMask = windowStyleMask(flags); -- - QRect rect = geometry(); - - QScreen *targetScreen = nullptr; -@@ -1375,22 +1366,26 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel) - } - - if (!targetScreen) { -- qCWarning(lcQpaCocoaWindow) << "Window position" << rect << "outside any known screen, using primary screen"; -+ qCWarning(lcQpaCocoaWindow) << "Window position outside any known screen, using primary screen"; - targetScreen = QGuiApplication::primaryScreen(); -- // AppKit will only reposition a window that's outside the target screen area if -- // the window has a title bar. If left out, the window ends up with no screen. -- // The style mask will be corrected to the original style mask in setWindowFlags. -- styleMask |= NSWindowStyleMaskTitled; - } - - rect.translate(-targetScreen->geometry().topLeft()); - QCocoaScreen *cocoaScreen = static_cast(targetScreen->handle()); - NSRect frame = QCocoaScreen::mapToNative(rect, cocoaScreen); - -+ // Note: The macOS window manager has a bug, where if a screen is rotated, it will not allow -+ // a window to be created within the area of the screen that has a Y coordinate (I quadrant) -+ // higher than the height of the screen in its non-rotated state, unless the window is -+ // created with the NSWindowStyleMaskBorderless style mask. -+ -+ Qt::WindowType type = window()->type(); -+ Qt::WindowFlags flags = window()->flags(); -+ - // Create NSWindow - Class windowClass = shouldBePanel ? [QNSPanel class] : [QNSWindow class]; - QCocoaNSWindow *nsWindow = [[windowClass alloc] initWithContentRect:frame -- styleMask:styleMask -+ styleMask:windowStyleMask(flags) - // Deferring window creation breaks OpenGL (the GL context is - // set up before the window is shown and needs a proper window) - backing:NSBackingStoreBuffered defer:NO -@@ -1399,9 +1394,6 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel) - Q_ASSERT_X(nsWindow.screen == cocoaScreen->nativeScreen(), "QCocoaWindow", - "Resulting NSScreen should match the requested NSScreen"); - -- if (targetScreen != window()->screen()) -- QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen); -- - nsWindow.delegate = [[QNSWindowDelegate alloc] initWithQCocoaWindow:this]; - - // Prevent Cocoa from releasing the window on close. Qt -@@ -1421,6 +1413,9 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel) - }); - } - -+ if (targetScreen != window()->screen()) -+ QWindowSystemInterface::handleWindowScreenChanged(window(), targetScreen); -+ - nsWindow.restorable = NO; - nsWindow.level = windowLevel(flags); - diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch deleted file mode 100644 index f66351752054..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtbase-darwin.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm -index 341d3bccf2..3368234c26 100644 ---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm -+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm -@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations() - QMacAutoReleasePool pool; - userProfiles.clear(); - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - - CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName]; -@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate() - - QMacAutoReleasePool pool; - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - scanThread->interfaceName = QString::fromNSString(ifName); - scanThread->start(); -diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm -index a17a02b629..d76c42fa03 100644 ---- a/src/plugins/platforms/cocoa/qcocoascreen.mm -+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm -@@ -114,7 +114,7 @@ void QCocoaScreen::updateGeometry() - return; - - // The reference screen for the geometry is always the primary screen -- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame); -+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]); - m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect(); - m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect(); - -diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm -index 72f3bc0075..a9c058a850 100644 ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -1676,7 +1676,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window) - - if (!m_drawContentBorderGradient) { - window.styleMask = window.styleMask & ~NSTexturedBackgroundWindowMask; -- [window.contentView.superview setNeedsDisplay:YES]; -+ [[window.contentView superview] setNeedsDisplay:YES]; - window.titlebarAppearsTransparent = NO; - return; - } -diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm -index cb13b7d184..0159d68dca 100644 ---- a/src/plugins/platforms/cocoa/qnswindow.mm -+++ b/src/plugins/platforms/cocoa/qnswindow.mm -@@ -231,7 +231,7 @@ static bool isMouseEvent(NSEvent *ev) - if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) { - NSPoint loc = [theEvent locationInWindow]; - NSRect windowFrame = [self convertRectFromScreen:self.frame]; -- NSRect contentFrame = self.contentView.frame; -+ NSRect contentFrame = [self.contentView frame]; - if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO)) - [qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent]; - } -@@ -260,7 +260,7 @@ static bool isMouseEvent(NSEvent *ev) - + (void)applicationActivationChanged:(NSNotification*)notification - { - const id sender = self; -- NSEnumerator *windowEnumerator = nullptr; -+ NSEnumerator *windowEnumerator = nullptr; - NSApplication *application = [NSApplication sharedApplication]; - - #if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12) diff --git a/pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch b/pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch deleted file mode 100644 index 29776518379d..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtbase-revert-no-macos10.10.patch +++ /dev/null @@ -1,102 +0,0 @@ -Revert "Remove code paths for macOS < 10.11" - -This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3. - -From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001 -From: Jake Petroules -Date: Thu, 8 Feb 2018 11:05:42 -0800 -Subject: [PATCH] Remove code paths for macOS < 10.11 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa -Reviewed-by: Tor Arne Vestbø -Reviewed-by: Gabriel de Dietrich -Reviewed-by: Konstantin Ritt ---- - .../fontdatabases/mac/qfontengine_coretext.mm | 16 +++------------- - src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 +----- - src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 ---------------- - 3 files changed, 4 insertions(+), 34 deletions(-) - -diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -index 98b753eff9..489d9cd031 100644 ---- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -@@ -47,18 +47,28 @@ - - #include - --#if defined(Q_OS_MACOS) -+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11) - #import - #endif - --#if defined(QT_PLATFORM_UIKIT) -+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2) - #import - #endif - - // These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework, - // but they are not documented and are not in public headers so are private API and exposed - // only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857) --#if defined(Q_OS_MACOS) -+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2) -+#define kCTFontWeightUltraLight -0.8 -+#define kCTFontWeightThin -0.6 -+#define kCTFontWeightLight -0.4 -+#define kCTFontWeightRegular 0 -+#define kCTFontWeightMedium 0.23 -+#define kCTFontWeightSemibold 0.3 -+#define kCTFontWeightBold 0.4 -+#define kCTFontWeightHeavy 0.56 -+#define kCTFontWeightBlack 0.62 -+#elif defined(Q_OS_OSX) - #define kCTFontWeightUltraLight NSFontWeightUltraLight - #define kCTFontWeightThin NSFontWeightThin - #define kCTFontWeightLight NSFontWeightLight -diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm -index 94f2125bad..272cd9f3dc 100644 ---- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm -+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm -@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate); - // resetting our mCurrentDir, set the delegate - // here to make sure it gets the correct value. - [mSavePanel setDelegate:self]; -- mOpenPanel.accessoryViewDisclosed = YES; -+ -+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11) -+ if (__builtin_available(macOS 10.11, *)) -+ mOpenPanel.accessoryViewDisclosed = YES; -+#endif - - if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept)) - [mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]]; -diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm -index 057a4c2943..eb55e50622 100644 ---- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm -+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm -@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*")); - return QCocoaScreen::mapToNative(maximizedFrame); - } - -+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11) -+/* -+ AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame -+ from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting -+ in black bars on top and bottom of the window. By implementing the following -+ method, AppKit will choose that instead, and resolve the right fullscreen -+ geometry. -+*/ -+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize -+{ -+ Q_UNUSED(proposedSize); -+ Q_ASSERT(window == m_cocoaWindow->nativeWindow()); -+ return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize()); -+} -+#endif -+ - - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu - { - Q_UNUSED(window); diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch deleted file mode 100644 index 8dafd65cd343..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix a following build error: - -In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7: -../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|." - static_assert( - ^ -../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here - : AssertConstructible, Unwrapped, Params>... { - ^ -../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity, base::internal::TypeList, long>, base::internal::TypeList, base::internal::TypeList >' requested here - static_assert(internal::AssertBindArgsValidity< - ^ -../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating, long>' requested here - return base::BindRepeating(std::forward(functor), - ^ -../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind, long>' requested here - base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue, - ^ - ---- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm -+++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm -@@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic( - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, - base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue, -- weak_ptr_factory_.GetWeakPtr(), nil)); -+ weak_ptr_factory_.GetWeakPtr(), nullptr)); - } - } - diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch deleted file mode 100644 index b065c2211017..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-old-sdk.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm ---- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm -+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Classes/Common/RTCFieldTrials.mm -@@ -45,7 +45,7 @@ NSString *RTCFieldTrialTrendlineFilterValue( - return [NSString stringWithFormat:format, windowSize, smoothingCoeff, thresholdGain]; - } - --void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials) { -+void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials) { - if (!fieldTrials) { - RTCLogWarning(@"No fieldTrials provided."); - return; -diff --git a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h ---- a/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h -+++ b/src/3rdparty/chromium/third_party/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFieldTrials.h -@@ -40,4 +40,4 @@ RTC_EXTERN NSString *RTCFieldTrialTrendlineFilterValue( - * Must be called before any other call into WebRTC. See: - * webrtc/system_wrappers/include/field_trial_default.h - */ --RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials); -+RTC_EXTERN void RTCInitFieldTrialDictionary(NSDictionary *fieldTrials); diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch b/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch deleted file mode 100644 index d43b09b95383..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtwebengine-darwin-sdk-10.10.patch +++ /dev/null @@ -1,160 +0,0 @@ -Fix build against 10.10 SDK - -The SecKey part perhaps could be fixed by implementing a revert to -https://chromium.googlesource.com/chromium/src.git/+/8418e098b9cbedf884878b61dcd3292c515845cf%5E%21/#F0 - ---- a/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm -+++ b/src/3rdparty/chromium/content/browser/renderer_host/input/web_input_event_builders_mac.mm -@@ -1,3 +1,4 @@ -+#define NSEventTypeScrollWheel 22 - // Copyright 2015 The Chromium Authors. All rights reserved. - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. ---- a/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc -+++ b/src/3rdparty/chromium/net/ssl/ssl_platform_key_mac.cc -@@ -48,21 +48,6 @@ namespace net { - - namespace { - --// TODO(davidben): Remove this when we switch to building to the 10.13 --// SDK. https://crbug.com/780980 --#if !defined(MAC_OS_X_VERSION_10_13) || \ -- MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13 --API_AVAILABLE(macosx(10.13)) --const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA256 = -- CFSTR("algid:sign:RSA:digest-PSS:SHA256:SHA256:32"); --API_AVAILABLE(macosx(10.13)) --const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA384 = -- CFSTR("algid:sign:RSA:digest-PSS:SHA384:SHA384:48"); --API_AVAILABLE(macosx(10.13)) --const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA512 = -- CFSTR("algid:sign:RSA:digest-PSS:SHA512:SHA512:64"); --#endif -- - class ScopedCSSM_CC_HANDLE { - public: - ScopedCSSM_CC_HANDLE() : handle_(0) {} -@@ -187,109 +172,6 @@ class SSLPlatformKeyCSSM : public ThreadedSSLPrivateKey::Delegate { - DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeyCSSM); - }; - --// Returns the corresponding SecKeyAlgorithm or nullptr if unrecognized. --API_AVAILABLE(macosx(10.12)) --SecKeyAlgorithm GetSecKeyAlgorithm(uint16_t algorithm) { -- switch (algorithm) { -- case SSL_SIGN_RSA_PKCS1_SHA512: -- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA512; -- case SSL_SIGN_RSA_PKCS1_SHA384: -- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA384; -- case SSL_SIGN_RSA_PKCS1_SHA256: -- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA256; -- case SSL_SIGN_RSA_PKCS1_SHA1: -- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA1; -- case SSL_SIGN_RSA_PKCS1_MD5_SHA1: -- return kSecKeyAlgorithmRSASignatureDigestPKCS1v15Raw; -- case SSL_SIGN_ECDSA_SECP521R1_SHA512: -- return kSecKeyAlgorithmECDSASignatureDigestX962SHA512; -- case SSL_SIGN_ECDSA_SECP384R1_SHA384: -- return kSecKeyAlgorithmECDSASignatureDigestX962SHA384; -- case SSL_SIGN_ECDSA_SECP256R1_SHA256: -- return kSecKeyAlgorithmECDSASignatureDigestX962SHA256; -- case SSL_SIGN_ECDSA_SHA1: -- return kSecKeyAlgorithmECDSASignatureDigestX962SHA1; -- } -- -- if (base::mac::IsAtLeastOS10_13()) { -- switch (algorithm) { -- case SSL_SIGN_RSA_PSS_SHA512: -- return kSecKeyAlgorithmRSASignatureDigestPSSSHA512; -- case SSL_SIGN_RSA_PSS_SHA384: -- return kSecKeyAlgorithmRSASignatureDigestPSSSHA384; -- case SSL_SIGN_RSA_PSS_SHA256: -- return kSecKeyAlgorithmRSASignatureDigestPSSSHA256; -- } -- } -- -- return nullptr; --} -- --class API_AVAILABLE(macosx(10.12)) SSLPlatformKeySecKey -- : public ThreadedSSLPrivateKey::Delegate { -- public: -- SSLPlatformKeySecKey(int type, size_t max_length, SecKeyRef key) -- : key_(key, base::scoped_policy::RETAIN) { -- // Determine the algorithms supported by the key. -- for (uint16_t algorithm : SSLPrivateKey::DefaultAlgorithmPreferences( -- type, true /* include PSS */)) { -- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm); -- if (sec_algorithm && -- SecKeyIsAlgorithmSupported(key_.get(), kSecKeyOperationTypeSign, -- sec_algorithm)) { -- preferences_.push_back(algorithm); -- } -- } -- } -- -- ~SSLPlatformKeySecKey() override {} -- -- std::vector GetAlgorithmPreferences() override { -- return preferences_; -- } -- -- Error Sign(uint16_t algorithm, -- base::span input, -- std::vector* signature) override { -- SecKeyAlgorithm sec_algorithm = GetSecKeyAlgorithm(algorithm); -- if (!sec_algorithm) { -- NOTREACHED(); -- return ERR_FAILED; -- } -- -- const EVP_MD* md = SSL_get_signature_algorithm_digest(algorithm); -- uint8_t digest[EVP_MAX_MD_SIZE]; -- unsigned digest_len; -- if (!md || !EVP_Digest(input.data(), input.size(), digest, &digest_len, md, -- nullptr)) { -- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED; -- } -- -- base::ScopedCFTypeRef digest_ref(CFDataCreateWithBytesNoCopy( -- kCFAllocatorDefault, digest, base::checked_cast(digest_len), -- kCFAllocatorNull)); -- -- base::ScopedCFTypeRef error; -- base::ScopedCFTypeRef signature_ref(SecKeyCreateSignature( -- key_, sec_algorithm, digest_ref, error.InitializeInto())); -- if (!signature_ref) { -- LOG(ERROR) << error; -- return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED; -- } -- -- signature->assign( -- CFDataGetBytePtr(signature_ref), -- CFDataGetBytePtr(signature_ref) + CFDataGetLength(signature_ref)); -- return OK; -- } -- -- private: -- std::vector preferences_; -- base::ScopedCFTypeRef key_; -- -- DISALLOW_COPY_AND_ASSIGN(SSLPlatformKeySecKey); --}; -- - scoped_refptr CreateSSLPrivateKeyForSecKey( - const X509Certificate* certificate, - SecKeyRef private_key) { -@@ -298,13 +180,6 @@ scoped_refptr CreateSSLPrivateKeyForSecKey( - if (!GetClientCertInfo(certificate, &key_type, &max_length)) - return nullptr; - -- if (base::mac::IsAtLeastOS10_12()) { -- return base::MakeRefCounted( -- std::make_unique(key_type, max_length, -- private_key), -- GetSSLPlatformKeyTaskRunner()); -- } -- - const CSSM_KEY* cssm_key; - OSStatus status = SecKeyGetCSSMKey(private_key, &cssm_key); - if (status != noErr) { diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch deleted file mode 100644 index a7087f517623..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-qos-classes.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake ---- a/Source/cmake/OptionsQt.cmake -+++ b/Source/cmake/OptionsQt.cmake -@@ -683,7 +683,6 @@ if (WIN32 AND COMPILER_IS_GCC_OR_CLANG) - endif () - - if (APPLE) -- SET_AND_EXPOSE_TO_BUILD(HAVE_QOS_CLASSES 1) - endif () - - if (ENABLE_MATHML) diff --git a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch b/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch deleted file mode 100644 index 26d189d86019..000000000000 --- a/pkgs/development/libraries/qt-5/5.11/qtwebkit-darwin-no-readline.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/Source/JavaScriptCore/shell/CMakeLists.txt b/Source/JavaScriptCore/shell/CMakeLists.txt ---- a/Source/JavaScriptCore/shell/CMakeLists.txt -+++ b/Source/JavaScriptCore/shell/CMakeLists.txt -@@ -9,7 +9,6 @@ set(JSC_LIBRARIES - ) - - if (WTF_OS_MAC_OS_X) -- list(APPEND JSC_LIBRARIES edit) - endif () - - if ("${JavaScriptCore_LIBRARY_TYPE}" MATCHES "STATIC") -diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h ---- a/Source/WTF/wtf/Platform.h -+++ b/Source/WTF/wtf/Platform.h -@@ -563,7 +563,6 @@ - #if PLATFORM(IOS) - - #define HAVE_NETWORK_EXTENSION 1 --#define HAVE_READLINE 1 - #if USE(APPLE_INTERNAL_SDK) - #define USE_CFNETWORK 1 - #endif -@@ -650,7 +649,6 @@ - #define HAVE_MADV_DONTNEED 1 - #define HAVE_MERGESORT 1 - #define HAVE_PTHREAD_SETNAME_NP 1 --#define HAVE_READLINE 1 - #define HAVE_SYS_TIMEB_H 1 - - #if !PLATFORM(GTK) && !PLATFORM(QT) -diff --git a/Source/WTF/wtf/PlatformMac.cmake b/Source/WTF/wtf/PlatformMac.cmake ---- a/Source/WTF/wtf/PlatformMac.cmake -+++ b/Source/WTF/wtf/PlatformMac.cmake -@@ -2,11 +2,9 @@ set(WTF_LIBRARY_TYPE SHARED) - - find_library(COCOA_LIBRARY Cocoa) - find_library(COREFOUNDATION_LIBRARY CoreFoundation) --find_library(READLINE_LIBRARY Readline) - list(APPEND WTF_LIBRARIES - ${COREFOUNDATION_LIBRARY} - ${COCOA_LIBRARY} -- ${READLINE_LIBRARY} - libicucore.dylib - ) - diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index 6d0e241d7a54..b3095dd9a7e3 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -51,11 +51,7 @@ let patches = { qtbase = [ ./qtbase.patch - ./qtbase-darwin.patch - ./qtbase-revert-no-macos10.10.patch ./qtbase-fixguicmake.patch - ] ++ optionals stdenv.isDarwin [ - ./qtbase-darwin-nseventtype.patch ]; qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch b/pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch deleted file mode 100644 index 9ef6e8ef0692..000000000000 --- a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin-nseventtype.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -404,8 +404,8 @@ void QCocoaWindow::setVisible(bool visible) - removeMonitor(); - monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask|NSRightMouseDownMask|NSOtherMouseDownMask|NSMouseMovedMask handler:^(NSEvent *e) { - QPointF localPoint = QCocoaScreen::mapFromNative([NSEvent mouseLocation]); -- const auto button = e.type == NSEventTypeMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]); -- const auto eventType = e.type == NSEventTypeMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress; -+ const auto button = e.type == NSMouseMoved ? Qt::NoButton : cocoaButton2QtButton([e buttonNumber]); -+ const auto eventType = e.type == NSMouseMoved ? QEvent::MouseMove : QEvent::MouseButtonPress; - QWindowSystemInterface::handleMouseEvent(window(), window()->mapFromGlobal(localPoint.toPoint()), localPoint, - Qt::MouseButtons(uint(NSEvent.pressedMouseButtons & 0xFFFF)), button, eventType); - }]; diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch deleted file mode 100644 index 7ce27a99758e..000000000000 --- a/pkgs/development/libraries/qt-5/5.12/qtbase-darwin.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm -index c3dd49ff3e..6871399817 100644 ---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm -+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm -@@ -283,7 +283,7 @@ void QScanThread::getUserConfigurations() - QMacAutoReleasePool pool; - userProfiles.clear(); - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - - CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName]; -@@ -598,7 +598,7 @@ void QCoreWlanEngine::doRequestUpdate() - - QMacAutoReleasePool pool; - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - scanThread->interfaceName = QString::fromNSString(ifName); - scanThread->start(); -diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm -index afe14e623c..74d69c2fa1 100644 ---- a/src/plugins/platforms/cocoa/qcocoascreen.mm -+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm -@@ -127,7 +127,7 @@ void QCocoaScreen::updateProperties() - const qreal previousRefreshRate = m_refreshRate; - - // The reference screen for the geometry is always the primary screen -- QRectF primaryScreenGeometry = QRectF::fromCGRect([[NSScreen screens] firstObject].frame); -+ QRectF primaryScreenGeometry = QRectF::fromCGRect([[[NSScreen screens] firstObject] frame]); - m_geometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.frame), primaryScreenGeometry).toRect(); - m_availableGeometry = qt_mac_flip(QRectF::fromCGRect(nsScreen.visibleFrame), primaryScreenGeometry).toRect(); - -diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm -index df1ad82592..0318a4ff96 100644 ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -1704,7 +1704,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window) - - if (!m_drawContentBorderGradient) { - window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground; -- [window.contentView.superview setNeedsDisplay:YES]; -+ [[window.contentView superview] setNeedsDisplay:YES]; - window.titlebarAppearsTransparent = NO; - return; - } -diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm -index c17ad47aba..a0f1dd38fb 100644 ---- a/src/plugins/platforms/cocoa/qnswindow.mm -+++ b/src/plugins/platforms/cocoa/qnswindow.mm -@@ -230,7 +230,7 @@ static bool isMouseEvent(NSEvent *ev) - if (pw->frameStrutEventsEnabled() && isMouseEvent(theEvent)) { - NSPoint loc = [theEvent locationInWindow]; - NSRect windowFrame = [self convertRectFromScreen:self.frame]; -- NSRect contentFrame = self.contentView.frame; -+ NSRect contentFrame = [self.contentView frame]; - if (NSMouseInRect(loc, windowFrame, NO) && !NSMouseInRect(loc, contentFrame, NO)) - [qnsview_cast(pw->view()) handleFrameStrutMouseEvent:theEvent]; - } -@@ -257,7 +257,7 @@ static bool isMouseEvent(NSEvent *ev) - + (void)applicationActivationChanged:(NSNotification*)notification - { - const id sender = self; -- NSEnumerator *windowEnumerator = nullptr; -+ NSEnumerator *windowEnumerator = nullptr; - NSApplication *application = [NSApplication sharedApplication]; - - // Unfortunately there's no NSWindowListOrderedBackToFront, diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch b/pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch deleted file mode 100644 index 29776518379d..000000000000 --- a/pkgs/development/libraries/qt-5/5.12/qtbase-revert-no-macos10.10.patch +++ /dev/null @@ -1,102 +0,0 @@ -Revert "Remove code paths for macOS < 10.11" - -This reverts commit 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3. - -From 138a65e0cfa80b13fd018a01e7d8b33341a3cfd3 Mon Sep 17 00:00:00 2001 -From: Jake Petroules -Date: Thu, 8 Feb 2018 11:05:42 -0800 -Subject: [PATCH] Remove code paths for macOS < 10.11 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: I5ae02d88aa3dcd97d1f2ebf6255a68643e5d6daa -Reviewed-by: Tor Arne Vestbø -Reviewed-by: Gabriel de Dietrich -Reviewed-by: Konstantin Ritt ---- - .../fontdatabases/mac/qfontengine_coretext.mm | 16 +++------------- - src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 +----- - src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 ---------------- - 3 files changed, 4 insertions(+), 34 deletions(-) - -diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -index 98b753eff9..489d9cd031 100644 ---- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm -@@ -47,18 +47,28 @@ - - #include - --#if defined(Q_OS_MACOS) -+#if defined(Q_OS_OSX) && !QT_OSX_DEPLOYMENT_TARGET_BELOW(__MAC_10_11) - #import - #endif - --#if defined(QT_PLATFORM_UIKIT) -+#if defined(QT_PLATFORM_UIKIT) && !QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_8_2) - #import - #endif - - // These are available cross platform, exported as kCTFontWeightXXX from CoreText.framework, - // but they are not documented and are not in public headers so are private API and exposed - // only through the NSFontWeightXXX and UIFontWeightXXX aliases in AppKit and UIKit (rdar://26109857) --#if defined(Q_OS_MACOS) -+#if QT_MAC_DEPLOYMENT_TARGET_BELOW(__MAC_10_11, __IPHONE_8_2) -+#define kCTFontWeightUltraLight -0.8 -+#define kCTFontWeightThin -0.6 -+#define kCTFontWeightLight -0.4 -+#define kCTFontWeightRegular 0 -+#define kCTFontWeightMedium 0.23 -+#define kCTFontWeightSemibold 0.3 -+#define kCTFontWeightBold 0.4 -+#define kCTFontWeightHeavy 0.56 -+#define kCTFontWeightBlack 0.62 -+#elif defined(Q_OS_OSX) - #define kCTFontWeightUltraLight NSFontWeightUltraLight - #define kCTFontWeightThin NSFontWeightThin - #define kCTFontWeightLight NSFontWeightLight -diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm -index 94f2125bad..272cd9f3dc 100644 ---- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm -+++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm -@@ -162,7 +162,11 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate); - // resetting our mCurrentDir, set the delegate - // here to make sure it gets the correct value. - [mSavePanel setDelegate:self]; -- mOpenPanel.accessoryViewDisclosed = YES; -+ -+#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11) -+ if (__builtin_available(macOS 10.11, *)) -+ mOpenPanel.accessoryViewDisclosed = YES; -+#endif - - if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept)) - [mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]]; -diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm -index 057a4c2943..eb55e50622 100644 ---- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm -+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm -@@ -103,6 +103,22 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*")); - return QCocoaScreen::mapToNative(maximizedFrame); - } - -+#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11) -+/* -+ AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame -+ from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting -+ in black bars on top and bottom of the window. By implementing the following -+ method, AppKit will choose that instead, and resolve the right fullscreen -+ geometry. -+*/ -+- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize -+{ -+ Q_UNUSED(proposedSize); -+ Q_ASSERT(window == m_cocoaWindow->nativeWindow()); -+ return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize()); -+} -+#endif -+ - - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu - { - Q_UNUSED(window); diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix index be84691e6c33..d1e9af299261 100644 --- a/pkgs/development/libraries/qt-5/5.9/default.nix +++ b/pkgs/development/libraries/qt-5/5.9/default.nix @@ -38,7 +38,7 @@ let srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; patches = { - qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch; + qtbase = [ ./qtbase.patch ./qtbase-fixguicmake.patch ]; qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch deleted file mode 100644 index 875fba12e2fb..000000000000 --- a/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm -index 341d3bc..3368234 100644 ---- a/src/plugins/bearer/corewlan/qcorewlanengine.mm -+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm -@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations() - QMacAutoReleasePool pool; - userProfiles.clear(); - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - - CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName]; -@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate() - - QMacAutoReleasePool pool; - -- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; -+ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; - for (NSString *ifName in wifiInterfaces) { - scanThread->interfaceName = QString::fromNSString(ifName); - scanThread->start(); -diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm -index 5cd4beb..84919e6 100644 ---- a/src/plugins/platforms/cocoa/qcocoawindow.mm -+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm -@@ -320,7 +320,7 @@ static void qt_closePopups() - + (void)applicationActivationChanged:(NSNotification*)notification - { - const id sender = self; -- NSEnumerator *windowEnumerator = nullptr; -+ NSEnumerator *windowEnumerator = nullptr; - NSApplication *application = [NSApplication sharedApplication]; - - #if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12) diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 92ac8a242013..68759a26e82a 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -2,7 +2,7 @@ stdenv, lib, src, patches, version, qtCompatVersion, - coreutils, bison, flex, gdb, gperf, lndir, patchelf, perl, pkgconfig, python2, + coreutils, bison, flex, gdb, gperf, lndir, perl, pkgconfig, python2, which, # darwin support darwin, libiconv, @@ -78,17 +78,15 @@ stdenv.mkDerivation { [ libinput ] ++ lib.optional withGtk3 gtk3 ) - ++ lib.optional stdenv.isDarwin - # Needed for OBJC_CLASS_$_NSDate symbols. - [ darwin.cf-private ] + # Needed for OBJC_CLASS_$_NSDate symbols. + ++ lib.optional stdenv.isDarwin darwin.cf-private ++ lib.optional developerBuild gdb ++ lib.optional (cups != null) cups ++ lib.optional (mysql != null) mysql.connector-c ++ lib.optional (postgresql != null) postgresql; nativeBuildInputs = - [ bison flex gperf lndir perl pkgconfig python2 which ] - ++ lib.optional (!stdenv.isDarwin) patchelf; + [ bison flex gperf lndir perl pkgconfig python2 which ]; propagatedNativeBuildInputs = [ lndir ]; @@ -199,26 +197,11 @@ stdenv.mkDerivation { ''-DNIXPKGS_LIBXCURSOR="${libXcursor.out}/lib/libXcursor"'' ] - ++ ( - if stdenv.isDarwin - then - [ - "-Wno-missing-sysroot" - "-D__MAC_OS_X_VERSION_MAX_ALLOWED=1090" - "-D__AVAILABILITY_INTERNAL__MAC_10_10=__attribute__((availability(macosx,introduced=10.10)))" - # Note that nixpkgs's objc4 is from macOS 10.11 while the SDK is - # 10.9 which necessitates the above macro definition that mentions - # 10.10 - ] - else - lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"'' - ++ lib.optionals withGtk3 - [ - ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"'' - ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"'' - ] - ) - + ++ lib.optional libGLSupported ''-DNIXPKGS_MESA_GL="${libGL.out}/lib/libGL"'' + ++ lib.optionals withGtk3 [ + ''-DNIXPKGS_QGTK3_XDG_DATA_DIRS="${gtk3}/share/gsettings-schemas/${gtk3.name}"'' + ''-DNIXPKGS_QGTK3_GIO_EXTRA_MODULES="${dconf.lib}/lib/gio/modules"'' + ] ++ lib.optional decryptSslTraffic "-DQT_DECRYPT_SSL_TRAFFIC"; prefixKey = "-prefix "; diff --git a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix index 91b7acf43654..fb838283b1b1 100644 --- a/pkgs/development/libraries/qt-5/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-5/modules/qtwebengine.nix @@ -79,7 +79,7 @@ qtModule { cat < src/3rdparty/chromium/build/mac/find_sdk.py #!/usr/bin/env python print("${darwin.apple_sdk.sdk}") -print("10.10.0") +print("10.12.0") EOF cat < src/3rdparty/chromium/build/config/mac/sdk_info.py @@ -102,22 +102,6 @@ EOF --replace 'libs = [ "sandbox" ]' 'libs = [ "/usr/lib/libsandbox.1.dylib" ]' ''); - NIX_CFLAGS_COMPILE = - lib.optionalString stdenv.isDarwin [ - "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10" - "-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10" - - # - # Prevent errors like - # /nix/store/xxx-apple-framework-CoreData/Library/Frameworks/CoreData.framework/Headers/NSEntityDescription.h:51:7: - # error: pointer to non-const type 'id' with no explicit ownership - # id** _kvcPropertyAccessors; - # - # TODO remove when new Apple SDK is in - # - "-fno-objc-arc" - ]; - preConfigure = '' export NINJAFLAGS=-j$NIX_BUILD_CORES diff --git a/pkgs/development/python-modules/matplotlib/2.nix b/pkgs/development/python-modules/matplotlib/2.nix index 810f37b4b136..5a45b02a240b 100644 --- a/pkgs/development/python-modules/matplotlib/2.nix +++ b/pkgs/development/python-modules/matplotlib/2.nix @@ -60,7 +60,7 @@ buildPythonPackage rec { url = "https://github.com/matplotlib/matplotlib/commit/2980184d092382a40ab21f95b79582ffae6e19d6.patch"; sha256 = "1c0wj28zy8s5h6qiavx9zzbhlmhjwpzbc3fyyw9039mbnqk0spg2"; }) - ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.patch ]; + ]; # Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the # corresponding interpreter object for its library paths. This fails if diff --git a/pkgs/development/python-modules/matplotlib/darwin-stdenv-2.2.3.patch b/pkgs/development/python-modules/matplotlib/darwin-stdenv-2.2.3.patch deleted file mode 100644 index ca399b4e6841..000000000000 --- a/pkgs/development/python-modules/matplotlib/darwin-stdenv-2.2.3.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/_macosx.m 2015-10-30 00:46:20.000000000 +0200 -+++ b/src/_macosx.m 2015-11-01 14:52:25.000000000 +0200 -@@ -6264,6 +6264,7 @@ - - static bool verify_framework(void) - { -+ return true; /* nixpkgs darwin stdenv */ - #ifdef COMPILING_FOR_10_6 - NSRunningApplication* app = [NSRunningApplication currentApplication]; - NSApplicationActivationPolicy activationPolicy = [app activationPolicy]; diff --git a/pkgs/development/python-modules/matplotlib/darwin-stdenv.patch b/pkgs/development/python-modules/matplotlib/darwin-stdenv.patch deleted file mode 100644 index 27ed8fc9f964..000000000000 --- a/pkgs/development/python-modules/matplotlib/darwin-stdenv.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN matplotlib-3.0.0/src/_macosx.m matplotlib-3.0.0.patched/src/_macosx.m ---- matplotlib-3.0.0/src/_macosx.m 2018-09-16 00:35:21.000000000 +0200 -+++ matplotlib-3.0.0.patched/src/_macosx.m 2018-11-03 13:14:33.000000000 +0100 -@@ -2577,6 +2577,7 @@ - - static bool verify_framework(void) - { -+ return true; /* nixpkgs darwin stdenv */ - ProcessSerialNumber psn; - /* These methods are deprecated, but they don't require the app to - have started */ - diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index d3ea365082cd..cbdd43af811f 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -52,8 +52,7 @@ buildPythonPackage rec { ++ stdenv.lib.optionals enableQt [ pyqt4 ]; patches = - [ ./basedirlist.patch ] ++ - stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv.patch ]; + [ ./basedirlist.patch ]; # Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the # corresponding interpreter object for its library paths. This fails if diff --git a/pkgs/games/gargoyle/darwin.patch b/pkgs/games/gargoyle/darwin.patch deleted file mode 100644 index 6958fe495d26..000000000000 --- a/pkgs/games/gargoyle/darwin.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- a/garglk/fontmac.m -+++ b/garglk/fontmac.m -@@ -167,7 +167,7 @@ static void propfont(char *file, int style) - } - } - --static NSMutableArray * gli_registered_fonts = nil; -+static NSMutableArray * gli_registered_fonts = nil; - static NSDistributedLock * gli_font_lock = nil; - - void fontreplace(char *font, int type) -@@ -181,7 +181,7 @@ void fontreplace(char *font, int type) - NSFontDescriptor * fontFamilyDescriptor = - [[NSFontDescriptor fontDescriptorWithFontAttributes: nil] fontDescriptorWithFamily: fontFamily]; - -- NSArray * fontMatches = -+ NSArray * fontMatches = - [fontFamilyDescriptor matchingFontDescriptorsWithMandatoryKeys: nil]; - - for (NSFontDescriptor * sysfont in fontMatches) -@@ -259,7 +259,7 @@ void fontload(void) - - // obtain a list of all files in the Fonts directory - NSString * fontFolder = [[NSString stringWithUTF8String: env] stringByAppendingPathComponent: @"Fonts"]; -- NSArray * fontFiles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: fontFolder error: nil]; -+ NSArray * fontFiles = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: fontFolder error: nil]; - - // create a collection to hold the registered font URLs - gli_registered_fonts = [NSMutableArray new]; ---- a/garglk/launchmac.m -+++ b/garglk/launchmac.m -@@ -556,7 +556,7 @@ static BOOL isTextbufferEvent(NSEvent * evt) - - { - BOOL openedFirstGame; -- NSMutableDictionary * windows; -+ NSMutableDictionary * windows; - NSConnection * link; - } - - (BOOL) launchFile: (NSString *) file; ---- a/garglk/ttsmac.m -+++ b/garglk/ttsmac.m -@@ -30,7 +30,7 @@ - #import "sysmac.h" - - // a queue of phrases to feed to the speech synthesizer --static NSMutableArray * phraseQueue = nil; -+static NSMutableArray * phraseQueue = nil; - static NSRange purgeRange; - - @interface SpeechDelegate : NSObject -@@ -96,10 +96,10 @@ void gli_initialize_tts(void) - NSString * lang = [NSString stringWithCString: gli_conf_speak_language - encoding: NSUTF8StringEncoding]; - -- NSArray * voices = [NSSpeechSynthesizer availableVoices]; -+ NSArray * voices = [NSSpeechSynthesizer availableVoices]; - for (NSString * voice in voices) - { -- NSDictionary * attr = [NSSpeechSynthesizer attributesForVoice: voice]; -+ NSDictionary * attr = [NSSpeechSynthesizer attributesForVoice: voice]; - if ([lang isEqualToString: [attr objectForKey: NSVoiceLocaleIdentifier]]) - { - [synth setVoice: voice]; diff --git a/pkgs/games/gargoyle/default.nix b/pkgs/games/gargoyle/default.nix index e645a40aa752..62ea798e4656 100644 --- a/pkgs/games/gargoyle/default.nix +++ b/pkgs/games/gargoyle/default.nix @@ -34,8 +34,6 @@ stdenv.mkDerivation { buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ] ++ stdenv.lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ]; - patches = [ ./darwin.patch ]; - buildPhase = jamenv + "jam -j$NIX_BUILD_CORES"; installPhase = From f76c7b8fab2f4e5e3866d4dced0f18ceeae562b4 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 25 Jan 2019 18:04:50 -0500 Subject: [PATCH 09/70] libtapi: init (cherry picked from commit 69347697d3336d4b6add8276d9f75daf6f0cacf3) --- pkgs/os-specific/darwin/cctools/port.nix | 10 +++++-- pkgs/os-specific/darwin/libtapi/default.nix | 29 +++++++++++++++++++++ pkgs/top-level/darwin-packages.nix | 4 ++- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 pkgs/os-specific/darwin/libtapi/default.nix diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index caf85b227bed..b379933f3c80 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -2,6 +2,7 @@ , libcxxabi, libuuid, llvm , libobjc ? null, maloader ? null , enableDumpNormalizedLibArgs ? false +, enableTapiSupport ? stdenv.hostPlatform != stdenv.targetPlatform, libtapi }: let @@ -52,7 +53,8 @@ let nativeBuildInputs = [ autoconf automake libtool_2 autoreconfHook ]; buildInputs = [ libuuid ] - ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]; + ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] + ++ stdenv.lib.optional enableTapiSupport libtapi; patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch @@ -74,7 +76,11 @@ let # TODO(@Ericson2314): Always pass "--target" and always targetPrefix. configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; - configureFlags = [ "--disable-clang-as" ]; + configureFlags = [ "--disable-clang-as" ] + ++ stdenv.lib.optionals enableTapiSupport [ + "--enable-tapi-support" + "--with-libtapi=${libtapi}" + ]; postPatch = '' sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp diff --git a/pkgs/os-specific/darwin/libtapi/default.nix b/pkgs/os-specific/darwin/libtapi/default.nix new file mode 100644 index 000000000000..e68e77f55afe --- /dev/null +++ b/pkgs/os-specific/darwin/libtapi/default.nix @@ -0,0 +1,29 @@ +{ lib, stdenv, fetchFromGitHub, cmake, python }: + +stdenv.mkDerivation { + name = "libtapi"; + src = fetchFromGitHub { + owner = "tpoechtrager"; + repo = "apple-libtapi"; + rev = "e56673694db395e25b31808b4fbb9a7005e6875f"; + sha256 = "1lnl1af9sszp9wxfk0wljrpdmwcx83j0w5c0y4qw4pqrdkdgwks7"; + }; + + nativeBuildInputs = [ cmake python ]; + + preConfigure = '' + cd src/apple-llvm/src + ''; + + cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ]; + + buildFlags = "libtapi"; + + installTarget = "install-libtapi"; + + meta = with lib; { + license = licenses.apsl20; + maintainers = with maintainers; [ matthewbauer ]; + }; + +} diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 5ff97aa44401..2a82af19fa2b 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -27,7 +27,7 @@ in }; cctools = callPackage ../os-specific/darwin/cctools/port.nix { - inherit (darwin) libobjc maloader; + inherit (darwin) libobjc maloader libtapi; stdenv = if stdenv.isDarwin then stdenv else pkgs.libcxxStdenv; libcxxabi = pkgs.libcxxabi; }; @@ -79,4 +79,6 @@ in darling = callPackage ../os-specific/darwin/darling/default.nix { }; + libtapi = callPackage ../os-specific/darwin/libtapi {}; + }) From 36450d8d0b1fc1ed7c4e625a0267528732d2d83e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 9 Feb 2019 15:09:43 -0500 Subject: [PATCH 10/70] cctools: enable tapi everywhere Gets us closer to #19906. --- pkgs/os-specific/darwin/cctools/port.nix | 2 +- pkgs/stdenv/darwin/default.nix | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index b379933f3c80..a1aa601d2383 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -2,7 +2,7 @@ , libcxxabi, libuuid, llvm , libobjc ? null, maloader ? null , enableDumpNormalizedLibArgs ? false -, enableTapiSupport ? stdenv.hostPlatform != stdenv.targetPlatform, libtapi +, enableTapiSupport ? true, libtapi }: let diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index af74be3a1c64..edbc84b9a68a 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -200,7 +200,12 @@ in rec { python2 = self.python; ninja = super.ninja.override { buildDocs = false; }; - darwin = super.darwin // { cctools = super.darwin.cctools.override { llvm = null; }; }; + darwin = super.darwin // { + cctools = super.darwin.cctools.override { + llvm = null; + enableTapiSupport = false; + }; + }; }; in with prevStage; stageFun 1 prevStage { extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\""; @@ -326,6 +331,7 @@ in rec { darwin = super.darwin // rec { inherit (darwin) dyld Libsystem libiconv locale; + cctools = super.darwin.cctools.override { enableTapiSupport = false; }; libxml2-nopython = super.libxml2.override { pythonSupport = false; }; CF = super.darwin.CF.override { libxml2 = libxml2-nopython; From 7f08b28bbfa628efd5b3529802b4587d73f5f36b Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 2 Mar 2019 20:53:14 -0500 Subject: [PATCH 11/70] Revert "Revert "cctools: bump to latest commit"" This reverts commit 0e78f2bd10df60c78144073a9f8dcd6086f046cf. --- .../darwin/cctools/ld-tbd-v2.patch | 98 ------------------- pkgs/os-specific/darwin/cctools/port.nix | 50 +++------- .../darwin/cctools/support-ios.patch | 13 --- .../darwin/cctools/undo-unknown-triple.patch | 17 ---- pkgs/top-level/all-packages.nix | 5 - 5 files changed, 12 insertions(+), 171 deletions(-) delete mode 100644 pkgs/os-specific/darwin/cctools/ld-tbd-v2.patch delete mode 100644 pkgs/os-specific/darwin/cctools/support-ios.patch delete mode 100644 pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch diff --git a/pkgs/os-specific/darwin/cctools/ld-tbd-v2.patch b/pkgs/os-specific/darwin/cctools/ld-tbd-v2.patch deleted file mode 100644 index 9aae2be1d033..000000000000 --- a/pkgs/os-specific/darwin/cctools/ld-tbd-v2.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff --git a/cctools/ld64/src/ld/parsers/textstub_dylib_file.cpp b/cctools/ld64/src/ld/parsers/textstub_dylib_file.cpp -index 09c0e12..ac6b085 100644 ---- a/cctools/ld64/src/ld/parsers/textstub_dylib_file.cpp -+++ b/cctools/ld64/src/ld/parsers/textstub_dylib_file.cpp -@@ -187,6 +187,7 @@ struct DynamicLibrary { - ld::File::ObjcConstraint _objcConstraint; - Options::Platform _platform; - std::vector _allowedClients; -+ std::vector _allowableClients; - std::vector _reexportedLibraries; - std::vector _symbols; - std::vector _classes; -@@ -246,6 +247,14 @@ class TBDFile { - }); - } - -+ void parseAllowableClients(DynamicLibrary& lib) { -+ if ( !hasOptionalToken("allowable-clients") ) -+ return; -+ parseFlowSequence([&](Token name) { -+ lib._allowableClients.emplace_back(name); -+ }); -+ } -+ - void parseReexportedDylibs(DynamicLibrary& lib) { - if ( !hasOptionalToken("re-exports") ) - return; -@@ -306,6 +315,21 @@ class TBDFile { - return false; - } - -+ void skipUUIDs(DynamicLibrary& lib) { -+ expectToken("uuids"); -+ while ( true ) { -+ auto token = next(); -+ if ( token == "]" ) -+ break; -+ } -+ } -+ -+ void skipParentUmbrella(DynamicLibrary& lib) { -+ if (!hasOptionalToken("parent-umbrella")) -+ return; -+ next(); -+ } -+ - void parsePlatform(DynamicLibrary& lib) { - expectToken("platform"); - -@@ -410,6 +434,7 @@ class TBDFile { - } - - parseAllowedClients(lib); -+ parseAllowableClients(lib); - parseReexportedDylibs(lib); - parseSymbols(lib); - if ( !hasOptionalToken("-") ) -@@ -455,17 +480,21 @@ class TBDFile { - return result.front(); - } - -- void parseDocument(DynamicLibrary& lib, std::string &requestedArchName) { -+ void parseDocument(DynamicLibrary& lib, std::string &requestedArchName, bool isTbdV2) { - auto selectedArchName = parseAndSelectArchitecture(requestedArchName); - if (selectedArchName.empty()) - throwf("invalid arch"); - -+ if(isTbdV2) -+ skipUUIDs(lib); - parsePlatform(lib); - parseInstallName(lib); - parseCurrentVersion(lib); - parseCompatibilityVersion(lib); - parseSwiftVersion(lib); - parseObjCConstraint(lib); -+ if(isTbdV2) -+ skipParentUmbrella(lib); - parseExportsBlock(lib, selectedArchName); - } - -@@ -476,7 +505,8 @@ public: - _tokenizer.reset(); - DynamicLibrary lib; - expectToken("---"); -- parseDocument(lib, requestedArchName); -+ auto isTbdV2 = hasOptionalToken("!tapi-tbd-v2"); -+ parseDocument(lib, requestedArchName, isTbdV2); - expectToken("..."); - return lib; - } -@@ -486,6 +516,7 @@ public: - auto token = next(); - if ( token != "---" ) - return false; -+ hasOptionalToken("!tapi-tbd-v2"); - return !parseAndSelectArchitecture(requestedArchName).empty(); - } - diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index a1aa601d2383..fcab00163a63 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -1,19 +1,11 @@ -{ stdenv, fetchFromGitHub, autoconf, automake, libtool_2, autoreconfHook +{ stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook , libcxxabi, libuuid, llvm , libobjc ? null, maloader ? null -, enableDumpNormalizedLibArgs ? false , enableTapiSupport ? true, libtapi }: let - # We need to use an old version of cctools-port to support linking TBD files - # in the iOS SDK. Note that this only provides support for SDK versions up to - # 10.x. For 11.0 and higher we will need to upgrade to a newer cctools than the - # default version here, which can support the new TBD format via Apple's - # libtapi. - useOld = stdenv.targetPlatform.isiOS; - # The targetPrefix prepended to binary names to allow multiple binuntils on the # PATH to both be usable. targetPrefix = stdenv.lib.optionalString @@ -24,48 +16,28 @@ in # Non-Darwin alternatives assert (!stdenv.hostPlatform.isDarwin) -> maloader != null; -assert enableDumpNormalizedLibArgs -> (!useOld); - let baseParams = rec { name = "${targetPrefix}cctools-port-${version}"; - version = if useOld then "886" else "895"; + version = "895"; - src = fetchFromGitHub (if enableDumpNormalizedLibArgs then { + src = fetchFromGitHub { owner = "tpoechtrager"; repo = "cctools-port"; - # master with https://github.com/tpoechtrager/cctools-port/pull/34 - rev = "8395d4b2c3350356e2fb02f5e04f4f463c7388df"; - sha256 = "10vbf1cfzx02q8chc77s84fp2kydjpx2y682mr6mrbb7sq5rwh8f"; - } else if useOld then { - owner = "tpoechtrager"; - repo = "cctools-port"; - rev = "02f0b8ecd87a3951653d838a321ae744815e21a5"; - sha256 = "0bzyabzr5dvbxglr74d0kbrk2ij5x7s5qcamqi1v546q1had1wz1"; - } else { - owner = "tpoechtrager"; - repo = "cctools-port"; - rev = "2e569d765440b8cd6414a695637617521aa2375b"; # From branch 895-ld64-274.2 - sha256 = "0l45mvyags56jfi24rawms8j2ihbc45mq7v13pkrrwppghqrdn52"; - }); + rev = "07619027f8311fa61b4a549c75994b88739a82d8"; + sha256 = "12g94hhz5v5bmy2w0zb6fb4bjlmn992gygc60h9nai15kshj2spi"; + }; outputs = [ "out" "dev" ]; - nativeBuildInputs = [ autoconf automake libtool_2 autoreconfHook ]; + nativeBuildInputs = [ autoconf automake libtool autoreconfHook ]; buildInputs = [ libuuid ] ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; - patches = [ - ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch - ] ++ stdenv.lib.optionals useOld [ - # See https://github.com/tpoechtrager/cctools-port/issues/24. Remove when that's fixed. - ./undo-unknown-triple.patch - ./ld-tbd-v2.patch - ./support-ios.patch - ]; + patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ]; - __propagatedImpureHostDeps = stdenv.lib.optionals (!useOld) [ + __propagatedImpureHostDeps = [ # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them "/usr/lib/libobjc.A.dylib" "/usr/lib/libobjc.dylib" @@ -82,7 +54,9 @@ let "--with-libtapi=${libtapi}" ]; - postPatch = '' + postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' + substituteInPlace cctools/Makefile.am --replace libobjc2 "" + '' + '' sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp # FIXME: there are far more absolute path references that I don't want to fix right now diff --git a/pkgs/os-specific/darwin/cctools/support-ios.patch b/pkgs/os-specific/darwin/cctools/support-ios.patch deleted file mode 100644 index f78c6b63ac80..000000000000 --- a/pkgs/os-specific/darwin/cctools/support-ios.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cctools/configure.ac b/cctools/configure.ac -index 56e8f24..0b4b3ff 100644 ---- a/cctools/configure.ac -+++ b/cctools/configure.ac -@@ -39,7 +39,7 @@ EXTRACXXFLAGS="" - WARNINGS="" - - case $host_os in -- darwin* ) -+ darwin* | ios*) - isdarwin=yes - AM_CONDITIONAL([ISDARWIN], [true]) - ;; diff --git a/pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch b/pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch deleted file mode 100644 index 7df9bdd16dab..000000000000 --- a/pkgs/os-specific/darwin/cctools/undo-unknown-triple.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/cctools/as/driver.c b/cctools/as/driver.c -index b06d085..c03397a 100644 ---- a/cctools/as/driver.c -+++ b/cctools/as/driver.c -@@ -363,12 +363,6 @@ char **envp) - /* Add -c or clang will run ld(1). */ - new_argv[j] = "-c"; - j++; -- /* cctools-port start */ -- new_argv[j] = "-target"; -- j++; -- new_argv[j] = "unknown-apple-darwin"; -- j++; -- /* cctools-port end */ - new_argv[j] = NULL; - if(execute(new_argv, verbose)) - exit(0); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5087400460bd..6d544b451ffa 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6880,11 +6880,6 @@ in name = "clang-wrapper-with-reexport-hack"; bintools = darwin.binutils.override { useMacosReexportHack = true; - bintools = darwin.binutils.bintools.override { - cctools = darwin.cctools.override { - enableDumpNormalizedLibArgs = true; - }; - }; }; }; llvm-polly = llvmPackages_latest.llvm-polly; From 2ecc1d1599f446579e0ba6e34fbb83296cc21ed4 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 1 Mar 2019 23:11:54 -0500 Subject: [PATCH 12/70] stdenv/darwin: move secure-format patch to gnum4 This is the only derivation that needs it anymore. --- .../tools/misc/gnum4}/darwin-secure-format.patch | 0 pkgs/development/tools/misc/gnum4/default.nix | 3 ++- pkgs/stdenv/darwin/default.nix | 6 ------ 3 files changed, 2 insertions(+), 7 deletions(-) rename pkgs/{stdenv/darwin => development/tools/misc/gnum4}/darwin-secure-format.patch (100%) diff --git a/pkgs/stdenv/darwin/darwin-secure-format.patch b/pkgs/development/tools/misc/gnum4/darwin-secure-format.patch similarity index 100% rename from pkgs/stdenv/darwin/darwin-secure-format.patch rename to pkgs/development/tools/misc/gnum4/darwin-secure-format.patch diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index f477d42fcf14..afe9b59e012d 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -13,7 +13,8 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]; # Upstream is aware of it; it may be in the next release. - patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch; + patches = [ ./s_isdir.patch ] + ++ stdenv.lib.optional stdenv.isDarwin ./darwin-secure-format.patch; meta = { homepage = https://www.gnu.org/software/m4/; diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index edbc84b9a68a..3102b255c0a6 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -132,9 +132,6 @@ in rec { extraAttrs = { inherit platform; parent = last; - - # This is used all over the place so I figured I'd just leave it here for now - secure-format-patch = ./darwin-secure-format.patch; }; overrides = self: super: (overrides self super) // { fetchurl = thisStdenv.fetchurlBoot; }; }; @@ -420,9 +417,6 @@ in rec { inherit platform bootstrapTools; libc = pkgs.darwin.Libsystem; shellPackage = pkgs.bash; - - # This is used all over the place so I figured I'd just leave it here for now - secure-format-patch = ./darwin-secure-format.patch; }; allowedRequisites = (with pkgs; [ From 61bc03c017f18e2fe54d209ae8ba8a42033b9564 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 6 Feb 2019 20:10:07 -0500 Subject: [PATCH 13/70] Revert "Revert "patch-shebangs: respect cross compilation"" This reverts commit 9c4b11e9a060de2175aef4d36881f97812ab17fe. --- .../setup-hooks/patch-shebangs.sh | 53 +++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index d26bf735d30a..441f230869b2 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -5,10 +5,32 @@ # rewritten to /nix/store//bin/python. Interpreters that are # already in the store are left untouched. -fixupOutputHooks+=('if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then patchShebangs "$prefix"; fi') +fixupOutputHooks+=(patchShebangsAuto) + +# Run patch shebangs on a directory. +# patchShebangs [--build | --host] directory + +# Flags: +# --build : Lookup commands available at build-time +# --host : Lookup commands available at runtime + +# Example use cases, +# $ patchShebangs --host /nix/store/...-hello-1.0/bin +# $ patchShebangs --build configure patchShebangs() { + local pathName + + if [ "$1" = "--host" ]; then + pathName=HOST_PATH + shift + elif [ "$1" = "--build" ]; then + pathName=PATH + shift + fi + local dir="$1" + header "patching script interpreter paths in $dir" local f local oldPath @@ -27,6 +49,14 @@ patchShebangs() { oldInterpreterLine=$(head -1 "$f" | tail -c+3) read -r oldPath arg0 args <<< "$oldInterpreterLine" + if [ -z "$pathName" ]; then + if [ -n "$strictDeps" ] && [[ "$f" = "$NIX_STORE"* ]]; then + pathName=HOST_PATH + else + pathName=PATH + fi + fi + if $(echo "$oldPath" | grep -q "/bin/env$"); then # Check for unsupported 'env' functionality: # - options: something starting with a '-' @@ -35,14 +65,17 @@ patchShebangs() { echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" exit 1 fi - newPath="$(command -v "$arg0" || true)" + + newPath="$(PATH="${!pathName}" command -v "$arg0" || true)" else if [ "$oldPath" = "" ]; then # If no interpreter is specified linux will use /bin/sh. Set # oldpath="/bin/sh" so that we get /nix/store/.../sh. oldPath="/bin/sh" fi - newPath="$(command -v "$(basename "$oldPath")" || true)" + + newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)" + args="$arg0 $args" fi @@ -65,3 +98,17 @@ patchShebangs() { stopNest } + +patchShebangsAuto () { + if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then + + # Dev output will end up being run on the build platform. An + # example case of this is sdl2-config. Otherwise, we can just + # use the runtime path (--host). + if [ "$output" != out ] && [ "$output" = "${!outputDev}" ]; then + patchShebangs --build "$prefix" + else + patchShebangs --host "$prefix" + fi + fi +} From a1533dfc414961bb723937c111f5fe0925411f75 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 8 Feb 2019 20:48:50 -0500 Subject: [PATCH 14/70] patch-shebangs: fix dev detection $output = $outputDev is the right condition. ${!outputDev} is only useful if you want a path. --- pkgs/build-support/setup-hooks/patch-shebangs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index 441f230869b2..c74978197991 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -105,7 +105,7 @@ patchShebangsAuto () { # Dev output will end up being run on the build platform. An # example case of this is sdl2-config. Otherwise, we can just # use the runtime path (--host). - if [ "$output" != out ] && [ "$output" = "${!outputDev}" ]; then + if [ "$output" != out ] && [ "$output" = "$outputDev" ]; then patchShebangs --build "$prefix" else patchShebangs --host "$prefix" From ec7d72a57d5ba18a35451b174e2f3c8d4a425b94 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 2 Mar 2019 20:02:45 -0500 Subject: [PATCH 15/70] setup.sh: make sure initialPath goes at end of HOST_PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want initialPath to have lowest precedence. In addition, unset _PATH and _HOST_PATH as they shouldn’t be needed after final PATH and HOST_PATH are set. --- pkgs/stdenv/generic/setup.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 8dff35578071..6f1a654a38ac 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -182,10 +182,8 @@ addToSearchPathWithCustomDelimiter() { fi } -PATH_DELIMITER=':' - addToSearchPath() { - addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@" + addToSearchPathWithCustomDelimiter ":" "$@" } # Add $1/lib* into rpaths. @@ -508,7 +506,7 @@ activatePackage() { fi if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then - addToSearchPath HOST_PATH "$pkg/bin" + addToSearchPath _HOST_PATH "$pkg/bin" fi if [[ -f "$pkg/nix-support/setup-hook" ]]; then @@ -617,10 +615,15 @@ fi PATH="${_PATH-}${_PATH:+${PATH:+:}}$PATH" +HOST_PATH="${_HOST_PATH-}${_HOST_PATH:+${HOST_PATH:+:}}$HOST_PATH" if (( "${NIX_DEBUG:-0}" >= 1 )); then echo "final path: $PATH" + echo "final host path: $HOST_PATH" fi +unset _PATH +unset _HOST_PATH + # Make GNU Make produce nested output. export NIX_INDENT_MAKE=1 From 037f62bbadb96c3587054613a9f107e34f6011c9 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 2 Mar 2019 20:06:09 -0500 Subject: [PATCH 16/70] stdenv/darwin: put bash in extraBuildInputs patch-shebangs should pick these up as they are runtime dependencies. This avoids bootstrap-tools leaking into the outputs. --- pkgs/stdenv/darwin/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 3102b255c0a6..2fc9c8ceb04a 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -280,8 +280,8 @@ in rec { # enables patchShebangs above. Unfortunately, patchShebangs ignores our $SHELL setting # and instead goes by $PATH, which happens to contain bootstrapTools. So it goes and # patches our shebangs back to point at bootstrapTools. This makes sure bash comes first. - extraNativeBuildInputs = with pkgs; [ xz pkgs.bash ]; - extraBuildInputs = [ pkgs.darwin.CF ]; + extraNativeBuildInputs = with pkgs; [ xz ]; + extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ]; libcxx = pkgs.libcxx; extraPreHook = '' @@ -338,8 +338,8 @@ in rec { }; in with prevStage; stageFun 4 prevStage { shell = "${pkgs.bash}/bin/bash"; - extraNativeBuildInputs = with pkgs; [ xz pkgs.bash ]; - extraBuildInputs = [ pkgs.darwin.CF ]; + extraNativeBuildInputs = with pkgs; [ xz ]; + extraBuildInputs = [ pkgs.darwin.CF pkgs.bash ]; libcxx = pkgs.libcxx; extraPreHook = '' From eaadbdf1c3e4c2350bad0077593b6b90bfb1c0d3 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 2 Mar 2019 23:56:50 -0500 Subject: [PATCH 17/70] =?UTF-8?q?cmake:=20don=E2=80=99t=20use=20cf-private?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cf-private is not necessary here. cmake just needs the CoreFoundation framework to be used. swift-corefoundation seems to work fine in this case. /cc @lnl7 --- .../build-managers/cmake/application-services.patch | 12 ++++++------ .../tools/build-managers/cmake/default.nix | 3 +-- pkgs/top-level/all-packages.nix | 4 +--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/application-services.patch index 78077f9eaa52..2107dcdfbc66 100644 --- a/pkgs/development/tools/build-managers/cmake/application-services.patch +++ b/pkgs/development/tools/build-managers/cmake/application-services.patch @@ -2,16 +2,16 @@ diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8aff8f6..af1852d 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt -@@ -791,12 +791,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc" +@@ -791,12 +791,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc" endif() endif() --# On Apple we need CoreFoundation and CoreServices --if(APPLE) -- target_link_libraries(CMakeLib "-framework CoreFoundation") + # On Apple we need CoreFoundation and CoreServices + if(APPLE) + target_link_libraries(CMakeLib "-framework CoreFoundation") - target_link_libraries(CMakeLib "-framework CoreServices") --endif() -- + endif() + if(WIN32 AND NOT UNIX) # We need the rpcrt4 library on Windows. # We need the crypt32 library on Windows for crypto/cert APIs. diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index 54fe8e4af5a0..721015f0c7c4 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -2,7 +2,7 @@ , bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash , buildPackages # darwin attributes -, cf-private, ps +, ps , isBootstrap ? false , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) , useNcurses ? false, ncurses @@ -52,7 +52,6 @@ stdenv.mkDerivation rec { buildInputs = [ setupHook pkgconfig ] - ++ optional stdenv.isDarwin cf-private # needed for CFBundleCopyExecutableURL ++ optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ] ++ optional useNcurses ncurses ++ optional useQt4 qt4 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6d544b451ffa..268345aa4106 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8758,9 +8758,7 @@ in cmake_2_8 = callPackage ../development/tools/build-managers/cmake/2.8.nix { }; - cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { - inherit (darwin) cf-private; - }; + cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { }; cmakeCurses = cmake.override { useNcurses = true; }; From 2b0b63c22986f0465fd5cee3772f18335f34c845 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 3 Mar 2019 13:31:24 -0500 Subject: [PATCH 18/70] stdenv/darwin: use libxml2-nopython for building llvm --- pkgs/stdenv/darwin/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 2fc9c8ceb04a..3c3917c827e2 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -318,7 +318,8 @@ in rec { llvmPackages_7 = super.llvmPackages_7 // (let tools = super.llvmPackages_7.tools.extend (llvmSelf: _: { - inherit (llvmPackages_7) llvm clang-unwrapped; + clang-unwrapped = llvmPackages_7.clang-unwrapped.override { llvm = llvmSelf.llvm; }; + llvm = llvmPackages_7.llvm.override { libxml2 = self.darwin.libxml2-nopython; }; }); libraries = super.llvmPackages_7.libraries.extend (llvmSelf: _: { inherit (llvmPackages_7) libcxx libcxxabi compiler-rt; From 8cabf4d5c56ef23eb79429e087dc702f049e9bfe Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 3 Mar 2019 19:55:51 -0500 Subject: [PATCH 19/70] treewide: rename llvm-dsymutil to dsymutil This is a change introduced between llvm 5 and llvm 7. --- pkgs/development/compilers/go/1.10.nix | 5 ----- pkgs/development/compilers/go/1.11.nix | 5 ----- pkgs/development/tools/analysis/valgrind/default.nix | 8 +------- pkgs/os-specific/darwin/binutils/default.nix | 2 +- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/pkgs/development/compilers/go/1.10.nix b/pkgs/development/compilers/go/1.10.nix index 5dce1529a8b8..5d571e03bd4d 100644 --- a/pkgs/development/compilers/go/1.10.nix +++ b/pkgs/development/compilers/go/1.10.nix @@ -131,11 +131,6 @@ stdenv.mkDerivation rec { }) ]; - postPatch = optionalString stdenv.isDarwin '' - echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil" - substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil - ''; - GOOS = if stdenv.isDarwin then "darwin" else "linux"; GOARCH = if stdenv.isDarwin then "amd64" else if stdenv.hostPlatform.system == "i686-linux" then "386" diff --git a/pkgs/development/compilers/go/1.11.nix b/pkgs/development/compilers/go/1.11.nix index 1e3a63983f4a..ec22e4531404 100644 --- a/pkgs/development/compilers/go/1.11.nix +++ b/pkgs/development/compilers/go/1.11.nix @@ -136,11 +136,6 @@ stdenv.mkDerivation rec { ./skip-test-extra-files-on-386.patch ]; - postPatch = optionalString stdenv.isDarwin '' - echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil" - substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil - ''; - GOOS = stdenv.targetPlatform.parsed.kernel.name; GOARCH = goarch stdenv.targetPlatform; # GOHOSTOS/GOHOSTARCH must match the building system, not the host system. diff --git a/pkgs/development/tools/analysis/valgrind/default.nix b/pkgs/development/tools/analysis/valgrind/default.nix index 78f40913eb5f..9942123a5120 100644 --- a/pkgs/development/tools/analysis/valgrind/default.nix +++ b/pkgs/development/tools/analysis/valgrind/default.nix @@ -44,14 +44,8 @@ stdenv.mkDerivation rec { substituteInPlace coregrind/Makefile.in \ --replace /usr/include/mach ${xnu}/include/mach - echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil" - find -name "Makefile.in" | while read file; do - substituteInPlace "$file" \ - --replace dsymutil ${llvm}/bin/llvm-dsymutil - done - substituteInPlace coregrind/m_debuginfo/readmacho.c \ - --replace /usr/bin/dsymutil ${llvm}/bin/llvm-dsymutil + --replace /usr/bin/dsymutil ${stdenv.cc.bintools.bintools}/bin/dsymutil echo "substitute hardcoded /usr/bin/ld with ${cctools}/bin/ld" substituteInPlace coregrind/link_tool_exe_darwin.in \ diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix index 3b5e8f1207a2..9f9a0c747247 100644 --- a/pkgs/os-specific/darwin/binutils/default.nix +++ b/pkgs/os-specific/darwin/binutils/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation { ln -sf "${cctools}/bin/$i" "$out/bin/$i" done - ln -s ${llvm}/bin/llvm-dsymutil $out/bin/dsymutil + ln -s ${llvm}/bin/dsymutil $out/bin/dsymutil ln -s ${binutils-unwrapped.out}/share $out/share From 5428db7c7c24c9f3cf0612edc4a3d1d9366fcace Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 4 Mar 2019 21:11:38 -0500 Subject: [PATCH 20/70] guile: apply patch for macOS 10.12+ --- pkgs/development/interpreters/guile/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/guile/default.nix b/pkgs/development/interpreters/guile/default.nix index 5e458c6e2ccc..fb8e75e8793a 100644 --- a/pkgs/development/interpreters/guile/default.nix +++ b/pkgs/development/interpreters/guile/default.nix @@ -2,6 +2,7 @@ , fetchurl, makeWrapper, gawk, pkgconfig , libffi, libtool, readline, gmp, boehmgc, libunistring , coverageAnalysis ? null +, fetchpatch }: # Do either a coverage analysis build or a standard build. @@ -42,8 +43,11 @@ patches = [ ./eai_system.patch ./riscv.patch - ] ++ - (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch); + ] ++ stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch + ++ stdenv.lib.optional stdenv.isDarwin (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; + sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207"; + }); # Explicitly link against libgcc_s, to work around the infamous # "libgcc_s.so.1 must be installed for pthread_cancel to work". From dc483505d4ff21976173c96dba1429dee7121ff0 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 5 Mar 2019 13:22:05 -0500 Subject: [PATCH 21/70] =?UTF-8?q?cf-private:=20don=E2=80=99t=20use=20priva?= =?UTF-8?q?te=20sdk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no private sdk is available for 10.12. --- .../os-specific/darwin/cf-private/default.nix | 5 +--- .../darwin/osx-private-sdk/default.nix | 27 ------------------- pkgs/top-level/darwin-packages.nix | 4 +-- pkgs/top-level/release.nix | 1 - 4 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 pkgs/os-specific/darwin/osx-private-sdk/default.nix diff --git a/pkgs/os-specific/darwin/cf-private/default.nix b/pkgs/os-specific/darwin/cf-private/default.nix index dc1b0112a219..eb5f651a1a08 100644 --- a/pkgs/os-specific/darwin/cf-private/default.nix +++ b/pkgs/os-specific/darwin/cf-private/default.nix @@ -1,4 +1,4 @@ -{ CF, apple_sdk, osx_private_sdk }: +{ CF, apple_sdk }: # cf-private is a bit weird, but boils down to CF with a weird setup-hook that # makes a build link against the system CoreFoundation rather than our pure one. @@ -38,10 +38,7 @@ CF.overrideAttrs (orig: { # this is watchman, who can almost certainly switch to the pure CF once the header # and functionality is merged in. installPhase = orig.installPhase + '' - # Copy or overwrite private headers, some of these might already - # exist in CF but the private versions have more information. basepath="Library/Frameworks/CoreFoundation.framework/Headers" - cp -Lfv --no-preserve mode ${osx_private_sdk}/include/CoreFoundationPrivateHeaders/* "$out/$basepath" # Append the include at top level or nobody will notice the header we're about to add sed -i '/CFNotificationCenter.h/a #include ' \ diff --git a/pkgs/os-specific/darwin/osx-private-sdk/default.nix b/pkgs/os-specific/darwin/osx-private-sdk/default.nix deleted file mode 100644 index 115512a6febd..000000000000 --- a/pkgs/os-specific/darwin/osx-private-sdk/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -stdenv.mkDerivation { - name = "OSXPrivateSDK"; - - src = fetchFromGitHub { - owner = "samdmarshall"; - repo = "OSXPrivateSDK"; - rev = "f4d52b60e86b496abfaffa119a7d299562d99783"; - sha256 = "0bv0884yxpvk2ishxj8gdy1w6wb0gwfq55q5qjp0s8z0z7f63zqh"; - }; - - # NOTE: we install only headers that are really needed to keep closure size - # reasonable. - installPhase = '' - mkdir -p $out/include - sdk10=PrivateSDK10.10.sparse.sdk - sdk=PrivateSDK10.9.sparse.sdk - cp $sdk/usr/local/include/sandbox_private.h $out/include/sandbox_private.h - # this can be removed once we dtrace binary - cp $sdk/usr/local/include/security_utilities/utilities_dtrace.h $out/include/utilities_dtrace.h - cp -RL $sdk/usr/include/xpc $out/include/xpc - cp -RL $sdk/usr/local/include/bsm $out/include/bsm - cp -RL $sdk/System/Library/Frameworks/Security.framework/Versions/A/PrivateHeaders $out/include/SecurityPrivateHeaders - cp -RL $sdk10/System/Library/Frameworks/CoreFoundation.framework/Headers $out/include/CoreFoundationPrivateHeaders - ''; -} diff --git a/pkgs/top-level/darwin-packages.nix b/pkgs/top-level/darwin-packages.nix index 2a82af19fa2b..1753ac9dc7a6 100644 --- a/pkgs/top-level/darwin-packages.nix +++ b/pkgs/top-level/darwin-packages.nix @@ -33,7 +33,7 @@ in }; cf-private = callPackage ../os-specific/darwin/cf-private { - inherit (darwin) CF apple_sdk osx_private_sdk; + inherit (darwin) CF apple_sdk; }; DarwinTools = callPackage ../os-specific/darwin/DarwinTools { }; @@ -59,8 +59,6 @@ in opencflite = callPackage ../os-specific/darwin/opencflite { }; - osx_private_sdk = callPackage ../os-specific/darwin/osx-private-sdk { }; - stubs = callPackages ../os-specific/darwin/stubs { }; trash = darwin.callPackage ../os-specific/darwin/trash { }; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 6c2159f9befd..d18c1dbd2e7f 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -193,7 +193,6 @@ let darwin = packagePlatforms pkgs.darwin // { cf-private = {}; - osx_private_sdk = {}; xcode = {}; }; } )); From 8e64f4665a13f4bcbad40b9455b3d32a8c51be4a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 5 Mar 2019 19:22:19 -0500 Subject: [PATCH 22/70] opensp: fix on darwin/10.12 --- pkgs/tools/text/sgml/opensp/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/text/sgml/opensp/default.nix b/pkgs/tools/text/sgml/opensp/default.nix index 27fa7bb91a8f..8d659713d954 100644 --- a/pkgs/tools/text/sgml/opensp/default.nix +++ b/pkgs/tools/text/sgml/opensp/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchurl, xmlto, docbook_xml_dtd_412, libxslt, docbook_xsl, autoconf, automake, gettext, libiconv, libtool}: +{ lib, stdenv, fetchurl, fetchpatch, xmlto, docbook_xml_dtd_412 +, libxslt, docbook_xsl, autoconf, automake, gettext, libiconv, libtool}: stdenv.mkDerivation { name = "opensp-1.5.2"; @@ -8,16 +9,18 @@ stdenv.mkDerivation { sha256 = "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"; }; - patchPhase = '' + postPatch = '' sed -i s,/usr/share/sgml/docbook/xml-dtd-4.1.2/,${docbook_xml_dtd_412}/xml/dtd/docbook/, \ docsrc/*.xml ''; - configureFlags = lib.optional stdenv.isDarwin [ - "--with-libintl-prefix=/usr" - "--with-libiconv-prefix=/usr" + patches = [ + (fetchpatch { + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/app-text/opensp/files/opensp-1.5.2-c11-using.patch?id=688d9675782dfc162d4e6cff04c668f7516118d0"; + sha256 = "04q14s8qsad0bkjmj067dn831i0r6v7742rafdlnbfm5y249m2q6"; + }) ]; - + setupHook = ./setup-hook.sh; postFixup = '' @@ -29,8 +32,9 @@ stdenv.mkDerivation { preConfigure = if stdenv.isCygwin then "autoreconf -fi" else null; # need autoconf, automake, gettext, and libtool for reconfigure - buildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake gettext libiconv libtool ] - ++ [ xmlto docbook_xml_dtd_412 libxslt docbook_xsl ]; + nativeBuildInputs = stdenv.lib.optionals stdenv.isCygwin [ autoconf automake libtool ]; + + buildInputs = [ xmlto docbook_xml_dtd_412 libxslt docbook_xsl gettext libiconv ]; doCheck = false; # fails From 27498cd2d1fca5bf34c2da0785482d04f53d1efb Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 6 Mar 2019 10:45:57 -0500 Subject: [PATCH 23/70] gnutar: disable CFLocaleCopyPreferredLanguages These pull in the system CoreFoundation framework for some reason. In the future, we should figure out a way for it to get these features from the pure CoreFoundation (they do have the symbol). But right now this is an issue with sandboxing in gnutar. Fixes #56591. --- pkgs/tools/archivers/gnutar/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index b64696a34202..c2e7f75fc7fc 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { configureFlags = stdenv.lib.optionals stdenv.isDarwin [ "gt_cv_func_CFPreferencesCopyAppValue=no" "gt_cv_func_CFLocaleCopyCurrent=no" + "gt_cv_func_CFLocaleCopyPreferredLanguages=no" ]; # gnutar tries to call into gettext between `fork` and `exec`, From 565f28fba718827251411f4b7868d84f81fd5f2a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 5 Mar 2019 20:23:43 -0500 Subject: [PATCH 24/70] Libsystem: add os/availability.h --- .../Libsystem/default.nix | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix index a0edfbbb3b59..89fc01c36f58 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -29,6 +29,28 @@ appleDerivation rec { (cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o) + mkdir -p $out/include/os + cat < $out/include/os/availability.h + #ifndef __OS_AVAILABILITY__ + #define __OS_AVAILABILITY__ + #include + + #if defined(__has_feature) && defined(__has_attribute) && __has_attribute(availability) + #define API_AVAILABLE(...) __API_AVAILABLE_GET_MACRO(__VA_ARGS__, __API_AVAILABLE4, __API_AVAILABLE3, __API_AVAILABLE2, __API_AVAILABLE1)(__VA_ARGS__) + #define API_DEPRECATED(...) __API_DEPRECATED_MSG_GET_MACRO(__VA_ARGS__, __API_DEPRECATED_MSG5, __API_DEPRECATED_MSG4, __API_DEPRECATED_MSG3, __API_DEPRECATED_MSG2, __API_DEPRECATED_MSG1)(__VA_ARGS__) + #define API_DEPRECATED_WITH_REPLACEMENT(...) __API_DEPRECATED_REP_GET_MACRO(__VA_ARGS__, __API_DEPRECATED_REP5, __API_DEPRECATED_REP4, __API_DEPRECATED_REP3, __API_DEPRECATED_REP2, __API_DEPRECATED_REP1)(__VA_ARGS__) + #define API_UNAVAILABLE(...) __API_UNAVAILABLE_GET_MACRO(__VA_ARGS__, __API_UNAVAILABLE3, __API_UNAVAILABLE2, __API_UNAVAILABLE1)(__VA_ARGS__) + #else + + #define API_AVAILABLE(...) + #define API_DEPRECATED(...) + #define API_DEPRECATED_WITH_REPLACEMENT(...) + #define API_UNAVAILABLE(...) + + #endif + #endif + EOF + cat < $out/include/TargetConditionals.h #ifndef __TARGETCONDITIONALS__ #define __TARGETCONDITIONALS__ From 4903e825fad1cd62b9391117723f60ccd8ad4859 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 9 Mar 2019 20:13:00 -0500 Subject: [PATCH 25/70] apple-sdk: update frameworks location Some have been removed like: - DrawSprocket - DVComponentGlue --- pkgs/os-specific/darwin/apple-sdk/default.nix | 16 ++-------------- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 7 +++---- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/default.nix b/pkgs/os-specific/darwin/apple-sdk/default.nix index 71574998885f..7c3e3e639679 100644 --- a/pkgs/os-specific/darwin/apple-sdk/default.nix +++ b/pkgs/os-specific/darwin/apple-sdk/default.nix @@ -40,12 +40,6 @@ let pushd lib ln -s -L /usr/lib/libcups*.dylib . popd - - cd Library/Frameworks/QuartzCore.framework/Versions/A/Headers - for file in CI*.h; do - rm $file - ln -s ../Frameworks/CoreImage.framework/Headers/$file - done ''; meta = with stdenv.lib; { @@ -80,13 +74,12 @@ let # Keep track of if this is a child or a child rescue as with # ApplicationServices in the 10.9 SDK - local isChild + local isChild=0 if [ -d "${sdk.out}/Library/Frameworks/$path/Versions/$current/Headers" ]; then isChild=1 cp -R "${sdk.out}/Library/Frameworks/$path/Versions/$current/Headers" . - else - isChild=0 + elif [ -d "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" ]; then current="$(readlink "/System/Library/Frameworks/$name.framework/Versions/Current")" cp -R "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current/Headers" . fi @@ -103,11 +96,6 @@ let pushd "${sdk.out}/Library/Frameworks/$name.framework/Versions/$current" >/dev/null fi local children=$(echo Frameworks/*.framework) - if [ "$name" == "ApplicationServices" ]; then - # Fixing up ApplicationServices which is missing - # CoreGraphics in the 10.9 SDK - children="$children Frameworks/CoreGraphics.framework" - fi popd >/dev/null for child in $children; do diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index aab2852c1689..603c7b32c55d 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -29,6 +29,7 @@ with frameworks; with libs; { CoreAudioKit = [ AudioUnit ]; CoreData = []; CoreGraphics = [ Accelerate CF IOKit IOSurface SystemConfiguration ]; + CoreImage = [ ]; CoreLocation = []; CoreMIDI = [ CF ]; CoreMIDIServer = []; @@ -37,13 +38,11 @@ with frameworks; with libs; { CoreText = [ CF CoreGraphics ]; CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ]; CoreWLAN = [ SecurityFoundation ]; - DVComponentGlue = [ CoreServices QuickTime ]; DVDPlayback = []; DirectoryService = [ CF ]; DiscRecording = [ CF CoreServices IOKit ]; DiscRecordingUI = []; DiskArbitration = [ CF IOKit ]; - DrawSprocket = [ Carbon ]; EventKit = []; ExceptionHandling = []; FWAUserLib = []; @@ -84,7 +83,6 @@ with frameworks; with libs; { PubSub = []; QTKit = [ CoreMediaIO CoreMedia MediaToolbox QuickTime VideoToolbox ]; QuickLook = [ ApplicationServices CF ]; - QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ]; SceneKit = []; ScreenSaver = []; Scripting = []; @@ -114,7 +112,8 @@ with frameworks; with libs; { JavaVM = []; OpenDirectory = []; Quartz = [ QuickLook QTKit ]; - QuartzCore = [ ApplicationServices CF CoreVideo OpenCL ]; + QuartzCore = [ ApplicationServices CF CoreVideo OpenCL CoreImage ]; + QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ]; vmnet = []; } From fffc777be40fa609305748321b851de1508df784 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 9 Mar 2019 20:14:13 -0500 Subject: [PATCH 26/70] =?UTF-8?q?cffi:=20don=E2=80=99t=20run=20tests=20on?= =?UTF-8?q?=20darwin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit they fail with llvm 7 for some reason --- pkgs/development/python-modules/cffi/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index 7eca740953f8..64162e7371bd 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -31,7 +31,7 @@ if isPyPy then null else buildPythonPackage rec { # The tests use -Werror but with python3.6 clang detects some unreachable code. NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ]; - doCheck = !stdenv.hostPlatform.isMusl; # TODO: Investigate + doCheck = !stdenv.hostPlatform.isMusl && !stdenv.isDarwin; # TODO: Investigate checkPhase = '' py.test -k "not test_char_pointer_conversion" ''; From e3a9b1ea231637147a1a3823e684c746df9ec2e1 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 10 Mar 2019 12:44:50 -0400 Subject: [PATCH 27/70] apple-sdk: Foundation needs cf-private --- 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 603c7b32c55d..0de28a50c623 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -47,7 +47,7 @@ with frameworks; with libs; { ExceptionHandling = []; FWAUserLib = []; ForceFeedback = [ CF IOKit ]; - Foundation = [ CF libobjc Security ApplicationServices SystemConfiguration ]; + Foundation = [ cf-private libobjc Security ApplicationServices SystemConfiguration ]; GLKit = [ CF ]; GLUT = [ OpenGL ]; GSS = []; From 0e9da4c958378811f1ea4df4903f4315c83dbf53 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 10 Mar 2019 13:14:14 -0400 Subject: [PATCH 28/70] libproxy: add libc++ patch --- pkgs/development/libraries/libproxy/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libproxy/default.nix b/pkgs/development/libraries/libproxy/default.nix index 0e0499251eb9..3b050c3dc6a0 100644 --- a/pkgs/development/libraries/libproxy/default.nix +++ b/pkgs/development/libraries/libproxy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib +{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, fetchpatch , dbus, networkmanager, spidermonkey_38, pcre, python2, python3 , SystemConfiguration, CoreFoundation, JavaScriptCore }: @@ -30,6 +30,12 @@ stdenv.mkDerivation rec { ) ''; + patches = stdenv.lib.optional stdenv.isDarwin + (fetchpatch { + url = "https://github.com/libproxy/libproxy/commit/44158f03f8522116758d335688ed840dfcb50ac8.patch"; + sha256 = "0axfvb6j7gcys6fkwi9dkn006imhvm3kqr83gpwban8419n0q5v1"; + }); + doCheck = false; # fails 1 out of 10 tests meta = with stdenv.lib; { From 85cc94c40e3dee7cb17c452fa4e04d09fc20983a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 10 Mar 2019 18:04:37 -0400 Subject: [PATCH 29/70] guile_2_0: add patches for macos 10.12 --- pkgs/development/interpreters/guile/2.0.nix | 9 +++++- .../guile/filter-mkostemp-darwin.patch | 28 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/interpreters/guile/filter-mkostemp-darwin.patch diff --git a/pkgs/development/interpreters/guile/2.0.nix b/pkgs/development/interpreters/guile/2.0.nix index 17ca1d1dcd95..24266d596765 100644 --- a/pkgs/development/interpreters/guile/2.0.nix +++ b/pkgs/development/interpreters/guile/2.0.nix @@ -46,7 +46,14 @@ }) ./riscv.patch ] ++ - (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch); + (stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch) + ++ stdenv.lib.optionals stdenv.isDarwin [ + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gtk-osx/raw/52898977f165777ad9ef169f7d4818f2d4c9b731/patches/guile-clocktime.patch"; + sha256 = "12wvwdna9j8795x59ldryv9d84c1j3qdk2iskw09306idfsis207"; + }) + ./filter-mkostemp-darwin.patch + ]; # Explicitly link against libgcc_s, to work around the infamous # "libgcc_s.so.1 must be installed for pthread_cancel to work". diff --git a/pkgs/development/interpreters/guile/filter-mkostemp-darwin.patch b/pkgs/development/interpreters/guile/filter-mkostemp-darwin.patch new file mode 100644 index 000000000000..8b9b853fb00d --- /dev/null +++ b/pkgs/development/interpreters/guile/filter-mkostemp-darwin.patch @@ -0,0 +1,28 @@ +Filter incompat. mkostemp(3) flags on macOS 10.12 + +macOS Sierra introduces a mkostemp(3) function which is used when +present. Contrary to the GNUlib version of mkostemp(3) that was used +previously, this version fails with 'invalid argument' when flags other +than from a specified set are passed. From mktemp(3): + +| The mkostemp() function is like mkstemp() but allows specifying +| additional open(2) flags (defined in ). The permitted flags +| are O_APPEND, O_SHLOCK, O_EXLOCK and O_CLOEXEC. + +Signed-off-by: Clemens Lang +Upstream-Status: Submitted [https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24862#23] +--- a/libguile/filesys.c.orig 2017-01-09 00:53:27.000000000 +0100 ++++ b/libguile/filesys.c 2017-01-09 00:54:48.000000000 +0100 +@@ -1486,6 +1486,12 @@ + mode_bits = scm_i_mode_bits (mode); + } + ++#ifdef __APPLE__ ++ /* macOS starting with 10.12 defines mkostemp(2) which is used if defined, ++ * but only accepts some flags according to its manpage. It fails with ++ * invalid argument when other flags are passed. */ ++ open_flags &= O_APPEND | O_SHLOCK | O_EXLOCK | O_CLOEXEC; ++#endif + SCM_SYSCALL (rv = mkostemp (c_tmpl, open_flags)); + if (rv == -1) + SCM_SYSERROR; From 9da646ed29170f76e6c150a338445da00730993a Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 11 Mar 2019 19:53:28 -0400 Subject: [PATCH 30/70] darwin.xnu: install os/log.h file in Libsystem --- pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index aaa3a1ebe327..75e81656dcc2 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -114,6 +114,8 @@ appleDerivation ({ # Get rid of some junk lying around rm -rf $out/internal_hdr $out/usr $out/local + mv $out/include/libkern/os/log.h $out/include/os/log.h + # Add some symlinks ln -s $out/Library/Frameworks/System.framework/Versions/B \ $out/Library/Frameworks/System.framework/Versions/Current From 4faa8d0238777055ec49e002c3f0300f4d014c38 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 11 Mar 2019 20:08:14 -0400 Subject: [PATCH 31/70] cctools: add patch for apfs --- pkgs/os-specific/darwin/cctools/apfs.patch | 22 ++++++++++++++++++++++ pkgs/os-specific/darwin/cctools/port.nix | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 pkgs/os-specific/darwin/cctools/apfs.patch diff --git a/pkgs/os-specific/darwin/cctools/apfs.patch b/pkgs/os-specific/darwin/cctools/apfs.patch new file mode 100644 index 000000000000..8c6b3c0d2738 --- /dev/null +++ b/pkgs/os-specific/darwin/cctools/apfs.patch @@ -0,0 +1,22 @@ +diff --git a/cctools/ld64/src/ld/OutputFile.cpp b/cctools/ld64/src/ld/OutputFile.cpp +index 8859882..158c7d2 100644 +--- a/cctools/ld64/src/ld/OutputFile.cpp ++++ b/cctools/ld64/src/ld/OutputFile.cpp +@@ -2786,7 +2786,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) + #ifdef __APPLE__ // ld64-port + struct statfs fsInfo; + if ( statfs(_options.outputFilePath(), &fsInfo) != -1 ) { +- if ( strcmp(fsInfo.f_fstypename, "hfs") == 0) { ++ if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { + (void)unlink(_options.outputFilePath()); + outputIsMappableFile = true; + } +@@ -2814,7 +2814,7 @@ void OutputFile::writeOutputFile(ld::Internal& state) + #ifdef __APPLE__ // ld64-port + struct statfs fsInfo; + if ( statfs(dirPath, &fsInfo) != -1 ) { +- if ( strcmp(fsInfo.f_fstypename, "hfs") == 0) { ++ if ( (strcmp(fsInfo.f_fstypename, "hfs") == 0) || (strcmp(fsInfo.f_fstypename, "apfs") == 0) ) { + outputIsMappableFile = true; + } + } diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index fcab00163a63..43a9495c3ab8 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -35,7 +35,7 @@ let ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; - patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ]; + patches = [ ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch ./apfs.patch ]; __propagatedImpureHostDeps = [ # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them From 9d2326c622ec57e7f8da7f7d5a9ec6286a4583fe Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 12 Mar 2019 19:13:21 -0400 Subject: [PATCH 32/70] Libsystem: get os/{log,trace,activity}.h from darling This is the only place I can find the headers. --- .../darwin/apple-source-releases/Libsystem/default.nix | 7 ++++++- .../darwin/apple-source-releases/xnu/default.nix | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix index 89fc01c36f58..7b19194be96e 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix @@ -1,7 +1,7 @@ { stdenv, appleDerivation, cpio, xnu, Libc, Libm, libdispatch, cctools, Libinfo , dyld, Csu, architecture, libclosure, CarbonHeaders, ncurses, CommonCrypto , copyfile, removefile, libresolv, Libnotify, libplatform, libpthread -, mDNSResponder, launchd, libutil, hfs }: +, mDNSResponder, launchd, libutil, hfs, darling }: appleDerivation rec { dontBuild = true; @@ -30,6 +30,11 @@ appleDerivation rec { (cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o) mkdir -p $out/include/os + + cp ${darling.src}/src/libc/os/activity.h $out/include/os + cp ${darling.src}/src/libc/os/log.h $out/include/os + cp ${darling.src}/src/duct/include/os/trace.h $out/include/os + cat < $out/include/os/availability.h #ifndef __OS_AVAILABILITY__ #define __OS_AVAILABILITY__ diff --git a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix index 75e81656dcc2..aaa3a1ebe327 100644 --- a/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix +++ b/pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix @@ -114,8 +114,6 @@ appleDerivation ({ # Get rid of some junk lying around rm -rf $out/internal_hdr $out/usr $out/local - mv $out/include/libkern/os/log.h $out/include/os/log.h - # Add some symlinks ln -s $out/Library/Frameworks/System.framework/Versions/B \ $out/Library/Frameworks/System.framework/Versions/Current From 43cda1b854f034ccb2a9dda64ed7279b25a44b21 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 14 Mar 2019 00:16:31 -0400 Subject: [PATCH 33/70] apple-sdk: add Metal framework for QuartzCore --- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index 0de28a50c623..2a8c2e89204e 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -73,6 +73,7 @@ with frameworks; with libs; { MapKit = []; MediaAccessibility = [ CF CoreGraphics CoreText QuartzCore ]; MediaToolbox = [ AudioToolbox CF CoreMedia ]; + Metal = []; NetFS = [ CF ]; OSAKit = [ Carbon ]; OpenAL = []; @@ -112,7 +113,7 @@ with frameworks; with libs; { JavaVM = []; OpenDirectory = []; Quartz = [ QuickLook QTKit ]; - QuartzCore = [ ApplicationServices CF CoreVideo OpenCL CoreImage ]; + QuartzCore = [ ApplicationServices CF CoreVideo OpenCL CoreImage Metal ]; QuickTime = [ ApplicationServices AudioUnit Carbon CoreAudio CoreServices OpenGL QuartzCore ]; vmnet = []; From a2e8e6ffc90066a447db50a04599bcabd7f9485b Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 18 Mar 2019 22:56:16 -0400 Subject: [PATCH 34/70] boost167: patch for macOS 10.12 --- pkgs/development/libraries/boost/1.67.nix | 32 +++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/boost/1.67.nix b/pkgs/development/libraries/boost/1.67.nix index 938892ef3554..406e63b9622b 100644 --- a/pkgs/development/libraries/boost/1.67.nix +++ b/pkgs/development/libraries/boost/1.67.nix @@ -3,11 +3,33 @@ callPackage ./generic.nix (args // rec { version = "1.67.0"; - patches = [ (fetchpatch { - url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch"; - sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h"; - stripLen = 1; - })]; + patches = [ + (fetchpatch { + url = "https://github.com/boostorg/lockfree/commit/12726cda009a855073b9bedbdce57b6ce7763da2.patch"; + sha256 = "0x65nkwzv8fdacj8sw5njl3v63jj19dirrpklbwy6qpsncw7fc7h"; + stripLen = 1; + }) + ] ++ stdenv.lib.optionals stdenv.cc.isClang [ + # Fixes https://github.com/boostorg/atomic/issues/15 + (fetchpatch { + url = https://github.com/boostorg/atomic/commit/6e14ca24dab50ad4c1fa8c27c7dd6f1cb791b534.patch; + sha256 = "102g35ygvv8cxagp9651284xk4vybk93q2fm577y4mdxf5k46b7a"; + stripLen = 1; + }) + + # Needed for the next patch + (fetchpatch { + url = https://github.com/boostorg/asio/commit/38cb19719748ad56b14d73ca1fff5828f36e5894.patch; + sha256 = "0cj9cxz9rfbsx8p8f5alxx00dq3r7g0vh23j68bbxbs9gq1arq2n"; + stripLen = 1; + }) + # Fixes https://github.com/boostorg/asio/pull/91 + (fetchpatch { + url = https://github.com/boostorg/asio/commit/43874d5497414c67655d901e48c939ef01337edb.patch; + sha256 = "1c2ds164s2ygvpb4785p4ncv8ywbpm08cphirb99xp4mqvb693is"; + stripLen = 1; + }) + ]; src = fetchurl { url = "mirror://sourceforge/boost/boost_1_67_0.tar.bz2"; From 2a59d24387b7545d1a5d3b97b884da5a47b3f253 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 19 Mar 2019 00:12:42 -0400 Subject: [PATCH 35/70] pycrypto: remove pre-10.12 patch --- pkgs/development/python-modules/cryptography/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index dfbb14eb7e65..6931212851a1 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -53,14 +53,6 @@ buildPythonPackage rec { py.test --disable-pytest-warnings tests ''; - # The test assumes that if we're on Sierra or higher, that we use `getentropy`, but for binary - # compatibility with pre-Sierra for binary caches, we hide that symbol so the library doesn't - # use it. This boils down to them checking compatibility with `getentropy` in two different places, - # so let's neuter the second test. - postPatch = '' - substituteInPlace ./tests/hazmat/backends/test_openssl.py --replace '"16.0"' '"99.0"' - ''; - # IOKit's dependencies are inconsistent between OSX versions, so this is the best we # can do until nix 1.11's release __impureHostDeps = [ "/usr/lib" ]; From 32acda1b4d50152d9cb34bd0abda90e1caf1840f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 19 Mar 2019 00:21:03 -0400 Subject: [PATCH 36/70] libcdio: disable checks on darwin Broken on macos 10.12 stuff --- pkgs/development/libraries/libcdio/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libcdio/default.nix b/pkgs/development/libraries/libcdio/default.nix index 5c50d093243c..531ca4102afe 100644 --- a/pkgs/development/libraries/libcdio/default.nix +++ b/pkgs/development/libraries/libcdio/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ libcddb ncurses help2man ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Carbon IOKit ]; - doCheck = true; + doCheck = !stdenv.isDarwin; meta = with stdenv.lib; { description = "A library for OS-independent CD-ROM and CD image access"; From 1b5021771b5d0e7ca675f96fda2d3e5775c14230 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 19 Mar 2019 00:37:45 -0400 Subject: [PATCH 37/70] go1.12: remove dsymutil patch stdenv provides dsymutil for us. Already done for other compilers but not this one. --- pkgs/development/compilers/go/1.12.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/compilers/go/1.12.nix b/pkgs/development/compilers/go/1.12.nix index 44304006f6b4..496206b0f15b 100644 --- a/pkgs/development/compilers/go/1.12.nix +++ b/pkgs/development/compilers/go/1.12.nix @@ -141,9 +141,6 @@ stdenv.mkDerivation rec { postPatch = '' find . -name '*.orig' -exec rm {} ';' - '' + optionalString stdenv.isDarwin '' - echo "substitute hardcoded dsymutil with ${llvm}/bin/llvm-dsymutil" - substituteInPlace "src/cmd/link/internal/ld/lib.go" --replace dsymutil ${llvm}/bin/llvm-dsymutil ''; GOOS = stdenv.targetPlatform.parsed.kernel.name; From c08fe0f8b17b9315abea531fcebc586219c6dd0e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 19 Mar 2019 00:45:00 -0400 Subject: [PATCH 38/70] llvm8: remove compiler-rt gettime patch This was removed in llvm 7 but not for llvm 8. --- .../llvm/8/compiler-rt-clock_gettime.patch | 74 ------------------- .../compilers/llvm/8/compiler-rt.nix | 3 +- 2 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch diff --git a/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch b/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch deleted file mode 100644 index f9323ed95c05..000000000000 --- a/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch +++ /dev/null @@ -1,74 +0,0 @@ -commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d -Author: Tobias Mayer -Date: Wed Feb 13 12:44:17 2019 +0100 - - Provide clock_gettime for xray on macos < 10.12 - -diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc -index a46c151af..38aea6932 100644 ---- a/lib/xray/xray_basic_logging.cc -+++ b/lib/xray/xray_basic_logging.cc -@@ -36,6 +36,29 @@ - #include "xray_tsc.h" - #include "xray_utils.h" - -+#if __MACH__ -+#include -+#include -+enum clockid_t { -+ CLOCK_MONOTONIC = REALTIME_CLOCK, -+ CLOCK_REALTIME = REALTIME_CLOCK -+}; -+ -+int clock_gettime(clockid_t clock_id, struct timespec *ts) { -+ if (ts != NULL) { -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), clock_id, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ ts->tv_sec = mts.tv_sec; -+ ts->tv_nsec = mts.tv_nsec; -+ return 0; -+ } -+ return -1; -+} -+#endif -+ - namespace __xray { - - SpinMutex LogMutex; -diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc -index 4b308b27f..1d044c8fd 100644 ---- a/lib/xray/xray_fdr_logging.cc -+++ b/lib/xray/xray_fdr_logging.cc -@@ -38,6 +38,29 @@ - #include "xray_tsc.h" - #include "xray_utils.h" - -+#if __MACH__ -+#include -+#include -+enum clockid_t { -+ CLOCK_MONOTONIC = REALTIME_CLOCK, -+ CLOCK_REALTIME = REALTIME_CLOCK -+}; -+ -+int clock_gettime(clockid_t clock_id, struct timespec *ts) { -+ if (ts != NULL) { -+ clock_serv_t cclock; -+ mach_timespec_t mts; -+ host_get_clock_service(mach_host_self(), clock_id, &cclock); -+ clock_get_time(cclock, &mts); -+ mach_port_deallocate(mach_task_self(), cclock); -+ ts->tv_sec = mts.tv_sec; -+ ts->tv_nsec = mts.tv_nsec; -+ return 0; -+ } -+ return -1; -+} -+#endif -+ - namespace __xray { - - atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED}; diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix index 47c8b7bd59f5..97033d7c8745 100644 --- a/pkgs/development/compilers/llvm/8/compiler-rt.nix +++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix @@ -32,8 +32,7 @@ stdenv.mkDerivation rec { patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch - ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch - ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch; + ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra From ba957d538d955bd6c352f60528c9b0529e174b10 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 21 Apr 2019 15:40:07 -0400 Subject: [PATCH 39/70] emacs-mac: remove MAC_OS_X_VERSION_MAX_ALLOWED No longer needed --- pkgs/applications/editors/emacs/macport.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/emacs/macport.nix b/pkgs/applications/editors/emacs/macport.nix index 33c5da8642c4..7c21c1cae5e3 100644 --- a/pkgs/applications/editors/emacs/macport.nix +++ b/pkgs/applications/editors/emacs/macport.nix @@ -68,7 +68,7 @@ stdenv.mkDerivation rec { "--enable-mac-app=$$out/Applications" ]; - CFLAGS = "-O3 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10"; + CFLAGS = "-O3"; LDFLAGS = "-O3 -L${ncurses.out}/lib"; postInstall = '' From 31060e23bae658fbaa24aa4e4495dd6a4369618c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 21 Apr 2019 16:01:42 -0400 Subject: [PATCH 40/70] go: disable tests on darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unfortunately, i can’t get these to work: https://hydra.nixos.org/build/92530029/nixlog/1/tail Hopefully we can fix them at some point. /cc @cstrahan @orivej @mic92 --- pkgs/development/compilers/go/1.10.nix | 2 ++ pkgs/development/compilers/go/1.11.nix | 2 +- pkgs/development/compilers/go/1.12.nix | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/go/1.10.nix b/pkgs/development/compilers/go/1.10.nix index 5d571e03bd4d..22ba90e92d85 100644 --- a/pkgs/development/compilers/go/1.10.nix +++ b/pkgs/development/compilers/go/1.10.nix @@ -145,6 +145,8 @@ stdenv.mkDerivation rec { # Hopefully avoids test timeouts on Hydra GO_TEST_TIMEOUT_SCALE = 3; + doCheck = !stdenv.isDarwin; + # The go build actually checks for CC=*/clang and does something different, so we don't # just want the generic `cc` here. CC = if stdenv.isDarwin then "clang" else "cc"; diff --git a/pkgs/development/compilers/go/1.11.nix b/pkgs/development/compilers/go/1.11.nix index ec22e4531404..eec472fb88e6 100644 --- a/pkgs/development/compilers/go/1.11.nix +++ b/pkgs/development/compilers/go/1.11.nix @@ -183,7 +183,7 @@ stdenv.mkDerivation rec { (cd src && ./make.bash) ''; - doCheck = stdenv.hostPlatform == stdenv.targetPlatform; + doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin; checkPhase = '' runHook preCheck diff --git a/pkgs/development/compilers/go/1.12.nix b/pkgs/development/compilers/go/1.12.nix index 496206b0f15b..68f9d1d531f4 100644 --- a/pkgs/development/compilers/go/1.12.nix +++ b/pkgs/development/compilers/go/1.12.nix @@ -190,7 +190,7 @@ stdenv.mkDerivation rec { (cd src && ./make.bash) ''; - doCheck = stdenv.hostPlatform == stdenv.targetPlatform; + doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin; checkPhase = '' runHook preCheck From e95ec0da29c25af4af9fd1b4d463972d4f9d0cad Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 21 Apr 2019 16:04:34 -0400 Subject: [PATCH 41/70] libao: fix on 10.12 sdk --- pkgs/development/libraries/libao/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libao/default.nix b/pkgs/development/libraries/libao/default.nix index 826f72b1f5fb..da9bc2149f38 100644 --- a/pkgs/development/libraries/libao/default.nix +++ b/pkgs/development/libraries/libao/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig, libpulseaudio, alsaLib, libcap -, CoreAudio, CoreServices, AudioUnit +, CoreAudio, CoreServices, AudioUnit, AudioToolbox , usePulseAudio }: stdenv.mkDerivation rec { @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ ] ++ lib.optional usePulseAudio libpulseaudio ++ lib.optionals stdenv.isLinux [ alsaLib libcap ] ++ - lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit ]; + lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit AudioToolbox ]; nativeBuildInputs = [ autoreconfHook pkgconfig ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 268345aa4106..03e386619e55 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10845,7 +10845,7 @@ in libao = callPackage ../development/libraries/libao { usePulseAudio = config.pulseaudio or stdenv.isLinux; - inherit (darwin.apple_sdk.frameworks) CoreAudio CoreServices AudioUnit; + inherit (darwin.apple_sdk.frameworks) CoreAudio CoreServices AudioUnit AudioToolbox; }; libaosd = callPackage ../development/libraries/libaosd { }; From 3e4f14a50b3e475ec00fa121d8884d15edc69de8 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 21 Apr 2019 16:20:31 -0400 Subject: [PATCH 42/70] perl: disable test on TAPParserSourceHandlerpgTAP Seem to be broken with newest llvm --- pkgs/top-level/perl-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 098b2652bf63..a2b29e2dbd17 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -14483,6 +14483,7 @@ let url = "mirror://cpan/authors/id/D/DW/DWHEELER/${name}.tar.gz"; sha256 = "1655337l1cyd7q62007wrk87q2gbbwfq9xjy1wgx3hyflxpkkvl4"; }; + doCheck = !stdenv.isDarwin; meta = { description = "Stream TAP from pgTAP test scripts"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; From 66a3a7b30376a16e6b0863a4a587135c9c589094 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 21 Apr 2019 16:24:48 -0400 Subject: [PATCH 43/70] tk: propagate macos dependencies --- pkgs/development/libraries/tk/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/tk/generic.nix b/pkgs/development/libraries/tk/generic.nix index d5eaff77c117..bd2453aad9a1 100644 --- a/pkgs/development/libraries/tk/generic.nix +++ b/pkgs/development/libraries/tk/generic.nix @@ -27,8 +27,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkgconfig ]; - propagatedBuildInputs = [ tcl libXft ]; - buildInputs = lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [ + propagatedBuildInputs = [ tcl libXft ] + ++ lib.optional enableAqua (with darwin; with apple_sdk.frameworks; [ Cocoa cf-private ]); From 0695b7da24b20c3654e42be597740bcd50defd4b Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 01:11:35 -0400 Subject: [PATCH 44/70] =?UTF-8?q?ldc:=20don=E2=80=99t=20run=20checks=20on?= =?UTF-8?q?=20darwin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit failing currently: https://hydra.nixos.org/build/92532427 --- pkgs/development/compilers/ldc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ldc/default.nix b/pkgs/development/compilers/ldc/default.nix index 71473be580ea..043347889c84 100644 --- a/pkgs/development/compilers/ldc/default.nix +++ b/pkgs/development/compilers/ldc/default.nix @@ -150,7 +150,7 @@ stdenv.mkDerivation rec { else ""; - doCheck = !bootstrapVersion; + doCheck = !bootstrapVersion && !stdenv.isDarwin; checkPhase = stdenv.lib.optionalString doCheck '' # Build default lib test runners From ffeffb3851fa0e53e248ec93b977098826514bad Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 01:15:23 -0400 Subject: [PATCH 45/70] =?UTF-8?q?python-zope=5Ftestrunner:=20don=E2=80=99t?= =?UTF-8?q?=20run=20tests=20on=20darwin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit broken currently: https://hydra.nixos.org/build/92527992 --- pkgs/development/python-modules/zope_testrunner/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/zope_testrunner/default.nix b/pkgs/development/python-modules/zope_testrunner/default.nix index 25f167b2e94d..fd2cf470e6f0 100644 --- a/pkgs/development/python-modules/zope_testrunner/default.nix +++ b/pkgs/development/python-modules/zope_testrunner/default.nix @@ -19,6 +19,8 @@ buildPythonPackage rec { propagatedBuildInputs = [ zope_interface zope_exceptions zope_testing six ]; + doCheck = !stdenv.isDarwin; + meta = with stdenv.lib; { description = "A flexible test runner with layer support"; homepage = https://pypi.python.org/pypi/zope.testrunner; From c72c6a48ca2c3090ea94df4474695524b5e68f9c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 21:16:59 -0400 Subject: [PATCH 46/70] treewide: use llvm6 in some places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not everything works on llvm7. It’s easiest to just provide the llvm6 as backup in this case. --- pkgs/desktops/gnustep/default.nix | 6 ++-- pkgs/tools/package-management/nix/default.nix | 5 ++++ pkgs/top-level/all-packages.nix | 29 ++++++++++++++----- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/pkgs/desktops/gnustep/default.nix b/pkgs/desktops/gnustep/default.nix index ac324bc89a85..1fdf79ef9aed 100644 --- a/pkgs/desktops/gnustep/default.nix +++ b/pkgs/desktops/gnustep/default.nix @@ -1,4 +1,4 @@ -{ pkgs, newScope }: +{ pkgs, newScope, stdenv, llvmPackages_6 }: let callPackage = newScope self; @@ -10,7 +10,9 @@ let gorm = callPackage ./gorm {}; projectcenter = callPackage ./projectcenter {}; system_preferences = callPackage ./systempreferences {}; - libobjc = callPackage ./libobjc2 {}; + libobjc = callPackage ./libobjc2 { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + }; make = callPackage ./make {}; back = callPackage ./back {}; base = callPackage ./base { giflib = pkgs.giflib_4_1; }; diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 7590a37a8e36..ca1a38c4ab48 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -3,6 +3,7 @@ , stateDir ? "/nix/var" , confDir ? "/etc" , boehmgc +, llvmPackages_6 }: let @@ -174,6 +175,8 @@ in rec { }; inherit storeDir stateDir confDir boehmgc; + + stdenv = llvmPackages_6.stdenv; }; nixUnstable = lib.lowPrio (callPackage common rec { @@ -188,6 +191,8 @@ in rec { fromGit = true; inherit storeDir stateDir confDir boehmgc; + + stdenv = llvmPackages_6.stdenv; }); } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03e386619e55..3e253e838821 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3375,7 +3375,9 @@ in hdf4 = null; }; - haproxy = callPackage ../tools/networking/haproxy { }; + haproxy = callPackage ../tools/networking/haproxy { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + }; haveged = callPackage ../tools/security/haveged { }; @@ -6925,7 +6927,10 @@ in cryptol = haskell.lib.justStaticExecutables haskellPackages.cryptol; - inherit (callPackages ../development/compilers/crystal {}) + inherit (callPackages ../development/compilers/crystal { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + inherit (llvmPackages_6) clang llvm; + }) crystal_0_25 crystal_0_26 crystal; @@ -8100,7 +8105,9 @@ in lush2 = callPackage ../development/interpreters/lush {}; - maude = callPackage ../development/interpreters/maude { }; + maude = callPackage ../development/interpreters/maude { + stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv; + }; me_cleaner = pythonPackages.callPackage ../tools/misc/me_cleaner { }; @@ -8179,11 +8186,13 @@ in php = php72-unit; }); - php73Packages-unit = recurseIntoAttrs (callPackage ./php-packages.nix { + php73Packages-unit = recurseIntoAttrs (callPackage ./php-packages.nix { php = php73-unit; }); - inherit (callPackages ../development/interpreters/php { }) + inherit (callPackages ../development/interpreters/php { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + }) php71 php72 php73; @@ -9800,9 +9809,13 @@ in cln = callPackage ../development/libraries/cln { }; - clucene_core_2 = callPackage ../development/libraries/clucene-core/2.x.nix { }; + clucene_core_2 = callPackage ../development/libraries/clucene-core/2.x.nix { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + }; - clucene_core_1 = callPackage ../development/libraries/clucene-core { }; + clucene_core_1 = callPackage ../development/libraries/clucene-core { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + }; clucene_core = clucene_core_1; @@ -22543,11 +22556,13 @@ in root = callPackage ../applications/science/misc/root { inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL; + stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv; }; root5 = lowPrio (callPackage ../applications/science/misc/root/5.nix { inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Cocoa OpenGL; + stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv; }); rink = callPackage ../applications/science/misc/rink { }; From 3bab20c88dcc85de07ac2701c04d6bfd7bf90716 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 21:18:28 -0400 Subject: [PATCH 47/70] treewide: disable checks on darwin Not working in these cases: - dconf - paho-mqtt - perl-gtk2 - perl-TAPParserSourceHandlerpgTAP --- pkgs/desktops/gnome-3/core/dconf/default.nix | 2 +- pkgs/development/python-modules/paho-mqtt/default.nix | 4 +++- pkgs/top-level/perl-packages.nix | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/gnome-3/core/dconf/default.nix b/pkgs/desktops/gnome-3/core/dconf/default.nix index e20804d9e621..1a9516430d9a 100644 --- a/pkgs/desktops/gnome-3/core/dconf/default.nix +++ b/pkgs/desktops/gnome-3/core/dconf/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { "-Dgtk_doc=true" ]; - doCheck = !stdenv.isAarch64; + doCheck = !stdenv.isAarch64 && !stdenv.isDarwin; passthru = { updateScript = gnome3.updateScript { diff --git a/pkgs/development/python-modules/paho-mqtt/default.nix b/pkgs/development/python-modules/paho-mqtt/default.nix index d58b31ffc04b..bf7ebee56577 100644 --- a/pkgs/development/python-modules/paho-mqtt/default.nix +++ b/pkgs/development/python-modules/paho-mqtt/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, isPy3k -, pytestrunner, pytest, mock }: +, stdenv, pytestrunner, pytest, mock }: buildPythonPackage rec { pname = "paho-mqtt"; @@ -20,6 +20,8 @@ buildPythonPackage rec { checkInputs = [ pytestrunner pytest ] ++ lib.optional (!isPy3k) mock; + doCheck = !stdenv.isDarwin; + meta = with lib; { homepage = https://eclipse.org/paho; description = "MQTT version 3.1.1 client class"; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index a2b29e2dbd17..a0c46e0856a8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -6676,6 +6676,7 @@ let sha256 = "1044rj3wbfmgaif2jb0k28m2aczli6ai2n5yvn6pr7zjyw16kvd2"; }; buildInputs = [ pkgs.gtk2 Cairo ExtUtilsDepends ExtUtilsPkgConfig Glib Pango ]; + doCheck = !stdenv.isDarwin; meta = { homepage = http://gtk2-perl.sourceforge.net/; description = "Perl interface to the 2.x series of the Gimp Toolkit library"; @@ -14641,6 +14642,7 @@ let sha256 = "1msxg3j1hx5wsc7vr81x5gs9gdbn4y0x6cvyj3pq4dgi1603dbvi"; }; propagatedBuildInputs = [ AppConfig ]; + doCheck = !stdenv.isDarwin; meta = { description = "Comprehensive template processing system"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; From c1cb58e81efdeb18b075cd90c150f68557aa84f7 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 21:19:51 -0400 Subject: [PATCH 48/70] darwin/make-bootstrap-tools: fix build --- pkgs/stdenv/darwin/make-bootstrap-tools.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index 6a28439daf58..a9e494346eaa 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -80,9 +80,7 @@ in rec { cp -d ${libxml2.out}/lib/libxml2*.dylib $out/lib # Copy what we need of clang - cp -d ${llvmPackages.clang-unwrapped}/bin/clang $out/bin - cp -d ${llvmPackages.clang-unwrapped}/bin/clang++ $out/bin - cp -d ${llvmPackages.clang-unwrapped}/bin/clang-[0-9].[0-9] $out/bin + cp -d ${llvmPackages.clang-unwrapped}/bin/clang* $out/bin cp -rL ${llvmPackages.clang-unwrapped}/lib/clang $out/lib From d490dad864c7ff61eefc21a8c5bdf71aebf6627e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 21:20:49 -0400 Subject: [PATCH 49/70] treewide: use gcc when necessary Some build scripts depend on gcc being available. We use gccStdenv in this case. --- pkgs/top-level/all-packages.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e253e838821..a75b2ecc9ae2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5746,7 +5746,7 @@ in fusesmb = callPackage ../tools/filesystems/fusesmb { samba = samba3; }; - sl = callPackage ../tools/misc/sl { }; + sl = callPackage ../tools/misc/sl { stdenv = gccStdenv; }; socat = callPackage ../tools/networking/socat { }; @@ -7855,7 +7855,9 @@ in tinycc = callPackage ../development/compilers/tinycc { }; - tinyscheme = callPackage ../development/interpreters/tinyscheme { }; + tinyscheme = callPackage ../development/interpreters/tinyscheme { + stdenv = gccStdenv; + }; inherit (ocaml-ng.ocamlPackages_4_02) trv; @@ -19056,7 +19058,9 @@ in openbox = callPackage ../applications/window-managers/openbox { }; - openbox-menu = callPackage ../applications/misc/openbox-menu { }; + openbox-menu = callPackage ../applications/misc/openbox-menu { + stdenv = gccStdenv; + }; openbrf = libsForQt5.callPackage ../applications/misc/openbrf { }; @@ -23208,7 +23212,9 @@ in fsuae = callPackage ../misc/emulators/fs-uae { }; - putty = callPackage ../applications/networking/remote/putty { }; + putty = callPackage ../applications/networking/remote/putty { + gtk2 = gtk2-x11; + }; qMasterPassword = libsForQt5.callPackage ../applications/misc/qMasterPassword { }; From d1f988ca3c22baf0e637eb1f082a49cad2c4ea31 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 21:22:07 -0400 Subject: [PATCH 50/70] darwin: correct framework dependency AudioUnit depends on AudioToolbox now, so use that to keep compatibility. --- pkgs/development/libraries/libao/default.nix | 2 +- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/libao/default.nix b/pkgs/development/libraries/libao/default.nix index da9bc2149f38..c1cf3215c16c 100644 --- a/pkgs/development/libraries/libao/default.nix +++ b/pkgs/development/libraries/libao/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { buildInputs = [ ] ++ lib.optional usePulseAudio libpulseaudio ++ lib.optionals stdenv.isLinux [ alsaLib libcap ] ++ - lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit AudioToolbox ]; + lib.optionals stdenv.isDarwin [ CoreAudio CoreServices AudioUnit ]; nativeBuildInputs = [ autoreconfHook pkgconfig ]; diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index 2a8c2e89204e..e55abf9dfb65 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -10,12 +10,12 @@ with frameworks; with libs; { AVKit = []; Accounts = []; AddressBook = [ Carbon CF ]; - AppKit = [ AudioToolbox Foundation QuartzCore ]; + AppKit = [ AudioToolbox AudioUnit Foundation QuartzCore ]; AppKitScripting = []; AppleScriptKit = []; AppleScriptObjC = []; - AudioToolbox = [ AudioUnit CoreAudio CF CoreMIDI ]; - AudioUnit = [ Carbon CoreAudio CF ]; + AudioToolbox = [ CoreAudio CF CoreMIDI ]; + AudioUnit = [ AudioToolbox Carbon CoreAudio CF ]; AudioVideoBridging = [ Foundation ]; Automator = []; CFNetwork = [ CF ]; @@ -33,7 +33,7 @@ with frameworks; with libs; { CoreLocation = []; CoreMIDI = [ CF ]; CoreMIDIServer = []; - CoreMedia = [ ApplicationServices AudioToolbox CoreAudio CF CoreGraphics CoreVideo ]; + CoreMedia = [ ApplicationServices AudioToolbox AudioUnit CoreAudio CF CoreGraphics CoreVideo ]; CoreMediaIO = [ CF CoreMedia ]; CoreText = [ CF CoreGraphics ]; CoreVideo = [ ApplicationServices CF CoreGraphics IOSurface OpenGL ]; @@ -72,7 +72,7 @@ with frameworks; with libs; { LatentSemanticMapping = [ Carbon CF ]; MapKit = []; MediaAccessibility = [ CF CoreGraphics CoreText QuartzCore ]; - MediaToolbox = [ AudioToolbox CF CoreMedia ]; + MediaToolbox = [ AudioToolbox AudioUnit CF CoreMedia ]; Metal = []; NetFS = [ CF ]; OSAKit = [ Carbon ]; From 724e833ea2a9d1b16f7289e1244d0d7ff56d027b Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 22:36:35 -0400 Subject: [PATCH 51/70] treewide: disable -Werror for llvm 7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of these have errors on newest llvm. It’s easiest to just add -Wno-error in these cases. --- pkgs/applications/graphics/imgcat/default.nix | 2 ++ pkgs/applications/science/astronomy/xplanet/default.nix | 2 ++ pkgs/applications/science/biology/cmtk/default.nix | 2 ++ pkgs/development/libraries/bullet/default.nix | 2 ++ pkgs/development/libraries/clucene-core/2.x.nix | 2 ++ pkgs/tools/archivers/p7zip/default.nix | 2 ++ pkgs/tools/compression/pbzip2/default.nix | 2 ++ pkgs/tools/misc/toybox/default.nix | 2 ++ pkgs/tools/networking/ntopng/default.nix | 2 +- pkgs/tools/security/opensc/default.nix | 2 ++ 10 files changed, 19 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/imgcat/default.nix b/pkgs/applications/graphics/imgcat/default.nix index a98029dd5807..862d3a9dff5e 100644 --- a/pkgs/applications/graphics/imgcat/default.nix +++ b/pkgs/applications/graphics/imgcat/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { sha256 = "0m83c33rzxvs0w214njql2c7q3fg06wnyijch3l2s88i7frl121f"; }; + NIX_CFLAGS_COMPILE = "-Wno-error"; + meta = with stdenv.lib; { description = "It's like cat, but for images"; homepage = https://github.com/eddieantonio/imgcat; diff --git a/pkgs/applications/science/astronomy/xplanet/default.nix b/pkgs/applications/science/astronomy/xplanet/default.nix index 7abd83b6dc12..aae9adfed67a 100644 --- a/pkgs/applications/science/astronomy/xplanet/default.nix +++ b/pkgs/applications/science/astronomy/xplanet/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { ./gcc6.patch ]; + NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing"; + meta = { description = "Renders an image of the earth or other planets into the X root window"; homepage = http://xplanet.sourceforge.net; diff --git a/pkgs/applications/science/biology/cmtk/default.nix b/pkgs/applications/science/biology/cmtk/default.nix index ed661db23e0a..90766645ecb3 100644 --- a/pkgs/applications/science/biology/cmtk/default.nix +++ b/pkgs/applications/science/biology/cmtk/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { buildInputs = [cmake]; + NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing"; + meta = with stdenv.lib; { description = "Computational Morphometry Toolkit "; longDescription = ''A software toolkit for computational morphometry of diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix index fca5e8d70a3b..585e2416b993 100644 --- a/pkgs/development/libraries/bullet/default.nix +++ b/pkgs/development/libraries/bullet/default.nix @@ -40,6 +40,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + NIX_CFLAGS_COMPILE = "-Wno-error=argument-outside-range"; + meta = with stdenv.lib; { description = "A professional free 3D Game Multiphysics Library"; longDescription = '' diff --git a/pkgs/development/libraries/clucene-core/2.x.nix b/pkgs/development/libraries/clucene-core/2.x.nix index 6eb310550bcd..03276ce9efd2 100644 --- a/pkgs/development/libraries/clucene-core/2.x.nix +++ b/pkgs/development/libraries/clucene-core/2.x.nix @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { # /build/clucene-core-2.3.3.4/build/bin/cl_test" doCheck = false; + NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing"; + meta = with stdenv.lib; { description = "Core library for full-featured text search engine"; longDescription = '' diff --git a/pkgs/tools/archivers/p7zip/default.nix b/pkgs/tools/archivers/p7zip/default.nix index 5430c2cb73e7..3dac4245de4e 100644 --- a/pkgs/tools/archivers/p7zip/default.nix +++ b/pkgs/tools/archivers/p7zip/default.nix @@ -37,6 +37,8 @@ stdenv.mkDerivation rec { setupHook = ./setup-hook.sh; + NIX_CFLAGS_COMPILE = "-Wno-error=c++11-narrowing"; + meta = { homepage = http://p7zip.sourceforge.net/; description = "A port of the 7-zip archiver"; diff --git a/pkgs/tools/compression/pbzip2/default.nix b/pkgs/tools/compression/pbzip2/default.nix index fb3da5e48d68..c7c1b7efc944 100644 --- a/pkgs/tools/compression/pbzip2/default.nix +++ b/pkgs/tools/compression/pbzip2/default.nix @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { installFlags = "PREFIX=$(out)"; + NIX_CFLAGS_COMPILE = "-Wno-error=reserved-user-defined-literal"; + meta = with stdenv.lib; { homepage = http://compression.ca/pbzip2/; description = "A parallel implementation of bzip2 for multi-core machines"; diff --git a/pkgs/tools/misc/toybox/default.nix b/pkgs/tools/misc/toybox/default.nix index 98fa06bccfd6..1b518be63a5e 100644 --- a/pkgs/tools/misc/toybox/default.nix +++ b/pkgs/tools/misc/toybox/default.nix @@ -54,6 +54,8 @@ stdenv.mkDerivation rec { checkInputs = [ which ]; # used for tests with checkFlags = [ "DEBUG=true" ]; checkTarget = "tests"; + NIX_CFLAGS_COMPILE = "-Wno-error"; + meta = with stdenv.lib; { description = "Lightweight implementation of some Unix command line utilities"; homepage = https://landley.net/toybox/; diff --git a/pkgs/tools/networking/ntopng/default.nix b/pkgs/tools/networking/ntopng/default.nix index b307a8f6f131..b1e1bfcdd65e 100644 --- a/pkgs/tools/networking/ntopng/default.nix +++ b/pkgs/tools/networking/ntopng/default.nix @@ -53,7 +53,7 @@ stdenv.mkDerivation rec { sed 's|LIBS += -lstdc++.6||' -i Makefile ''; - NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; + NIX_CFLAGS_COMPILE = [ "-fpermissive" "-Wno-error=reserved-user-defined-literal" ]; meta = with stdenv.lib; { description = "High-speed web-based traffic analysis and flow collection tool"; diff --git a/pkgs/tools/security/opensc/default.nix b/pkgs/tools/security/opensc/default.nix index 7d709712fc80..3144665e4ec9 100644 --- a/pkgs/tools/security/opensc/default.nix +++ b/pkgs/tools/security/opensc/default.nix @@ -21,6 +21,8 @@ stdenv.mkDerivation rec { libXt libxslt libiconv docbook_xml_dtd_412 ] ++ stdenv.lib.optional stdenv.isDarwin Carbon; + NIX_CFLAGS_COMPILE = "-Wno-error"; + configureFlags = [ "--enable-zlib" "--enable-readline" From ecffd43b4688f49ca9bc2996fc6d273806ce6189 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 22:45:58 -0400 Subject: [PATCH 52/70] xcbuild: use llvm6-based xcbuild --- pkgs/development/tools/xcbuild/wrapper.nix | 14 +++++++------- pkgs/top-level/all-packages.nix | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index 959c79405e86..902d21040501 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -1,6 +1,6 @@ { stdenv, lib, buildPackages, makeWrapper, writeText, runCommand , CoreServices, ImageIO, CoreGraphics -, runtimeShell +, runtimeShell, callPackage , xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX" , xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1" , sdkVer ? stdenv.targetPlatform.sdkVer or "10.10" }: @@ -14,20 +14,20 @@ let sdkBuildVersion = "17E189"; xcodeSelectVersion = "2349"; - xcbuild = buildPackages.callPackage ./default.nix { - inherit CoreServices ImageIO CoreGraphics; + xcbuild = callPackage ./default.nix { + inherit CoreServices ImageIO CoreGraphics stdenv; }; - toolchains = buildPackages.callPackage ./toolchains.nix { - inherit toolchainName; + toolchains = callPackage ./toolchains.nix { + inherit toolchainName stdenv; }; - sdks = buildPackages.callPackage ./sdks.nix { + sdks = callPackage ./sdks.nix { inherit toolchainName sdkName xcodePlatform; version = sdkVer; }; - platforms = buildPackages.callPackage ./platforms.nix { + platforms = callPackage ./platforms.nix { inherit sdks xcodePlatform; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a75b2ecc9ae2..6c0020b61771 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1280,6 +1280,7 @@ in contacts = callPackage ../tools/misc/contacts { inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Foundation AddressBook; + xcbuildHook = xcbuild6Hook; }; compsize = callPackage ../os-specific/linux/compsize { }; @@ -5062,6 +5063,7 @@ in pinentry_mac = callPackage ../tools/security/pinentry/mac.nix { inherit (darwin) cf-private; inherit (darwin.apple_sdk.frameworks) Cocoa; + xcbuildHook = xcbuild6Hook; }; pingtcp = callPackage ../tools/networking/pingtcp { }; @@ -9533,11 +9535,17 @@ in xcodebuild = callPackage ../development/tools/xcbuild/wrapper.nix { inherit (darwin.apple_sdk.frameworks) CoreServices CoreGraphics ImageIO; }; + xcodebuild6 = xcodebuild.override { stdenv = llvmPackages_6.stdenv; }; xcbuild = xcodebuild; xcbuildHook = makeSetupHook { deps = [ xcbuild ]; } ../development/tools/xcbuild/setup-hook.sh ; + # xcbuild with llvm 6 + xcbuild6Hook = makeSetupHook { + deps = [ xcodebuild6 ]; + } ../development/tools/xcbuild/setup-hook.sh ; + xcpretty = callPackage ../development/tools/xcpretty { }; xmlindent = callPackage ../development/web/xmlindent {}; From b1de8cf480558598b6084ad65812c20713c462d8 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 22:49:34 -0400 Subject: [PATCH 53/70] treewide: disable tests on darwin - tthsum - python-papis - python-sqlalchemy-migrate - python-xlib - dub --- pkgs/applications/misc/tthsum/default.nix | 2 ++ pkgs/development/python-modules/papis/default.nix | 3 +++ pkgs/development/python-modules/sqlalchemy-migrate/default.nix | 2 ++ pkgs/development/python-modules/xlib/default.nix | 2 ++ pkgs/development/tools/build-managers/dub/default.nix | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/tthsum/default.nix b/pkgs/applications/misc/tthsum/default.nix index 66bfcbcf4d9a..dbac56abaa1d 100644 --- a/pkgs/applications/misc/tthsum/default.nix +++ b/pkgs/applications/misc/tthsum/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { cp obj-unix/tthsum $out/bin ''; + doCheck = !stdenv.isDarwin; + meta = with stdenv.lib; { description = "An md5sum-alike program that works with Tiger/THEX hashes"; longDescription = '' diff --git a/pkgs/development/python-modules/papis/default.nix b/pkgs/development/python-modules/papis/default.nix index d9be946900cb..5a9934d6be62 100644 --- a/pkgs/development/python-modules/papis/default.nix +++ b/pkgs/development/python-modules/papis/default.nix @@ -5,6 +5,7 @@ , prompt_toolkit, pygments #, optional, dependencies , jinja2, whoosh, pytest +, stdenv }: buildPythonPackage rec { @@ -28,6 +29,8 @@ buildPythonPackage rec { jinja2 whoosh ]; + doCheck = !stdenv.isDarwin; + checkInputs = ([ pytest ]) ++ [ diff --git a/pkgs/development/python-modules/sqlalchemy-migrate/default.nix b/pkgs/development/python-modules/sqlalchemy-migrate/default.nix index 9daf2a696c25..596f9e47a08d 100644 --- a/pkgs/development/python-modules/sqlalchemy-migrate/default.nix +++ b/pkgs/development/python-modules/sqlalchemy-migrate/default.nix @@ -21,6 +21,8 @@ buildPythonPackage rec { checkInputs = [ unittest2 scripttest pytz mock testtools testrepository ]; propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ]; + doCheck = !stdenv.isDarwin; + prePatch = '' sed -i -e /tempest-lib/d \ -e /testtools/d \ diff --git a/pkgs/development/python-modules/xlib/default.nix b/pkgs/development/python-modules/xlib/default.nix index 0b0f60ea16ee..1903c3aaca88 100644 --- a/pkgs/development/python-modules/xlib/default.nix +++ b/pkgs/development/python-modules/xlib/default.nix @@ -30,6 +30,8 @@ buildPythonPackage rec { buildInputs = [ xorg.libX11 ]; propagatedBuildInputs = [ six ]; + doCheck = !stdenv.isDarwin; + meta = with stdenv.lib; { description = "Fully functional X client library for Python programs"; homepage = http://python-xlib.sourceforge.net/; diff --git a/pkgs/development/tools/build-managers/dub/default.nix b/pkgs/development/tools/build-managers/dub/default.nix index 3f733e97eed9..7b882926e1f5 100644 --- a/pkgs/development/tools/build-managers/dub/default.nix +++ b/pkgs/development/tools/build-managers/dub/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { ./build.sh ''; - doCheck = true; + doCheck = !stdenv.isDarwin; checkPhase = '' export DUB=$NIX_BUILD_TOP/source/bin/dub From 9c662b149c58b209989ad4805d7c1642144e64ee Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 22:51:05 -0400 Subject: [PATCH 54/70] platinum-searcher: remove fixup for cycle no longer necessary --- pkgs/tools/text/platinum-searcher/default.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/tools/text/platinum-searcher/default.nix b/pkgs/tools/text/platinum-searcher/default.nix index 829d734a8f75..4b30387f7ac5 100644 --- a/pkgs/tools/text/platinum-searcher/default.nix +++ b/pkgs/tools/text/platinum-searcher/default.nix @@ -16,11 +16,6 @@ buildGoPackage rec { goDeps = ./deps.nix; - preFixup = stdenv.lib.optionalString stdenv.isDarwin '' - # fixes cycle between $out and $bin - install_name_tool -delete_rpath $out/lib $bin/bin/pt - ''; - meta = with stdenv.lib; { homepage = https://github.com/monochromegane/the_platinum_searcher; description = "A code search tool similar to ack and the_silver_searcher(ag)."; From d3fa6602880d9322460ca1f5aa26878c42db4e2f Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 22:53:17 -0400 Subject: [PATCH 55/70] yquake: fix on darwin --- pkgs/games/quake2/yquake2/default.nix | 2 ++ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/games/quake2/yquake2/default.nix b/pkgs/games/quake2/yquake2/default.nix index 1e7032eb05ce..1564ba19bd2e 100644 --- a/pkgs/games/quake2/yquake2/default.nix +++ b/pkgs/games/quake2/yquake2/default.nix @@ -3,6 +3,7 @@ , oggSupport ? true, libogg, libvorbis , openalSupport ? true, openal , zipSupport ? true, zlib +, Cocoa, OpenAL }: let @@ -28,6 +29,7 @@ let nativeBuildInputs = [ cmake ]; buildInputs = [ SDL2 libGL ] + ++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ] ++ lib.optionals oggSupport [ libogg libvorbis ] ++ lib.optional openalSupport openal ++ lib.optional zipSupport zlib; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c0020b61771..b1a1d7b7dc65 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21668,7 +21668,9 @@ in xtris = callPackage ../games/xtris { }; - inherit (callPackage ../games/quake2/yquake2 { }) + inherit (callPackage ../games/quake2/yquake2 { + inherit (darwin.apple_sdk.frameworks) Cocoa OpenAL; + }) yquake2 yquake2-ctf yquake2-ground-zero From 6613a5fed011c2b796dadc0943d539cd91f728df Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 23:00:09 -0400 Subject: [PATCH 56/70] treewide: use gcc stdenv in rig and cdb --- pkgs/top-level/all-packages.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b1a1d7b7dc65..f12d3f5f975d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5234,7 +5234,9 @@ in remarshal = callPackage ../development/tools/remarshal { }; - rig = callPackage ../tools/misc/rig { }; + rig = callPackage ../tools/misc/rig { + stdenv = gccStdenv; + }; rocket = libsForQt5.callPackage ../tools/graphics/rocket { }; @@ -6871,7 +6873,9 @@ in inherit (buildPackages.darwin) bootstrap_cmds; }; - cdb = callPackage ../development/tools/database/cdb { }; + cdb = callPackage ../development/tools/database/cdb { + stdenv = gccStdenv; + }; chez = callPackage ../development/compilers/chez { inherit (darwin) cctools; From eaf153b17eebb03c708978da9b2529ea7ad95ab9 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 23:01:20 -0400 Subject: [PATCH 57/70] libcanberra3: use gdk x11 for macos --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f12d3f5f975d..d972025d7cc0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10948,7 +10948,7 @@ in inherit (darwin.apple_sdk.frameworks) CoreServices; }; libcanberra-gtk3 = pkgs.libcanberra.override { - gtk = gtk3; + gtk = gtk3.override { x11Support = true; }; }; libcanberra-gtk2 = pkgs.libcanberra-gtk3.override { gtk = gtk2.override { gdktarget = "x11"; }; From 2522f58b0ec9029622bcecafbdb0bf8de2ecd9a6 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 23:02:49 -0400 Subject: [PATCH 58/70] e2fsprogs: check if e2scrub_all_cron exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit doesn’t exist on macos --- pkgs/tools/filesystems/e2fsprogs/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/filesystems/e2fsprogs/default.nix b/pkgs/tools/filesystems/e2fsprogs/default.nix index e601a12e6e6f..11f107e994f9 100644 --- a/pkgs/tools/filesystems/e2fsprogs/default.nix +++ b/pkgs/tools/filesystems/e2fsprogs/default.nix @@ -39,7 +39,9 @@ stdenv.mkDerivation rec { postInstall = '' # avoid cycle between outputs - mv $out/lib/${pname}/e2scrub_all_cron $bin/bin/ + if [ -f $out/lib/${pname}/e2scrub_all_cron ]; then + mv $out/lib/${pname}/e2scrub_all_cron $bin/bin/ + fi ''; enableParallelBuilding = true; From f988cf4b86a49d571e17beee01c4a1d78d63a7d3 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 23:04:38 -0400 Subject: [PATCH 59/70] tcpcrypt: darwin needs libpcap --- pkgs/tools/security/tcpcrypt/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/tcpcrypt/default.nix b/pkgs/tools/security/tcpcrypt/default.nix index 7ffec8c4c884..3641472f2761 100644 --- a/pkgs/tools/security/tcpcrypt/default.nix +++ b/pkgs/tools/security/tcpcrypt/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, autoreconfHook -, openssl +, openssl, lib , libcap, libpcap, libnfnetlink, libnetfilter_conntrack, libnetfilter_queue }: @@ -20,8 +20,8 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" ]; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ openssl ] - ++ optionals stdenv.isLinux [ libcap libpcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ]; + buildInputs = [ openssl libpcap ] + ++ optionals stdenv.isLinux [ libcap libnfnetlink libnetfilter_conntrack libnetfilter_queue ]; enableParallelBuilding = true; From f4d9adff9a9503da6f8c85dc160ea4e6f2c644d3 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 22 Apr 2019 23:43:00 -0400 Subject: [PATCH 60/70] libtins: fix test on darwin --- pkgs/development/libraries/libtins/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libtins/default.nix b/pkgs/development/libraries/libtins/default.nix index 1af7548ac962..483fb56f43b2 100644 --- a/pkgs/development/libraries/libtins/default.nix +++ b/pkgs/development/libraries/libtins/default.nix @@ -31,7 +31,11 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; doCheck = true; - checkPhase = "make tests && LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib make test"; + preCheck = '' + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/lib + ''; + checkTarget = "tests test"; meta = with stdenv.lib; { description = "High-level, multiplatform C++ network packet sniffing and crafting library"; From f0b7561275eba64804854328fa77cf480e814f81 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 23 Apr 2019 09:25:12 -0400 Subject: [PATCH 61/70] rustc: use llvm5 for bootstrapping --- pkgs/development/compilers/rust/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 47df7e716dc1..5c3c08952074 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -2,6 +2,8 @@ , buildPackages , newScope, callPackage , CoreFoundation, Security +, llvmPackages_5 +, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost }: rec { makeRustPlatform = { rustc, cargo, ... }: { rust = { @@ -48,10 +50,15 @@ buildRustPackages = buildPackages.rust.packages.stable; # Analogous to stdenv rustPlatform = makeRustPlatform self.buildRustPackages; - rustc = self.callPackage ./rustc.nix { + rustc = self.callPackage ./rustc.nix ({ # Use boot package set to break cycle rustPlatform = bootRustPlatform; - }; + } // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) { + stdenv = llvmPackages_5.stdenv; + pkgsBuildBuild = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; }; + pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; }; + pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages_5.stdenv; }; + }); cargo = self.callPackage ./cargo.nix { # Use boot package set to break cycle rustPlatform = bootRustPlatform; From f1461d8c3d627f3ac05d223d95b4961b3689fd52 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 23 Apr 2019 22:36:44 -0400 Subject: [PATCH 62/70] darwin-bootstrap: copy libLLVM dylib This is needed for the bootstrap tools to work: https://hydra.nixos.org/build/92534667 --- pkgs/stdenv/darwin/make-bootstrap-tools.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/stdenv/darwin/make-bootstrap-tools.nix b/pkgs/stdenv/darwin/make-bootstrap-tools.nix index a9e494346eaa..cfa8aac0578e 100644 --- a/pkgs/stdenv/darwin/make-bootstrap-tools.nix +++ b/pkgs/stdenv/darwin/make-bootstrap-tools.nix @@ -86,6 +86,8 @@ in rec { cp -d ${llvmPackages.libcxx}/lib/libc++*.dylib $out/lib cp -d ${llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib + cp -d ${llvmPackages.llvm.lib}/lib/libLLVM.dylib $out/lib + cp -d ${libffi}/lib/libffi*.dylib $out/lib mkdir $out/include cp -rd ${llvmPackages.libcxx}/include/c++ $out/include From db032fe1dcceff0e5d0edec312134cc1e98ffc2d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 23 Apr 2019 22:38:00 -0400 Subject: [PATCH 63/70] mosh: use llvm6 stdenv on clang stdenv --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d972025d7cc0..00cdeeeb2975 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4458,7 +4458,9 @@ in docbook-xsl = docbook_xsl; }; - mosh = callPackage ../tools/networking/mosh { }; + mosh = callPackage ../tools/networking/mosh { + stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv; + }; motuclient = callPackage ../applications/science/misc/motu-client { }; From 9eb4623ae382b047646b2c497380cfb136d39172 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 23 Apr 2019 22:38:29 -0400 Subject: [PATCH 64/70] =?UTF-8?q?file-rename:=20don=E2=80=99t=20run=20test?= =?UTF-8?q?s=20on=20darwin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://hydra.nixos.org/build/92527786 --- pkgs/tools/filesystems/file-rename/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/filesystems/file-rename/default.nix b/pkgs/tools/filesystems/file-rename/default.nix index e799bc5a4dad..8dc4ec534a2b 100644 --- a/pkgs/tools/filesystems/file-rename/default.nix +++ b/pkgs/tools/filesystems/file-rename/default.nix @@ -15,6 +15,8 @@ perlPackages.buildPerlPackage rec { --prefix PERL5LIB : $out/${perlPackages.perl.libPrefix} ''; + doCheck = !stdenv.isDarwin; + meta = with stdenv.lib; { description = "Perl extension for renaming multiple files"; license = licenses.artistic1; From 698ff7855d4c1be3b1711fb0811e6d63f930dcf3 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 23 Apr 2019 22:39:28 -0400 Subject: [PATCH 65/70] =?UTF-8?q?xml2rfc:=20don=E2=80=99t=20run=20tests=20?= =?UTF-8?q?on=20darwin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://hydra.nixos.org/build/92523991 --- pkgs/development/python-modules/xml2rfc/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/xml2rfc/default.nix b/pkgs/development/python-modules/xml2rfc/default.nix index e86b1b206094..f737cf344b88 100644 --- a/pkgs/development/python-modules/xml2rfc/default.nix +++ b/pkgs/development/python-modules/xml2rfc/default.nix @@ -1,5 +1,6 @@ { lib, fetchPypi, buildPythonPackage, intervaltree, pyflakes, requests, lxml, google-i18n-address , pycountry, html5lib, six +, stdenv }: buildPythonPackage rec { @@ -26,6 +27,8 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; + doCheck = !stdenv.isDarwin; + meta = with lib; { description = "Tool generating IETF RFCs and drafts from XML sources"; homepage = https://tools.ietf.org/tools/xml2rfc/trac/; From 63831c398a1d9f4cca0d39c723347f15447b9f16 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 23 Apr 2019 22:40:08 -0400 Subject: [PATCH 66/70] python-fenics: put pytest in nativeBuildInputs --- .../libraries/science/math/fenics/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/fenics/default.nix b/pkgs/development/libraries/science/math/fenics/default.nix index 1825a6f1bb25..4e3e47c54158 100644 --- a/pkgs/development/libraries/science/math/fenics/default.nix +++ b/pkgs/development/libraries/science/math/fenics/default.nix @@ -35,10 +35,15 @@ let url = "https://bitbucket.org/fenics-project/dijitso/downloads/dijitso-${version}.tar.gz"; sha256 = "0mw6mynjmg6yl3l2k33yra2x84s4r6mh44ylhk9znjfk74jra8zg"; }; - buildInputs = [ numpy pytest six ]; - checkPhase = '' + buildInputs = [ numpy six ]; + nativeBuildInputs = [ pytest ]; + preCheck = '' export HOME=$PWD + ''; + checkPhase = '' + runHook preCheck py.test test/ + runHook postCheck ''; meta = { description = "Distributed just-in-time shared library building"; From da38a49a24c69b7c0356157d4e92f6d96f6e2bc0 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 24 Apr 2019 20:11:07 -0400 Subject: [PATCH 67/70] treewide: mark bad packages Some old stuff is known not to work. --- pkgs/applications/audio/fluidsynth/default.nix | 1 + pkgs/development/compilers/gcc/4.8/default.nix | 1 + pkgs/development/compilers/gcc/4.9/default.nix | 1 + pkgs/development/compilers/gcc/5/default.nix | 1 + pkgs/development/compilers/go/1.10.nix | 3 +-- pkgs/development/compilers/llvm/3.7/libc++/default.nix | 1 + pkgs/development/compilers/llvm/4/lld.nix | 1 + pkgs/development/compilers/llvm/5/lld.nix | 1 + pkgs/development/libraries/boost/generic.nix | 5 +++-- pkgs/development/libraries/qt-4.x/4.8/default.nix | 1 + pkgs/development/libraries/qt-5/modules/qtbase.nix | 1 + pkgs/development/libraries/wxwidgets/2.9/default.nix | 3 ++- pkgs/development/libraries/wxwidgets/3.0/default.nix | 1 + pkgs/development/libraries/wxwidgets/3.0/mac.nix | 1 + pkgs/misc/jackaudio/default.nix | 1 + 15 files changed, 18 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/audio/fluidsynth/default.nix b/pkgs/applications/audio/fluidsynth/default.nix index 192670280cc6..195431898a6d 100644 --- a/pkgs/applications/audio/fluidsynth/default.nix +++ b/pkgs/applications/audio/fluidsynth/default.nix @@ -44,5 +44,6 @@ stdenv.mkDerivation rec { license = licenses.lgpl21Plus; maintainers = with maintainers; [ goibhniu lovek323 ]; platforms = platforms.unix; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index b36529ecb3cf..edeb1c4fbb0f 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -418,6 +418,7 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.freebsd ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index ee00a3aee1e1..6fb153b678fd 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -430,6 +430,7 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.freebsd ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 15f95ef205eb..79f4843d082d 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -435,6 +435,7 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.freebsd ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.darwin; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/go/1.10.nix b/pkgs/development/compilers/go/1.10.nix index 22ba90e92d85..d18d260b5058 100644 --- a/pkgs/development/compilers/go/1.10.nix +++ b/pkgs/development/compilers/go/1.10.nix @@ -145,8 +145,6 @@ stdenv.mkDerivation rec { # Hopefully avoids test timeouts on Hydra GO_TEST_TIMEOUT_SCALE = 3; - doCheck = !stdenv.isDarwin; - # The go build actually checks for CC=*/clang and does something different, so we don't # just want the generic `cc` here. CC = if stdenv.isDarwin then "clang" else "cc"; @@ -184,5 +182,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ cstrahan orivej velovix mic92 ]; platforms = platforms.linux ++ platforms.darwin; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/llvm/3.7/libc++/default.nix b/pkgs/development/compilers/llvm/3.7/libc++/default.nix index 462e35a483f4..7b7ac7297ba3 100644 --- a/pkgs/development/compilers/llvm/3.7/libc++/default.nix +++ b/pkgs/development/compilers/llvm/3.7/libc++/default.nix @@ -43,5 +43,6 @@ stdenv.mkDerivation rec { description = "A new implementation of the C++ standard library, targeting C++11"; license = with stdenv.lib.licenses; [ ncsa mit ]; platforms = stdenv.lib.platforms.unix; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/llvm/4/lld.nix b/pkgs/development/compilers/llvm/4/lld.nix index 21b0c1c3601c..cf6de26a9e83 100644 --- a/pkgs/development/compilers/llvm/4/lld.nix +++ b/pkgs/development/compilers/llvm/4/lld.nix @@ -27,5 +27,6 @@ stdenv.mkDerivation { homepage = http://lld.llvm.org/; license = stdenv.lib.licenses.ncsa; platforms = stdenv.lib.platforms.all; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/compilers/llvm/5/lld.nix b/pkgs/development/compilers/llvm/5/lld.nix index 9a47435cf140..bf23f80ef103 100644 --- a/pkgs/development/compilers/llvm/5/lld.nix +++ b/pkgs/development/compilers/llvm/5/lld.nix @@ -27,5 +27,6 @@ stdenv.mkDerivation { homepage = http://lld.llvm.org/; license = stdenv.lib.licenses.ncsa; platforms = stdenv.lib.platforms.all; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 8ce44b878d07..c0c69b0fe70a 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -114,8 +114,9 @@ stdenv.mkDerivation { description = "Collection of C++ libraries"; license = stdenv.lib.licenses.boost; - platforms = (platforms.unix ++ platforms.windows); - badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux"; + platforms = platforms.unix ++ platforms.windows; + badPlatforms = stdenv.lib.optional (versionOlder version "1.59") "aarch64-linux" + ++ stdenv.lib.optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin"; maintainers = with maintainers; [ peti ]; }; diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 8715aaaa44d0..de9a656f6ff1 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -231,5 +231,6 @@ stdenv.mkDerivation rec { license = lib.licenses.lgpl21Plus; # or gpl3 maintainers = with lib.maintainers; [ orivej lovek323 phreedom sander ]; platforms = lib.platforms.unix; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 68759a26e82a..9ae7b274917c 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -375,6 +375,7 @@ stdenv.mkDerivation { license = with licenses; [ fdl13 gpl2 lgpl21 lgpl3 ]; maintainers = with maintainers; [ qknight ttuegel periklis bkchr ]; platforms = platforms.unix; + broken = stdenv.isDarwin && (compareVersion "5.9.0" < 0); }; } diff --git a/pkgs/development/libraries/wxwidgets/2.9/default.nix b/pkgs/development/libraries/wxwidgets/2.9/default.nix index 1938b15efbb2..18e0cebec859 100644 --- a/pkgs/development/libraries/wxwidgets/2.9/default.nix +++ b/pkgs/development/libraries/wxwidgets/2.9/default.nix @@ -74,12 +74,13 @@ stdenv.mkDerivation { }; enableParallelBuilding = true; - + meta = { platforms = with platforms; darwin ++ linux; license = licenses.wxWindows; homepage = https://www.wxwidgets.org/; description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base"; longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more."; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/libraries/wxwidgets/3.0/default.nix b/pkgs/development/libraries/wxwidgets/3.0/default.nix index 948b261fe45e..a89f132b8322 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/default.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/default.nix @@ -89,5 +89,6 @@ stdenv.mkDerivation rec { homepage = https://www.wxwidgets.org/; description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base"; longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more."; + badPlatforms = [ "x86_64-darwin" ]; }; } diff --git a/pkgs/development/libraries/wxwidgets/3.0/mac.nix b/pkgs/development/libraries/wxwidgets/3.0/mac.nix index 040273e28b99..6e559cfb6a94 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/mac.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/mac.nix @@ -71,5 +71,6 @@ stdenv.mkDerivation rec { homepage = https://www.wxwidgets.org/; description = "a C++ library that lets developers create applications for Windows, macOS, Linux and other platforms with a single code base"; longDescription = "wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. Link with the appropriate library for your platform and compiler, and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much more."; + broken = true; }; } diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index 556b66befe63..b37af235d355 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -76,5 +76,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2Plus; platforms = platforms.unix; maintainers = with maintainers; [ goibhniu ]; + badPlatforms = [ "x86_64-darwin" ]; }; } From 18e7c5a91e9b3a80acb7db86397137524932a5ca Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 24 Apr 2019 23:02:55 -0400 Subject: [PATCH 68/70] spectral: add qtmacextras --- .../networking/instant-messengers/spectral/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/spectral/default.nix b/pkgs/applications/networking/instant-messengers/spectral/default.nix index aff3cf82dc9b..72069ec81c1a 100644 --- a/pkgs/applications/networking/instant-messengers/spectral/default.nix +++ b/pkgs/applications/networking/instant-messengers/spectral/default.nix @@ -5,6 +5,7 @@ # Not mentioned but seems needed , qtgraphicaleffects , qtdeclarative +, qtmacextras }: let @@ -37,7 +38,8 @@ in stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig qmake makeWrapper ]; buildInputs = [ qtbase qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative ] - ++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio; + ++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio + ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin qtmacextras; meta = with stdenv.lib; { description = "A glossy client for Matrix, written in QtQuick Controls 2 and C++"; From 29cdd08e8e7643002ab84c3a10f9b13a2de211f5 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 24 Apr 2019 23:03:16 -0400 Subject: [PATCH 69/70] tokei: add libiconv for macos --- pkgs/development/tools/misc/tokei/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/tokei/default.nix b/pkgs/development/tools/misc/tokei/default.nix index 65a210ed4b91..f9b4343a63a7 100644 --- a/pkgs/development/tools/misc/tokei/default.nix +++ b/pkgs/development/tools/misc/tokei/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, rustPlatform }: +{ stdenv, fetchFromGitHub, rustPlatform, libiconv }: rustPlatform.buildRustPackage rec { pname = "tokei"; @@ -13,6 +13,8 @@ rustPlatform.buildRustPackage rec { cargoSha256 = "1xai3jxvs8r3s3v5d5w40miw6nihnj9gzlzzdrwphmgrkywr88c4"; + buildInputs = [ libiconv ]; + meta = with stdenv.lib; { description = "Program that displays statistics about your code"; homepage = https://github.com/XAMPPRocky/tokei; From c1f1a0ea159a4513be524fa775ad708debd19aa1 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 25 Apr 2019 22:16:31 -0400 Subject: [PATCH 70/70] qt5: use llvm5 for all modules This avoids some issues encountered with qt5 not working libcxx 7. We can remove this at some point when qt5 has addressed all of their issues. --- pkgs/development/libraries/qt-5/5.11/default.nix | 10 ++++++---- pkgs/development/libraries/qt-5/5.12/default.nix | 8 +++++--- pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/qt-5/5.11/default.nix b/pkgs/development/libraries/qt-5/5.11/default.nix index 0b6ba8c8746f..0014a1452aa0 100644 --- a/pkgs/development/libraries/qt-5/5.11/default.nix +++ b/pkgs/development/libraries/qt-5/5.11/default.nix @@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`. stdenv, fetchurl, fetchFromGitHub, makeSetupHook, bison, cups ? null, harfbuzz, libGL, perl, gstreamer, gst-plugins-base, gtk3, dconf, - cf-private, + cf-private, llvmPackages_5, # options developerBuild ? false, @@ -65,8 +65,10 @@ let }; mkDerivation = - import ../mkDerivation.nix - { inherit stdenv; inherit (stdenv) lib; } + import ../mkDerivation.nix { + inherit (stdenv) lib; + stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv; + } { inherit debug; }; qtModule = @@ -97,7 +99,7 @@ let qtdoc = callPackage ../modules/qtdoc.nix {}; qtgraphicaleffects = callPackage ../modules/qtgraphicaleffects.nix {}; qtimageformats = callPackage ../modules/qtimageformats.nix {}; - qtlocation = callPackage ../modules/qtlocation.nix {}; + qtlocation = callPackage ../modules/qtlocation.nix { }; qtmacextras = callPackage ../modules/qtmacextras.nix { inherit cf-private; }; diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index b3095dd9a7e3..d84596bd0544 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -20,7 +20,7 @@ top-level attribute to `top-level/all-packages.nix`. stdenv, fetchurl, fetchFromGitHub, makeSetupHook, bison, cups ? null, harfbuzz, libGL, perl, gstreamer, gst-plugins-base, gtk3, dconf, - cf-private, + cf-private, llvmPackages_5, # options developerBuild ? false, @@ -69,8 +69,10 @@ let }; mkDerivation = - import ../mkDerivation.nix - { inherit stdenv; inherit (stdenv) lib; } + import ../mkDerivation.nix { + inherit (stdenv) lib; + stdenv = if stdenv.cc.isClang then llvmPackages_5.stdenv else stdenv; + } { inherit debug; }; qtModule = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 00cdeeeb2975..1cde1ad0beb0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12500,6 +12500,7 @@ in inherit gtk3; inherit (gnome3) dconf; inherit (gst_all_1) gstreamer gst-plugins-base; + inherit llvmPackages_5; }); libsForQt511 = recurseIntoAttrs (lib.makeScope qt511.newScope mkLibsForQt5); @@ -12517,6 +12518,7 @@ in inherit gtk3; inherit (gnome3) dconf; inherit (gst_all_1) gstreamer gst-plugins-base; + inherit llvmPackages_5; }); libsForQt512 = recurseIntoAttrs (lib.makeScope qt512.newScope mkLibsForQt5);