Adding a new mkDerivation flag for the cross stdenv, selfNativeBuildInput =
true/false, which tells whether the derivation needs itself as buildNativeInput. For example, in order to build cross ncurses, we need the a native build ncurses. (As libtool does not work in stdenv, I have not tested this change, to check whether finally ncurses cross-build) svn path=/nixpkgs/branches/stdenv-updates/; revision=18489
This commit is contained in:
parent
4497215410
commit
28d9e73d34
@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
|
||||
--with-shared --includedir=''${out}/include --without-debug
|
||||
${if unicode then "--enable-widec" else ""}
|
||||
'';
|
||||
|
||||
selfNativeBuildInput = true;
|
||||
|
||||
preBuild = ''sed -e "s@\([[:space:]]\)sh @\1''${SHELL} @" -i */Makefile Makefile'';
|
||||
|
||||
|
@ -111,7 +111,8 @@ rec {
|
||||
# builds.
|
||||
makeStdenvCross = stdenv: cross: binutilsCross: gccCross: stdenv //
|
||||
{ mkDerivation = {name ? "", buildInputs ? [], buildNativeInputs ? [],
|
||||
propagatedBuildInputs ? [], propagatedBuildNativeInputs ? [], ...}@args: let
|
||||
propagatedBuildInputs ? [], propagatedBuildNativeInputs ? [],
|
||||
selfNativeBuildInput ? false, ...}@args: let
|
||||
|
||||
# *BuildInputs exists temporarily as another name for
|
||||
# *HostInputs.
|
||||
@ -135,7 +136,8 @@ rec {
|
||||
stdenv.mkDerivation (args // {
|
||||
name = name + "-" + cross.config;
|
||||
buildNativeInputs = buildNativeInputsDrvs
|
||||
++ [ gccCross binutilsCross ];
|
||||
++ [ gccCross binutilsCross ] ++
|
||||
stdenv.lib.optional selfNativeBuildInput buildDrv;
|
||||
buildInputs = buildInputsDrvs;
|
||||
propagatedBuildInputs = propagatedBuildInputsDrvs;
|
||||
propagatedBuildNativeInputs = propagatedBuildNativeInputsDrvs;
|
||||
|
Loading…
Reference in New Issue
Block a user