Merge branch 'staging'
Darwin isn't in a perfect state, in particular its bootstrap tools won't build which will block nixpkgs channel. But on the whole it seems acceptable.
This commit is contained in:
@@ -17,8 +17,8 @@ assert enableThreading -> (stdenv ? glibc);
|
||||
let
|
||||
|
||||
libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
|
||||
libcInc = libc.dev or libc;
|
||||
libcLib = libc.out or libc;
|
||||
libcInc = lib.getDev libc;
|
||||
libcLib = lib.getLib libc;
|
||||
common = { version, sha256 }: stdenv.mkDerivation rec {
|
||||
name = "perl-${version}";
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ let
|
||||
url = "https://bitbucket.org/pypy/pypy/get/${pypy-tag}.tar.bz2";
|
||||
sha256 = "1cs9xqs1rmzdcnwxxkbvy064s5cbp6vvzhn2jmyzh5kg4di1r3bn";
|
||||
};
|
||||
libs = [ libffi libedit libuv boost.dev boost.lib zlib ];
|
||||
libs = [ libffi libedit libuv boost.dev boost.out zlib ];
|
||||
include-path = stdenv.lib.concatStringsSep ":"
|
||||
(map (p: "${p}/include") libs);
|
||||
library-path = stdenv.lib.concatStringsSep ":"
|
||||
@@ -47,7 +47,7 @@ let
|
||||
patchPhase = ''
|
||||
(cd pixie-src
|
||||
patch -p1 < ${./load_paths.patch}
|
||||
libraryPaths='["${libuv}" "${libedit}" "${libffi}" "${boost.dev}" "${boost.lib}" "${zlib}"]'
|
||||
libraryPaths='["${libuv}" "${libedit}" "${libffi}" "${boost.dev}" "${boost.out}" "${zlib}"]'
|
||||
export libraryPaths
|
||||
substituteAllInPlace ./pixie/ffi-infer.pxi)
|
||||
'';
|
||||
|
||||
@@ -25,10 +25,9 @@ let
|
||||
++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc
|
||||
++ stdenv.lib.optional zlibSupport zlib;
|
||||
|
||||
C_INCLUDE_PATH = stdenv.lib.concatStringsSep ":" (map (p: "${p.dev or p}/include") buildInputs);
|
||||
LIBRARY_PATH = stdenv.lib.concatStringsSep ":" (map (p: "${p.lib or p.out or p}/lib") buildInputs);
|
||||
LD_LIBRARY_PATH = stdenv.lib.concatStringsSep ":" (map (p: "${p.lib or p.out or p}/lib")
|
||||
(stdenv.lib.filter (x : x.outPath != stdenv.cc.libc.outPath or "") buildInputs));
|
||||
C_INCLUDE_PATH = stdenv.lib.makeSearchPathOutput "dev" "include" buildInputs;
|
||||
LIBRARY_PATH = stdenv.lib.makeLibraryPath buildInputs;
|
||||
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath (stdenv.lib.filter (x : x.outPath != stdenv.cc.libc.outPath or "") buildInputs);
|
||||
|
||||
preConfigure = ''
|
||||
# hint pypy to find nix ncurses
|
||||
|
||||
@@ -53,8 +53,8 @@ let
|
||||
++ optional zlibSupport zlib;
|
||||
|
||||
mkPaths = paths: {
|
||||
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths);
|
||||
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p.lib or (p.out or p)}/lib") paths);
|
||||
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
|
||||
LIBRARY_PATH = makeLibraryPath paths;
|
||||
};
|
||||
|
||||
# Build the basic Python interpreter without modules that have
|
||||
|
||||
@@ -102,8 +102,8 @@ let
|
||||
propagatedBuildInputs = optional stdenv.isDarwin configd;
|
||||
|
||||
mkPaths = paths: {
|
||||
C_INCLUDE_PATH = concatStringsSep ":" (map (p: "${p.dev or p}/include") paths);
|
||||
LIBRARY_PATH = concatStringsSep ":" (map (p: "${p.lib or (p.out or p)}/lib") paths);
|
||||
C_INCLUDE_PATH = makeSearchPathOutput "dev" "include" paths;
|
||||
LIBRARY_PATH = makeLibraryPath paths;
|
||||
};
|
||||
|
||||
# Build the basic Python interpreter without modules that have
|
||||
|
||||
@@ -44,8 +44,8 @@ stdenv.mkDerivation {
|
||||
${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
|
||||
|
||||
configureFlagsArray=( --enable-shared --with-threads --with-wide-unicode
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
|
||||
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -46,8 +46,8 @@ stdenv.mkDerivation {
|
||||
${optionalString stdenv.isDarwin ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -msse2"''}
|
||||
|
||||
configureFlagsArray=( --enable-shared --with-threads
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
|
||||
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
|
||||
)
|
||||
'';
|
||||
|
||||
@@ -35,16 +35,16 @@ stdenv.mkDerivation {
|
||||
pythonVersion = majorVersion;
|
||||
inherit majorVersion version;
|
||||
|
||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CF configd ];
|
||||
buildInputs = optionals stdenv.isDarwin [ CF configd ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
|
||||
sha256 = "18kb5c29w04rj4gyz3jngm72sy8izfnbjlm6ajv6rv2m061d75x7";
|
||||
};
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||
NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
|
||||
|
||||
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
prePatch = optionalString stdenv.isDarwin ''
|
||||
substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
|
||||
'';
|
||||
|
||||
@@ -58,8 +58,8 @@ stdenv.mkDerivation {
|
||||
''}
|
||||
|
||||
configureFlagsArray=( --enable-shared --with-threads
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
|
||||
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
|
||||
)
|
||||
'';
|
||||
@@ -113,8 +113,8 @@ stdenv.mkDerivation {
|
||||
hierarchical packages; exception-based error handling; and very
|
||||
high level dynamic data types.
|
||||
'';
|
||||
license = stdenv.lib.licenses.psfl;
|
||||
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons chaoflow iElectric cstrahan ];
|
||||
license = licenses.psfl;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ simons chaoflow iElectric cstrahan ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -35,16 +35,16 @@ stdenv.mkDerivation {
|
||||
pythonVersion = majorVersion;
|
||||
inherit majorVersion version;
|
||||
|
||||
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CF configd ];
|
||||
buildInputs = optionals stdenv.isDarwin [ CF configd ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
|
||||
sha256 = "1j95yx32ggqx8jf13h3c8qfp34ixpyg8ipqcdjmn143d6q67rmf6";
|
||||
};
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||
NIX_LDFLAGS = optionalString stdenv.isLinux "-lgcc_s";
|
||||
|
||||
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
prePatch = optionalString stdenv.isDarwin ''
|
||||
substituteInPlace configure --replace '`/usr/bin/arch`' '"i386"'
|
||||
'';
|
||||
|
||||
@@ -58,8 +58,8 @@ stdenv.mkDerivation {
|
||||
''}
|
||||
|
||||
configureFlagsArray=( --enable-shared --with-threads
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${p.dev or p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${p.lib or (p.out or p)}/lib") buildInputs)}"
|
||||
CPPFLAGS="${concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs)}"
|
||||
LDFLAGS="${concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs)}"
|
||||
LIBS="${optionalString (!stdenv.isDarwin) "-lcrypt"} ${optionalString (ncurses != null) "-lncurses"}"
|
||||
)
|
||||
'';
|
||||
@@ -113,8 +113,8 @@ stdenv.mkDerivation {
|
||||
hierarchical packages; exception-based error handling; and very
|
||||
high level dynamic data types.
|
||||
'';
|
||||
license = stdenv.lib.licenses.psfl;
|
||||
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
||||
maintainers = with stdenv.lib.maintainers; [ simons chaoflow iElectric cstrahan ];
|
||||
license = licenses.psfl;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ simons chaoflow iElectric cstrahan ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user