python-2.6: fixed build on Darwin
* Dropped "nolongdouble.patch". The patch no longer applies to Python 2.6, and apparently isn't required anymore either. * Added access to native Darwin arch utility. Python tries to run 'arch' in the configure stage, but that binary reside in /usr/bin. To make it available to the expression, the small wrapper darwinArchUtility is added as a buildInput if appropriate. * Don't pass --enable-shared. The build fails if we try to enable building of shared libraries, apparently because some required libraries aren't linked, i.e. the linker call isn't right. TODO: * Figure out how to enable shared linking. * The resulting binary on Darwin seem to lack the binascii module. svn path=/nixpkgs/trunk/; revision=17894
This commit is contained in:
@@ -8,10 +8,12 @@
|
||||
, tcl ? null
|
||||
, libX11 ? null
|
||||
, xproto ? null
|
||||
, arch ? null
|
||||
}:
|
||||
|
||||
assert zlibSupport -> zlib != null;
|
||||
assert gdbmSupport -> gdbm != null;
|
||||
assert stdenv.isDarwin -> arch != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
@@ -30,6 +32,7 @@ let
|
||||
++ optional (tcl != null) tcl
|
||||
++ optional (libX11 != null) libX11
|
||||
++ optional (xproto != null) xproto
|
||||
++ optional (arch != null) arch
|
||||
;
|
||||
|
||||
in
|
||||
@@ -50,7 +53,7 @@ stdenv.mkDerivation ( {
|
||||
inherit buildInputs;
|
||||
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
|
||||
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
|
||||
configureFlags = "--enable-shared --with-wctype-functions";
|
||||
configureFlags = ''${if stdenv.isDarwin then "" else " --enable-shared"} --with-wctype-functions'';
|
||||
|
||||
preConfigure = ''
|
||||
# Purity.
|
||||
@@ -83,4 +86,4 @@ stdenv.mkDerivation ( {
|
||||
# platforms = stdenv.lib.platforms.allBut "i686-darwin";
|
||||
# Re-enabled for 2.6 to see whether the problem still occurs.
|
||||
};
|
||||
} // (if stdenv.system == "i686-darwin" then { NIX_CFLAGS_COMPILE = "-msse2" ; patches = [./search-path.patch ./nolongdouble.patch]; } else {} ) )
|
||||
} // (if stdenv.system == "i686-darwin" then { NIX_CFLAGS_COMPILE = "-msse2" ; patches = [./search-path.patch]; } else {} ) )
|
||||
|
||||
Reference in New Issue
Block a user