pkgs/development/interpreters/python/2.6/default.nix: fixed build on Darwin
svn path=/nixpkgs/trunk/; revision=18136
This commit is contained in:
parent
1981322cc5
commit
4d675a283e
@ -9,11 +9,13 @@
|
||||
, libX11 ? null
|
||||
, xproto ? null
|
||||
, arch ? null
|
||||
, sw_vers ? null
|
||||
}:
|
||||
|
||||
assert zlibSupport -> zlib != null;
|
||||
assert gdbmSupport -> gdbm != null;
|
||||
assert stdenv.isDarwin -> arch != null;
|
||||
assert stdenv.isDarwin -> sw_vers != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
@ -36,6 +38,7 @@ let
|
||||
++ optional (libX11 != null) libX11
|
||||
++ optional (xproto != null) xproto
|
||||
++ optional (arch != null) arch
|
||||
++ optional (sw_vers != null) sw_vers
|
||||
;
|
||||
|
||||
in
|
||||
@ -56,7 +59,7 @@ stdenv.mkDerivation ( {
|
||||
inherit buildInputs;
|
||||
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p}/include") buildInputs);
|
||||
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p}/lib") buildInputs);
|
||||
configureFlags = ''${if stdenv.isDarwin then "" else " --enable-shared"} --with-threads --enable-unicode --with-wctype-functions'';
|
||||
configureFlags = "--enable-shared --with-threads --enable-unicode --with-wctype-functions";
|
||||
|
||||
preConfigure = ''
|
||||
# Purity.
|
||||
@ -84,9 +87,6 @@ stdenv.mkDerivation ( {
|
||||
};
|
||||
|
||||
meta = {
|
||||
# List of supported platforms.
|
||||
# - On Darwin, `python.exe' fails with "Bus Error".
|
||||
# platforms = stdenv.lib.platforms.allBut "i686-darwin";
|
||||
# Re-enabled for 2.6 to see whether the problem still occurs.
|
||||
platforms = stdenv.lib.platforms;
|
||||
};
|
||||
} // (if stdenv.system == "i686-darwin" then { NIX_CFLAGS_COMPILE = "-msse2" ; patches = [./search-path.patch]; } else {} ) )
|
||||
|
3
pkgs/os-specific/darwin/sw_vers/builder.sh
Executable file
3
pkgs/os-specific/darwin/sw_vers/builder.sh
Executable file
@ -0,0 +1,3 @@
|
||||
source $stdenv/setup
|
||||
mkdir -p "$out/bin"
|
||||
ln -s /usr/bin/sw_vers "$out/bin/"
|
8
pkgs/os-specific/darwin/sw_vers/default.nix
Normal file
8
pkgs/os-specific/darwin/sw_vers/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{stdenv}:
|
||||
|
||||
assert stdenv.isDarwin;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "darwin-sw-vers-utility";
|
||||
builder = ./builder.sh;
|
||||
}
|
@ -415,6 +415,10 @@ let
|
||||
inherit stdenv;
|
||||
};
|
||||
|
||||
darwinSwVersUtility = import ../os-specific/darwin/sw_vers {
|
||||
inherit stdenv;
|
||||
};
|
||||
|
||||
acct = import ../tools/system/acct {
|
||||
inherit fetchurl stdenv;
|
||||
};
|
||||
@ -2428,6 +2432,7 @@ let
|
||||
python26Base = composedArgsAndFun (import ../development/interpreters/python/2.6) {
|
||||
inherit fetchurl stdenv zlib bzip2 gdbm;
|
||||
arch = if stdenv.isDarwin then darwinArchUtility else null;
|
||||
sw_vers = if stdenv.isDarwin then darwinSwVersUtility else null;
|
||||
};
|
||||
|
||||
python26Full = python26Base.passthru.function {
|
||||
|
Loading…
Reference in New Issue
Block a user