diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-11-20 14:32:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-11-20 14:32:58 +0100 |
commit | 333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb (patch) | |
tree | 0f4757ddd2bb3d73b438eea85828d8e01c049583 /pkgs/development/interpreters/python | |
parent | bdbbfa0d4247e203ffe3171621b614374da05f70 (diff) | |
parent | b809f886c0bdbd4665fc65a4c308d38a30c368d8 (diff) | |
download | nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.gz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.bz2 nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.lz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.xz nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.tar.zst nixlib-333d69a5f0e7ccfe7b8c0bdb14ebd3934b3f77fb.zip |
Merge staging into closure-size
The most complex problems were from dealing with switches reverted in the meantime (gcc5, gmp6, ncurses6). It's likely that darwin is (still) broken nontrivially.
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r-- | pkgs/development/interpreters/python/2.7/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/3.4/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/3.5/default.nix | 8 |
3 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/python/2.7/default.nix b/pkgs/development/interpreters/python/2.7/default.nix index a756bfde3736..f96327f3b91c 100644 --- a/pkgs/development/interpreters/python/2.7/default.nix +++ b/pkgs/development/interpreters/python/2.7/default.nix @@ -68,6 +68,8 @@ let done '' + optionalString stdenv.isDarwin '' substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + substituteInPlace Lib/multiprocessing/__init__.py \ + --replace 'os.popen(comm)' 'os.popen("nproc")' ''; configureFlags = [ @@ -95,11 +97,7 @@ let ] ++ optionals x11Support [ tcl tk xlibsWrapper libX11 ] ) ++ optional zlibSupport zlib - - # depend on CF and configd only if purity is an issue - # the impure bootstrap compiler can't build CoreFoundation currently. it requires - # <mach-o/dyld.h> which is in our pure bootstrapTools, but not in the system headers. - ++ optionals (stdenv.isDarwin && !stdenv.cc.nativeLibc) [ CF configd ]; + ++ optionals stdenv.isDarwin [ CF configd ]; mkPaths = paths: { C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths); diff --git a/pkgs/development/interpreters/python/3.4/default.nix b/pkgs/development/interpreters/python/3.4/default.nix index 3d3069cf0b56..7c979b0ebe9a 100644 --- a/pkgs/development/interpreters/python/3.4/default.nix +++ b/pkgs/development/interpreters/python/3.4/default.nix @@ -12,6 +12,8 @@ , zlib , callPackage , self + +, CF, configd }: assert readline != null -> ncurses != null; @@ -33,6 +35,8 @@ stdenv.mkDerivation { pythonVersion = majorVersion; inherit majorVersion version; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CF configd ]; + src = fetchurl { url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz"; sha256 = "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm"; @@ -40,6 +44,10 @@ stdenv.mkDerivation { NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + ''; + preConfigure = '' for i in /usr /sw /opt /pkg; do # improve purity substituteInPlace ./setup.py --replace $i /no-such-path diff --git a/pkgs/development/interpreters/python/3.5/default.nix b/pkgs/development/interpreters/python/3.5/default.nix index 5c07b9e0cf02..f17a6764202b 100644 --- a/pkgs/development/interpreters/python/3.5/default.nix +++ b/pkgs/development/interpreters/python/3.5/default.nix @@ -12,6 +12,8 @@ , zlib , callPackage , self + +, CF, configd }: assert readline != null -> ncurses != null; @@ -33,6 +35,8 @@ stdenv.mkDerivation { pythonVersion = majorVersion; inherit majorVersion version; + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CF configd ]; + src = fetchurl { url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz"; sha256 = "14dywb94mci0kqbsji9riyyq8kx0h9ljdjjgxnkfrvm56hbammyn"; @@ -40,6 +44,10 @@ stdenv.mkDerivation { NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"' + ''; + preConfigure = '' for i in /usr /sw /opt /pkg; do # improve purity substituteInPlace ./setup.py --replace $i /no-such-path |