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.
This commit is contained in:
Vladimír Čunát
2015-11-20 14:32:58 +01:00
1278 changed files with 105731 additions and 30012 deletions

View File

@@ -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);

View File

@@ -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

View File

@@ -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