diff options
Diffstat (limited to 'pkgs/stdenv/darwin/default.nix')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 61 |
1 files changed, 45 insertions, 16 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index cda643c42fe3..a08ea3b34bac 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -4,15 +4,15 @@ # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools , bootstrapFiles ? let fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> { - url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/d5bdfcbfe6346761a332918a267e82799ec954d2/${file}"; + url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/a257d64f333caa50facc57c0e3fc6a64620ed348/${file}"; inherit (localSystem) system; inherit sha256 executable; }; in { - sh = fetch { file = "sh"; sha256 = "07wm33f1yzfpcd3rh42f8g096k4cvv7g65p968j28agzmm2s7s8m"; }; - bzip2 = fetch { file = "bzip2"; sha256 = "0y9ri2aprkrp2dkzm6229l0mw4rxr2jy7vvh3d8mxv2698v2kdbm"; }; - mkdir = fetch { file = "mkdir"; sha256 = "0sb07xpy66ws6f2jfnpjibyimzb71al8n8c6y4nr8h50al3g90nr"; }; - cpio = fetch { file = "cpio"; sha256 = "0r5c54hg678w7zydx27bzl9p3v9fs25y5ix6vdfi1ilqim7xh65n"; }; - tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "18hp5w6klr8g307ap4368r255qpzg9r0vwg9vqvj8f2zy1xilcjf"; executable = false; }; + sh = fetch { file = "sh"; sha256 = "0a8q8sdqwvs5kn9ia6rkmr36xa5y6g44a9nww5kxbyvsvwmw22y6"; }; + bzip2 = fetch { file = "bzip2"; sha256 = "0j256wrz1a5d21800h6k8cr20bka6fhpb47qig01n2mc0bc3db2m"; }; + mkdir = fetch { file = "mkdir"; sha256 = "1rqzhcc0rccnck31a728j8va4xw54r17k4d58c5bi5z8hjz4458f"; }; + cpio = fetch { file = "cpio"; sha256 = "1680lxhqfldsvg9as19xv34kjpka6vn3nm9d91w0rh90sbqpa610"; }; + tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "0cvwj6q16f6b2q6lx43lly1a8dwkxpvck2946qln2fmcmgin3rpq"; executable = false; }; } }: @@ -190,7 +190,6 @@ in rec { stage1 = prevStage: let persistent = self: super: with prevStage; { cmake = super.cmake.override { - majorVersion = "3.9"; # FIXME: update ApplicationServices patch isBootstrap = true; useSharedLibraries = false; }; @@ -199,6 +198,10 @@ in rec { CF = null; # use CoreFoundation from bootstrap-tools configd = null; }; + python2 = self.python; + + ninja = super.ninja.override { buildDocs = false; }; + darwin = super.darwin // { cctools = super.darwin.cctools.override { llvm = null; }; }; }; in with prevStage; stageFun 1 prevStage { extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\""; @@ -218,11 +221,12 @@ in rec { zlib patchutils m4 scons flex perl bison unifdef unzip openssl python libxml2 gettext sharutils gmp libarchive ncurses pkg-config libedit groff openssh sqlite sed serf openldap db cyrus-sasl expat apr-util subversion xz - findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils; + findfreetype libssh curl cmake autoconf automake libtool ed cpio coreutils + libssh2 nghttp2 libkrb5 python2 ninja; darwin = super.darwin // { inherit (darwin) - dyld Libsystem xnu configd ICU libdispatch libclosure launchd; + dyld Libsystem xnu configd ICU libdispatch libclosure launchd CF; }; }; in with prevStage; stageFun 2 prevStage { @@ -236,7 +240,10 @@ in rec { allowedRequisites = [ bootstrapTools ] ++ - (with pkgs; [ xz.bin xz.out libcxx libcxxabi ]) ++ + (with pkgs; [ + xz.bin xz.out libcxx libcxxabi zlib libxml2.out curl.out openssl.out libssh2.out + nghttp2.lib libkrb5 + ]) ++ (with pkgs.darwin; [ dyld Libsystem CF ICU locale ]); overrides = persistent; @@ -248,9 +255,10 @@ in rec { patchutils m4 scons flex perl bison unifdef unzip openssl python gettext sharutils libarchive pkg-config groff bash subversion openssh sqlite sed serf openldap db cyrus-sasl expat apr-util - findfreetype libssh curl cmake autoconf automake libtool cpio; + findfreetype libssh curl cmake autoconf automake libtool cpio + libssh2 nghttp2 libkrb5 python2 ninja; - # Avoid pulling in a full python and it's extra dependencies for the llvm/clang builds. + # 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 @@ -282,7 +290,10 @@ in rec { allowedRequisites = [ bootstrapTools ] ++ - (with pkgs; [ xz.bin xz.out bash libcxx libcxxabi ]) ++ + (with pkgs; [ + xz.bin xz.out bash libcxx libcxxabi zlib libxml2.out curl.out openssl.out libssh2.out + nghttp2.lib libkrb5 + ]) ++ (with pkgs.darwin; [ dyld ICU Libsystem locale ]); overrides = persistent; @@ -293,7 +304,7 @@ in rec { inherit gnumake gzip gnused bzip2 gawk ed xz patch bash ncurses libffi zlib gmp pcre gnugrep - coreutils findutils diffutils patchutils; + coreutils findutils diffutils patchutils ninja; # Hack to make sure we don't link ncurses in bootstrap tools. The proper # solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib, @@ -313,8 +324,14 @@ in rec { }); in { inherit tools libraries; } // tools // libraries); - darwin = super.darwin // { + darwin = super.darwin // rec { inherit (darwin) dyld Libsystem libiconv locale; + + libxml2-nopython = super.libxml2.override { pythonSupport = false; }; + CF = super.darwin.CF.override { + libxml2 = libxml2-nopython; + python = prevStage.python; + }; }; }; in with prevStage; stageFun 4 prevStage { @@ -346,6 +363,17 @@ in rec { }); in { inherit tools libraries; } // tools // libraries); + # N.B: the important thing here is to ensure that python == python2 + # == python27 or you get weird issues with inconsistent package sets. + # In a particularly subtle bug, I overrode python2 instead of python27 + # here, and it caused gnome-doc-utils to complain about: + # "PyThreadState_Get: no current thread". This is because Python gets + # really unhappy if you have Python A which loads a native python lib + # which was linked against Python B, which in our case was happening + # because we didn't override python "deeply enough". Anyway, this works + # and I'm just leaving this blurb here so people realize why it matters + python27 = super.python27.override { CF = prevStage.darwin.CF; }; + darwin = super.darwin // { inherit (darwin) dyld ICU Libsystem libiconv; } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { @@ -399,9 +427,10 @@ in rec { gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk gnugrep llvmPackages.clang-unwrapped llvmPackages.clang-unwrapped.lib patch pcre.out gettext binutils.bintools darwin.binutils darwin.binutils.bintools + curl.out openssl.out libssh2.out nghttp2.lib libkrb5 cc.expand-response-params ]) ++ (with pkgs.darwin; [ - dyld Libsystem CF cctools ICU libiconv locale + dyld Libsystem CF cctools ICU libiconv locale libxml2-nopython.out ]); overrides = lib.composeExtensions persistent (self: super: { |