Rename hostDrv -> crossDrv, buildDrv -> nativeDrv
This is for consistency with terminology in stdenv (and the terms "hostDrv" and "buildDrv" are not very intuitive, even if they're consistent with GNU terminology).
This commit is contained in:
parent
f4ed8a3b91
commit
5be0a9acd7
|
@ -21,12 +21,12 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
propagatedBuildInputs = [ ncurses.hostDrv zlib.hostDrv openssl.hostDrv ];
|
propagatedBuildInputs = [ ncurses.crossDrv zlib.crossDrv openssl.crossDrv ];
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
--enable-finger --enable-html-highlight
|
--enable-finger --enable-html-highlight
|
||||||
--enable-gopher --enable-cgi --enable-bittorrent --enable-nntp
|
--enable-gopher --enable-cgi --enable-bittorrent --enable-nntp
|
||||||
--with-openssl=${openssl.hostDrv}
|
--with-openssl=${openssl.crossDrv}
|
||||||
--with-bzip2=${bzip2.hostDrv}
|
--with-bzip2=${bzip2.crossDrv}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -47,11 +47,11 @@ stdenv.mkDerivation {
|
||||||
else shell;
|
else shell;
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
shell = shell.hostDrv + shell.hostDrv.shellPath;
|
shell = shell.crossDrv + shell.crossDrv.shellPath;
|
||||||
libc = libc.hostDrv;
|
libc = libc.crossDrv;
|
||||||
coreutils = coreutils.hostDrv;
|
coreutils = coreutils.crossDrv;
|
||||||
binutils = binutils.hostDrv;
|
binutils = binutils.crossDrv;
|
||||||
clang = clang.hostDrv;
|
clang = clang.crossDrv;
|
||||||
#
|
#
|
||||||
# This is not the best way to do this. I think the reference should be
|
# This is not the best way to do this. I think the reference should be
|
||||||
# the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
|
# the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
|
||||||
|
|
|
@ -56,11 +56,11 @@ stdenv.mkDerivation ({
|
||||||
else shell;
|
else shell;
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
shell = shell.hostDrv + shell.hostDrv.shellPath;
|
shell = shell.crossDrv + shell.crossDrv.shellPath;
|
||||||
libc = libc.hostDrv;
|
libc = libc.crossDrv;
|
||||||
coreutils = coreutils.hostDrv;
|
coreutils = coreutils.crossDrv;
|
||||||
binutils = binutils.hostDrv;
|
binutils = binutils.crossDrv;
|
||||||
gcc = gcc.hostDrv;
|
gcc = gcc.crossDrv;
|
||||||
#
|
#
|
||||||
# This is not the best way to do this. I think the reference should be
|
# This is not the best way to do this. I think the reference should be
|
||||||
# the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
|
# the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
|
||||||
|
|
|
@ -189,13 +189,13 @@ stdenv.mkDerivation ({
|
||||||
configureFlags = "
|
configureFlags = "
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
${if enableMultilib then "" else "--disable-multilib"}
|
||||||
${if enableShared then "" else "--disable-shared"}
|
${if enableShared then "" else "--disable-shared"}
|
||||||
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
|
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
||||||
${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""}
|
${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""}
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
|
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.hostDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.hostDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
|
|
@ -146,7 +146,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
if (stdenv.system == "i586-pc-gnu"
|
if (stdenv.system == "i586-pc-gnu"
|
||||||
|| (libcCross != null # e.g., building `gcc.hostDrv'
|
|| (libcCross != null # e.g., building `gcc.crossDrv'
|
||||||
&& libcCross ? crossConfig
|
&& libcCross ? crossConfig
|
||||||
&& libcCross.crossConfig == "i586-pc-gnu")
|
&& libcCross.crossConfig == "i586-pc-gnu")
|
||||||
|| (cross != null && cross.config == "i586-pc-gnu"
|
|| (cross != null && cross.config == "i586-pc-gnu"
|
||||||
|
@ -277,13 +277,13 @@ stdenv.mkDerivation ({
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
${if enableMultilib then "" else "--disable-multilib"}
|
||||||
${if enableShared then "" else "--disable-shared"}
|
${if enableShared then "" else "--disable-shared"}
|
||||||
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
|
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
||||||
${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""}
|
${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""}
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
|
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.hostDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.hostDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
@ -391,7 +391,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
// optionalAttrs (cross != null || libcCross != null) {
|
// optionalAttrs (cross != null || libcCross != null) {
|
||||||
# `builder.sh' sets $CPP, which leads configure to use "gcc -E" instead of,
|
# `builder.sh' sets $CPP, which leads configure to use "gcc -E" instead of,
|
||||||
# say, "i586-pc-gnu-gcc -E" when building `gcc.hostDrv'.
|
# say, "i586-pc-gnu-gcc -E" when building `gcc.crossDrv'.
|
||||||
# FIXME: Fix `builder.sh' directly in the next stdenv-update.
|
# FIXME: Fix `builder.sh' directly in the next stdenv-update.
|
||||||
postUnpack = "unset CPP";
|
postUnpack = "unset CPP";
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
if (stdenv.isGNU
|
if (stdenv.isGNU
|
||||||
|| (libcCross != null # e.g., building `gcc.hostDrv'
|
|| (libcCross != null # e.g., building `gcc.crossDrv'
|
||||||
&& libcCross ? crossConfig
|
&& libcCross ? crossConfig
|
||||||
&& libcCross.crossConfig == "i586-pc-gnu")
|
&& libcCross.crossConfig == "i586-pc-gnu")
|
||||||
|| (crossGNU && libcCross != null))
|
|| (crossGNU && libcCross != null))
|
||||||
|
@ -327,13 +327,13 @@ stdenv.mkDerivation ({
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
${if enableMultilib then "" else "--disable-multilib"}
|
||||||
${if enableShared then "" else "--disable-shared"}
|
${if enableShared then "" else "--disable-shared"}
|
||||||
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
|
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
||||||
${if cloog != null then "--with-cloog=${cloog.hostDrv} --enable-cloog-backend=isl" else ""}
|
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
|
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.hostDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.hostDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
|
|
@ -172,7 +172,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
if (stdenv.isGNU
|
if (stdenv.isGNU
|
||||||
|| (libcCross != null # e.g., building `gcc.hostDrv'
|
|| (libcCross != null # e.g., building `gcc.crossDrv'
|
||||||
&& libcCross ? crossConfig
|
&& libcCross ? crossConfig
|
||||||
&& libcCross.crossConfig == "i586-pc-gnu")
|
&& libcCross.crossConfig == "i586-pc-gnu")
|
||||||
|| (crossGNU && libcCross != null))
|
|| (crossGNU && libcCross != null))
|
||||||
|
@ -328,13 +328,13 @@ stdenv.mkDerivation ({
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
${if enableMultilib then "" else "--disable-multilib"}
|
${if enableMultilib then "" else "--disable-multilib"}
|
||||||
${if enableShared then "" else "--disable-shared"}
|
${if enableShared then "" else "--disable-shared"}
|
||||||
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
|
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
|
||||||
${if cloog != null then "--with-cloog=${cloog.hostDrv} --enable-cloog-backend=isl" else ""}
|
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
|
||||||
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
|
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
|
||||||
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.hostDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.hostDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.hostDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
|
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags = configureFlagsFun { inherit alsaLib; };
|
configureFlags = configureFlagsFun { inherit alsaLib; };
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
configureFlags = configureFlagsFun { alsaLib = alsaLib.hostDrv; };
|
configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {inherit openglSupport;};
|
passthru = {inherit openglSupport;};
|
||||||
|
|
|
@ -71,7 +71,7 @@ stdenv.mkDerivation {
|
||||||
];
|
];
|
||||||
|
|
||||||
crossAttrs = rec {
|
crossAttrs = rec {
|
||||||
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
|
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
|
||||||
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
||||||
# override them.
|
# override them.
|
||||||
propagatedBuildInputs = buildInputs;
|
propagatedBuildInputs = buildInputs;
|
||||||
|
@ -85,7 +85,7 @@ stdenv.mkDerivation {
|
||||||
cat << EOF > user-config.jam
|
cat << EOF > user-config.jam
|
||||||
using gcc : cross : $crossConfig-g++ ;
|
using gcc : cross : $crossConfig-g++ ;
|
||||||
EOF
|
EOF
|
||||||
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ stdenv.mkDerivation {
|
||||||
installPhase = ":";
|
installPhase = ":";
|
||||||
|
|
||||||
crossAttrs = rec {
|
crossAttrs = rec {
|
||||||
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
|
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
|
||||||
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
||||||
# override them.
|
# override them.
|
||||||
propagatedBuildInputs = buildInputs;
|
propagatedBuildInputs = buildInputs;
|
||||||
|
@ -74,7 +74,7 @@ stdenv.mkDerivation {
|
||||||
cat << EOF > user-config.jam
|
cat << EOF > user-config.jam
|
||||||
using gcc : cross : $crossConfig-g++ ;
|
using gcc : cross : $crossConfig-g++ ;
|
||||||
EOF
|
EOF
|
||||||
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ stdenv.mkDerivation {
|
||||||
installPhase = ":";
|
installPhase = ":";
|
||||||
|
|
||||||
crossAttrs = rec {
|
crossAttrs = rec {
|
||||||
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
|
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
|
||||||
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
||||||
# override them.
|
# override them.
|
||||||
propagatedBuildInputs = buildInputs;
|
propagatedBuildInputs = buildInputs;
|
||||||
|
@ -84,7 +84,7 @@ stdenv.mkDerivation {
|
||||||
cat << EOF > user-config.jam
|
cat << EOF > user-config.jam
|
||||||
using gcc : cross : $crossConfig-g++ ;
|
using gcc : cross : $crossConfig-g++ ;
|
||||||
EOF
|
EOF
|
||||||
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ stdenv.mkDerivation {
|
||||||
installPhase = ":";
|
installPhase = ":";
|
||||||
|
|
||||||
crossAttrs = rec {
|
crossAttrs = rec {
|
||||||
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
|
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
|
||||||
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
||||||
# override them.
|
# override them.
|
||||||
propagatedBuildInputs = buildInputs;
|
propagatedBuildInputs = buildInputs;
|
||||||
|
@ -85,7 +85,7 @@ stdenv.mkDerivation {
|
||||||
cat << EOF > user-config.jam
|
cat << EOF > user-config.jam
|
||||||
using gcc : cross : $crossConfig-g++ ;
|
using gcc : cross : $crossConfig-g++ ;
|
||||||
EOF
|
EOF
|
||||||
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ stdenv.mkDerivation {
|
||||||
installPhase = ":";
|
installPhase = ":";
|
||||||
|
|
||||||
crossAttrs = rec {
|
crossAttrs = rec {
|
||||||
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
|
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
|
||||||
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
||||||
# override them.
|
# override them.
|
||||||
propagatedBuildInputs = buildInputs;
|
propagatedBuildInputs = buildInputs;
|
||||||
|
@ -80,7 +80,7 @@ stdenv.mkDerivation {
|
||||||
cat << EOF > user-config.jam
|
cat << EOF > user-config.jam
|
||||||
using gcc : cross : $crossConfig-g++ ;
|
using gcc : cross : $crossConfig-g++ ;
|
||||||
EOF
|
EOF
|
||||||
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crossAttrs = rec {
|
crossAttrs = rec {
|
||||||
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
|
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
|
||||||
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
|
||||||
# override them.
|
# override them.
|
||||||
propagatedBuildInputs = buildInputs;
|
propagatedBuildInputs = buildInputs;
|
||||||
|
@ -85,7 +85,7 @@ stdenv.mkDerivation {
|
||||||
cat << EOF > user-config.jam
|
cat << EOF > user-config.jam
|
||||||
using gcc : cross : $crossConfig-g++ ;
|
using gcc : cross : $crossConfig-g++ ;
|
||||||
EOF
|
EOF
|
||||||
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||||
configureFlags = "--with-ppl=${ppl}";
|
configureFlags = "--with-ppl=${ppl}";
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
configureFlags = "--with-ppl=${ppl.hostDrv}";
|
configureFlags = "--with-ppl=${ppl.crossDrv}";
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
|
@ -36,7 +36,7 @@ stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
buildInputs = stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
|
buildInputs = stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
|
||||||
stdenv.gccCross.libc.libiconv.hostDrv;
|
stdenv.gccCross.libc.libiconv.crossDrv;
|
||||||
# Gettext fails to guess the cross compiler
|
# Gettext fails to guess the cross compiler
|
||||||
configureFlags = "CXX=${stdenv.cross.config}-g++";
|
configureFlags = "CXX=${stdenv.cross.config}-g++";
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ stdenv.mkDerivation ({
|
||||||
propagatedBuildInputs = [libogg libvorbis];
|
propagatedBuildInputs = [libogg libvorbis];
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
propagatedBuildInputs = [libogg.hostDrv tremor.hostDrv];
|
propagatedBuildInputs = [libogg.crossDrv tremor.crossDrv];
|
||||||
configureFlags = "--disable-examples";
|
configureFlags = "--disable-examples";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
postInstall = "";
|
postInstall = "";
|
||||||
propagatedBuildInputs = [ ncurses.hostDrv ];
|
propagatedBuildInputs = [ ncurses.crossDrv ];
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
/* Having bzip2 will harm, because anything using elfutils
|
/* Having bzip2 will harm, because anything using elfutils
|
||||||
as buildInput cross-building, will not be able to run 'bzip2' */
|
as buildInput cross-building, will not be able to run 'bzip2' */
|
||||||
propagatedBuildInputs = [ zlib.hostDrv ];
|
propagatedBuildInputs = [ zlib.crossDrv ];
|
||||||
|
|
||||||
# This program does not cross-build fine. So I only cross-build some parts
|
# This program does not cross-build fine. So I only cross-build some parts
|
||||||
# I need for the linux perf tool.
|
# I need for the linux perf tool.
|
||||||
|
|
|
@ -11,8 +11,8 @@ let
|
||||||
basename = "gdb-7.5";
|
basename = "gdb-7.5";
|
||||||
|
|
||||||
# Whether (cross-)building for GNU/Hurd. This is an approximation since
|
# Whether (cross-)building for GNU/Hurd. This is an approximation since
|
||||||
# having `stdenv ? cross' doesn't tell us if we're building `hostDrv' and
|
# having `stdenv ? cross' doesn't tell us if we're building `crossDrv' and
|
||||||
# `buildDrv'.
|
# `nativeDrv'.
|
||||||
isGNU =
|
isGNU =
|
||||||
stdenv.system == "i686-gnu"
|
stdenv.system == "i686-gnu"
|
||||||
|| (stdenv ? cross && stdenv.cross.config == "i586-pc-gnu");
|
|| (stdenv ? cross && stdenv.cross.config == "i586-pc-gnu");
|
||||||
|
@ -51,8 +51,8 @@ stdenv.mkDerivation rec {
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
# Do not add --with-python here to avoid cross building it.
|
# Do not add --with-python here to avoid cross building it.
|
||||||
configureFlags =
|
configureFlags =
|
||||||
'' --with-gmp=${gmp.hostDrv} --with-mpfr=${mpfr.hostDrv} --with-system-readline
|
'' --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} --with-system-readline
|
||||||
--with-expat --with-libexpat-prefix=${expat.hostDrv} --without-python
|
--with-expat --with-libexpat-prefix=${expat.crossDrv} --without-python
|
||||||
'' + stdenv.lib.optionalString (target != null)
|
'' + stdenv.lib.optionalString (target != null)
|
||||||
" --target=${target.config}";
|
" --target=${target.config}";
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,7 +9,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
buildInputs = [ SDL SDL_mixer SDL_net mesa ];
|
buildInputs = [ SDL SDL_mixer SDL_net mesa ];
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
propagatedBuildInputs = [ SDL.hostDrv SDL_mixer.hostDrv SDL_net.hostDrv ];
|
propagatedBuildInputs = [ SDL.crossDrv SDL_mixer.crossDrv SDL_net.crossDrv ];
|
||||||
configureFlags = "--disable-gl --disable-cpu-opt --without-x --disable-sdltest
|
configureFlags = "--disable-gl --disable-cpu-opt --without-x --disable-sdltest
|
||||||
ac_cv_type_uid_t=yes ac_cv_type_gid_t=yes";
|
ac_cv_type_uid_t=yes ac_cv_type_gid_t=yes";
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ rec {
|
||||||
overrideDerivation = drv: f:
|
overrideDerivation = drv: f:
|
||||||
let
|
let
|
||||||
# Filter out special attributes.
|
# Filter out special attributes.
|
||||||
drop = [ "meta" "passthru" "outPath" "drvPath" "hostDrv" "buildDrv" "type" "override" "deepOverride" "origArgs" "drvAttrs" "outputName" "all" "out" ]
|
drop = [ "meta" "passthru" "outPath" "drvPath" "crossDrv" "nativeDrv" "type" "override" "deepOverride" "origArgs" "drvAttrs" "outputName" "all" "out" ]
|
||||||
# also drop functions such as .merge .override etc
|
# also drop functions such as .merge .override etc
|
||||||
++ lib.filter (n: isFunction (getAttr n drv)) (attrNames drv);
|
++ lib.filter (n: isFunction (getAttr n drv)) (attrNames drv);
|
||||||
attrs = removeAttrs drv drop;
|
attrs = removeAttrs drv drop;
|
||||||
|
@ -44,10 +44,10 @@ rec {
|
||||||
passthru = if drv ? passthru then drv.passthru else {};
|
passthru = if drv ? passthru then drv.passthru else {};
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
(if (drv ? hostDrv && drv ? buildDrv)
|
(if (drv ? crossDrv && drv ? nativeDrv)
|
||||||
then {
|
then {
|
||||||
hostDrv = overrideDerivation drv.hostDrv f;
|
crossDrv = overrideDerivation drv.crossDrv f;
|
||||||
buildDrv = overrideDerivation drv.buildDrv f;
|
nativeDrv = overrideDerivation drv.nativeDrv f;
|
||||||
}
|
}
|
||||||
else { });
|
else { });
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ let
|
||||||
inherit fetchgit stdenv autoconf libtool texinfo
|
inherit fetchgit stdenv autoconf libtool texinfo
|
||||||
glibcCross hurdPartedCross;
|
glibcCross hurdPartedCross;
|
||||||
inherit (gnu) machHeaders mig;
|
inherit (gnu) machHeaders mig;
|
||||||
libuuid = libuuid.hostDrv;
|
libuuid = libuuid.crossDrv;
|
||||||
automake = automake111x;
|
automake = automake111x;
|
||||||
headersOnly = false;
|
headersOnly = false;
|
||||||
cross = assert crossSystem != null; crossSystem;
|
cross = assert crossSystem != null; crossSystem;
|
||||||
|
@ -85,7 +85,7 @@ let
|
||||||
stdenv = (forceSystem "i686-linux").stdenv;
|
stdenv = (forceSystem "i686-linux").stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
# XXX: Use this one for its `.hostDrv'. Using the one above from
|
# XXX: Use this one for its `.crossDrv'. Using the one above from
|
||||||
# `x86_64-linux' leads to building a different cross-toolchain because of
|
# `x86_64-linux' leads to building a different cross-toolchain because of
|
||||||
# the `forceSystem'.
|
# the `forceSystem'.
|
||||||
mig_raw = callPackage ./mig {};
|
mig_raw = callPackage ./mig {};
|
||||||
|
|
|
@ -25,7 +25,7 @@ stdenv.mkDerivation {
|
||||||
postInstall =
|
postInstall =
|
||||||
# Fix the shebang to point to the cross-built shell.
|
# Fix the shebang to point to the cross-built shell.
|
||||||
'' sed -i "$out/bin/mig" \
|
'' sed -i "$out/bin/mig" \
|
||||||
-e 's|^#!/.*|#!${bash.hostDrv}/bin/sh|g'
|
-e 's|^#!/.*|#!${bash.crossDrv}/bin/sh|g'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -119,8 +119,8 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
# The substitution of crossAttrs happens *after* the stdenv cross adapter sets
|
# The substitution of crossAttrs happens *after* the stdenv cross adapter sets
|
||||||
# the parameters for the usual stdenv. Thus, we need to specify
|
# the parameters for the usual stdenv. Thus, we need to specify
|
||||||
# the ".hostDrv" in the buildInputs here.
|
# the ".crossDrv" in the buildInputs here.
|
||||||
buildInputs = lib.optional (cp.uboot != null) (ubootChooser cp.uboot).hostDrv;
|
buildInputs = lib.optional (cp.uboot != null) (ubootChooser cp.uboot).crossDrv;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -27,9 +27,9 @@ stdenv.mkDerivation {
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
/* I don't want cross-python or cross-perl -
|
/* I don't want cross-python or cross-perl -
|
||||||
I don't know if cross-python even works */
|
I don't know if cross-python even works */
|
||||||
propagatedBuildInputs = [ elfutils.hostDrv newt.hostDrv ];
|
propagatedBuildInputs = [ elfutils.crossDrv newt.crossDrv ];
|
||||||
makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-";
|
makeFlags = "CROSS_COMPILE=${stdenv.cross.config}-";
|
||||||
elfutils = elfutils.hostDrv;
|
elfutils = elfutils.crossDrv;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -17,9 +17,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
# Skip libxcrypt cross-building, as it fails for mips and arm
|
# Skip libxcrypt cross-building, as it fails for mips and arm
|
||||||
propagatedBuildInputs = [ flex.hostDrv cracklib.hostDrv ];
|
propagatedBuildInputs = [ flex.crossDrv cracklib.crossDrv ];
|
||||||
preConfigure = preConfigure + ''
|
preConfigure = preConfigure + ''
|
||||||
ar x ${flex.hostDrv}/lib/libfl.a
|
ar x ${flex.crossDrv}/lib/libfl.a
|
||||||
mv libyywrap.o libyywrap-target.o
|
mv libyywrap.o libyywrap-target.o
|
||||||
ar x ${flex}/lib/libfl.a
|
ar x ${flex}/lib/libfl.a
|
||||||
mv libyywrap.o libyywrap-host.o
|
mv libyywrap.o libyywrap-host.o
|
||||||
|
|
|
@ -22,7 +22,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
# cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cross.config}-windres";
|
# cmakeFlags = "-DWIN32=1 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${stdenv.cross.config}-windres";
|
||||||
QTDIR = qt48.hostDrv;
|
QTDIR = qt48.crossDrv;
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
|
export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -133,8 +133,8 @@ rec {
|
||||||
|
|
||||||
# In nixpkgs, sometimes 'null' gets in as a buildInputs element,
|
# In nixpkgs, sometimes 'null' gets in as a buildInputs element,
|
||||||
# and we handle that through isAttrs.
|
# and we handle that through isAttrs.
|
||||||
getBuildDrv = drv : if (builtins.isAttrs drv && drv ? buildDrv) then drv.buildDrv else drv;
|
getBuildDrv = drv : if (builtins.isAttrs drv && drv ? nativeDrv) then drv.nativeDrv else drv;
|
||||||
getHostDrv = drv : if (builtins.isAttrs drv && drv ? hostDrv) then drv.hostDrv else drv;
|
getHostDrv = drv : if (builtins.isAttrs drv && drv ? crossDrv) then drv.crossDrv else drv;
|
||||||
buildNativeInputsDrvs = map (getBuildDrv) buildNativeInputs;
|
buildNativeInputsDrvs = map (getBuildDrv) buildNativeInputs;
|
||||||
buildInputsDrvs = map (getHostDrv) buildInputs;
|
buildInputsDrvs = map (getHostDrv) buildInputs;
|
||||||
buildInputsDrvsAsBuildInputs = map (getBuildDrv) buildInputs;
|
buildInputsDrvsAsBuildInputs = map (getBuildDrv) buildInputs;
|
||||||
|
@ -145,27 +145,27 @@ rec {
|
||||||
# The base stdenv already knows that buildNativeInputs and
|
# The base stdenv already knows that buildNativeInputs and
|
||||||
# buildInputs should be built with the usual gcc-wrapper
|
# buildInputs should be built with the usual gcc-wrapper
|
||||||
# And the same for propagatedBuildInputs.
|
# And the same for propagatedBuildInputs.
|
||||||
buildDrv = stdenv.mkDerivation args;
|
nativeDrv = stdenv.mkDerivation args;
|
||||||
|
|
||||||
# Temporary expression until the cross_renaming, to handle the
|
# Temporary expression until the cross_renaming, to handle the
|
||||||
# case of pkgconfig given as buildInput, but to be used as
|
# case of pkgconfig given as buildInput, but to be used as
|
||||||
# buildNativeInput.
|
# buildNativeInput.
|
||||||
hostAsBuildDrv = drv: builtins.unsafeDiscardStringContext
|
hostAsBuildDrv = drv: builtins.unsafeDiscardStringContext
|
||||||
drv.buildDrv.drvPath == builtins.unsafeDiscardStringContext
|
drv.nativeDrv.drvPath == builtins.unsafeDiscardStringContext
|
||||||
drv.hostDrv.drvPath;
|
drv.crossDrv.drvPath;
|
||||||
buildInputsNotNull = stdenv.lib.filter
|
buildInputsNotNull = stdenv.lib.filter
|
||||||
(drv: builtins.isAttrs drv && drv ? buildDrv) buildInputs;
|
(drv: builtins.isAttrs drv && drv ? nativeDrv) buildInputs;
|
||||||
nativeInputsFromBuildInputs = stdenv.lib.filter (hostAsBuildDrv) buildInputsNotNull;
|
nativeInputsFromBuildInputs = stdenv.lib.filter (hostAsBuildDrv) buildInputsNotNull;
|
||||||
|
|
||||||
# We should overwrite the input attributes in hostDrv, to overwrite
|
# We should overwrite the input attributes in crossDrv, to overwrite
|
||||||
# the defaults for only-native builds in the base stdenv
|
# the defaults for only-native builds in the base stdenv
|
||||||
hostDrv = if (cross == null) then buildDrv else
|
crossDrv = if (cross == null) then nativeDrv else
|
||||||
stdenv.mkDerivation (args // {
|
stdenv.mkDerivation (args // {
|
||||||
name = name + "-" + cross.config;
|
name = name + "-" + cross.config;
|
||||||
buildNativeInputs = buildNativeInputsDrvs
|
buildNativeInputs = buildNativeInputsDrvs
|
||||||
++ nativeInputsFromBuildInputs
|
++ nativeInputsFromBuildInputs
|
||||||
++ [ gccCross binutilsCross ] ++
|
++ [ gccCross binutilsCross ] ++
|
||||||
stdenv.lib.optional selfBuildNativeInput buildDrv;
|
stdenv.lib.optional selfBuildNativeInput nativeDrv;
|
||||||
|
|
||||||
# Cross-linking dynamic libraries, every buildInput should
|
# Cross-linking dynamic libraries, every buildInput should
|
||||||
# be propagated because ld needs the -rpath-link to find
|
# be propagated because ld needs the -rpath-link to find
|
||||||
|
@ -178,8 +178,8 @@ rec {
|
||||||
|
|
||||||
crossConfig = cross.config;
|
crossConfig = cross.config;
|
||||||
} // (if args ? crossAttrs then args.crossAttrs else {}));
|
} // (if args ? crossAttrs then args.crossAttrs else {}));
|
||||||
in buildDrv // {
|
in nativeDrv // {
|
||||||
inherit hostDrv buildDrv;
|
inherit crossDrv nativeDrv;
|
||||||
};
|
};
|
||||||
} // {
|
} // {
|
||||||
inherit cross gccCross binutilsCross;
|
inherit cross gccCross binutilsCross;
|
||||||
|
|
|
@ -197,7 +197,7 @@ addToCrossEnv() {
|
||||||
local pkg=$1
|
local pkg=$1
|
||||||
|
|
||||||
# Some programs put important build scripts (freetype-config and similar)
|
# Some programs put important build scripts (freetype-config and similar)
|
||||||
# into their hostDrv bin path. Intentionally these should go after
|
# into their crossDrv bin path. Intentionally these should go after
|
||||||
# the nativePkgs in PATH.
|
# the nativePkgs in PATH.
|
||||||
if [ -d $1/bin ]; then
|
if [ -d $1/bin ]; then
|
||||||
addToSearchPath _PATH $1/bin
|
addToSearchPath _PATH $1/bin
|
||||||
|
|
|
@ -25,9 +25,9 @@ stdenv.mkDerivation rec {
|
||||||
inherit fontDirectories;
|
inherit fontDirectories;
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.hostDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am
|
sed -i -e 's,$(includedir)/pixman-1,${if stdenv ? cross then pixman.crossDrv else pixman}/include/pixman-1,' unix/xserver/hw/vnc/Makefile.am
|
||||||
sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.hostDrv else xkbcomp}/bin";' unix/vncserver
|
sed -i -e '/^$pidFile/a$ENV{XKB_BINDIR}="${if stdenv ? cross then xkbcomp.crossDrv else xkbcomp}/bin";' unix/vncserver
|
||||||
sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.hostDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver
|
sed -i -e '/^\$cmd \.= " -pn";/a$cmd .= " -xkbdir ${if stdenv ? cross then xkeyboard_config.crossDrv else xkeyboard_config}/etc/X11/xkb";' unix/vncserver
|
||||||
|
|
||||||
fontPath=
|
fontPath=
|
||||||
for i in $fontDirectories; do
|
for i in $fontDirectories; do
|
||||||
|
@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
buildInputs = (map (x : x.hostDrv) (buildInputs ++ [
|
buildInputs = (map (x : x.crossDrv) (buildInputs ++ [
|
||||||
fixesproto damageproto xcmiscproto bigreqsproto randrproto renderproto
|
fixesproto damageproto xcmiscproto bigreqsproto randrproto renderproto
|
||||||
fontsproto videoproto compositeproto scrnsaverproto resourceproto
|
fontsproto videoproto compositeproto scrnsaverproto resourceproto
|
||||||
libxkbfile libXfont libpciaccess xineramaproto
|
libxkbfile libXfont libpciaccess xineramaproto
|
||||||
|
|
|
@ -22,11 +22,11 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
crossAttrs = ({
|
crossAttrs = ({
|
||||||
buildInputs = [ gmp ]
|
buildInputs = [ gmp ]
|
||||||
++ stdenv.lib.optional aclSupport acl.hostDrv
|
++ stdenv.lib.optional aclSupport acl.crossDrv
|
||||||
++ stdenv.lib.optional selinuxSupport libselinux.hostDrv
|
++ stdenv.lib.optional selinuxSupport libselinux.crossDrv
|
||||||
++ stdenv.lib.optional selinuxSupport libsepol.hostDrv
|
++ stdenv.lib.optional selinuxSupport libsepol.crossDrv
|
||||||
++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
|
++ stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
|
||||||
stdenv.gccCross.libc.libiconv.hostDrv;
|
stdenv.gccCross.libc.libiconv.crossDrv;
|
||||||
|
|
||||||
# Needed for fstatfs()
|
# Needed for fstatfs()
|
||||||
# I don't know why it is not properly detected cross building with glibc.
|
# I don't know why it is not properly detected cross building with glibc.
|
||||||
|
|
|
@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
|
||||||
# We should refer to the cross built openssl
|
# We should refer to the cross built openssl
|
||||||
# For the 'urandom', maybe it should be a cross-system option
|
# For the 'urandom', maybe it should be a cross-system option
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
${if sslSupport then "--with-ssl=${openssl.hostDrv}" else "--without-ssl"}
|
${if sslSupport then "--with-ssl=${openssl.crossDrv}" else "--without-ssl"}
|
||||||
${if linkStatic then "--enable-static --disable-shared" else ""}
|
${if linkStatic then "--enable-static --disable-shared" else ""}
|
||||||
--with-random /dev/urandom
|
--with-random /dev/urandom
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
postUnpack =
|
postUnpack =
|
||||||
'' export CPATH="${bzip2.hostDrv}/include"
|
'' export CPATH="${bzip2.crossDrv}/include"
|
||||||
export NIX_CROSS_LDFLAGS="-L${bzip2.hostDrv}/lib -rpath-link ${bzip2.hostDrv}/lib $NIX_CROSS_LDFLAGS"
|
export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
|
|
|
@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
postUnpack =
|
postUnpack =
|
||||||
'' export CPATH="${bzip2.hostDrv}/include"
|
'' export CPATH="${bzip2.crossDrv}/include"
|
||||||
export NIX_CROSS_LDFLAGS="-L${bzip2.hostDrv}/lib -rpath-link ${bzip2.hostDrv}/lib $NIX_CROSS_LDFLAGS"
|
export NIX_CROSS_LDFLAGS="-L${bzip2.crossDrv}/lib -rpath-link ${bzip2.crossDrv}/lib $NIX_CROSS_LDFLAGS"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
|
|
|
@ -223,7 +223,7 @@ let
|
||||||
defaultStdenv;
|
defaultStdenv;
|
||||||
|
|
||||||
forceBuildDrv = drv : if (crossSystem == null) then drv else
|
forceBuildDrv = drv : if (crossSystem == null) then drv else
|
||||||
(drv // { hostDrv = drv.buildDrv; });
|
(drv // { crossDrv = drv.nativeDrv; });
|
||||||
|
|
||||||
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
|
# A stdenv capable of building 32-bit binaries. On x86_64-linux,
|
||||||
# it uses GCC compiled with multilib support; on i686-linux, it's
|
# it uses GCC compiled with multilib support; on i686-linux, it's
|
||||||
|
@ -1276,7 +1276,7 @@ let
|
||||||
gettext = null;
|
gettext = null;
|
||||||
readline = null;
|
readline = null;
|
||||||
devicemapper = null;
|
devicemapper = null;
|
||||||
}).hostDrv)
|
}).crossDrv)
|
||||||
{ hurd = gnu.hurdCrossIntermediate; })
|
{ hurd = gnu.hurdCrossIntermediate; })
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
|
@ -2045,7 +2045,7 @@ let
|
||||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
||||||
profiledCompiler = if stdenv.isArm then false else true;
|
profiledCompiler = if stdenv.isArm then false else true;
|
||||||
|
|
||||||
# When building `gcc.hostDrv' (a "Canadian cross", with host == target
|
# When building `gcc.crossDrv' (a "Canadian cross", with host == target
|
||||||
# and host != build), `cross' must be null but the cross-libc must still
|
# and host != build), `cross' must be null but the cross-libc must still
|
||||||
# be passed.
|
# be passed.
|
||||||
cross = null;
|
cross = null;
|
||||||
|
@ -2074,7 +2074,7 @@ let
|
||||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
||||||
profiledCompiler = if stdenv.isArm then false else true;
|
profiledCompiler = if stdenv.isArm then false else true;
|
||||||
|
|
||||||
# When building `gcc.hostDrv' (a "Canadian cross", with host == target
|
# When building `gcc.crossDrv' (a "Canadian cross", with host == target
|
||||||
# and host != build), `cross' must be null but the cross-libc must still
|
# and host != build), `cross' must be null but the cross-libc must still
|
||||||
# be passed.
|
# be passed.
|
||||||
cross = null;
|
cross = null;
|
||||||
|
@ -2101,7 +2101,7 @@ let
|
||||||
# We can enable it back some day. This makes the *gcc* builds faster now.
|
# We can enable it back some day. This makes the *gcc* builds faster now.
|
||||||
profiledCompiler = false;
|
profiledCompiler = false;
|
||||||
|
|
||||||
# When building `gcc.hostDrv' (a "Canadian cross", with host == target
|
# When building `gcc.crossDrv' (a "Canadian cross", with host == target
|
||||||
# and host != build), `cross' must be null but the cross-libc must still
|
# and host != build), `cross' must be null but the cross-libc must still
|
||||||
# be passed.
|
# be passed.
|
||||||
cross = null;
|
cross = null;
|
||||||
|
@ -3176,7 +3176,7 @@ let
|
||||||
|
|
||||||
pmccabe = callPackage ../development/tools/misc/pmccabe { };
|
pmccabe = callPackage ../development/tools/misc/pmccabe { };
|
||||||
|
|
||||||
/* Make pkgconfig always return a buildDrv, never a proper hostDrv,
|
/* Make pkgconfig always return a nativeDrv, never a proper crossDrv,
|
||||||
because most usage of pkgconfig as buildInput (inheritance of
|
because most usage of pkgconfig as buildInput (inheritance of
|
||||||
pre-cross nixpkgs) means using it using as buildNativeInput
|
pre-cross nixpkgs) means using it using as buildNativeInput
|
||||||
cross_renaming: we should make all programs use pkgconfig as
|
cross_renaming: we should make all programs use pkgconfig as
|
||||||
|
@ -3634,7 +3634,7 @@ let
|
||||||
machHeaders = null;
|
machHeaders = null;
|
||||||
hurdHeaders = null;
|
hurdHeaders = null;
|
||||||
gccCross = null;
|
gccCross = null;
|
||||||
}) // (if crossSystem != null then { hostDrv = glibc213Cross; } else {});
|
}) // (if crossSystem != null then { crossDrv = glibc213Cross; } else {});
|
||||||
|
|
||||||
glibc213Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc/2.13)
|
glibc213Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc/2.13)
|
||||||
(let crossGNU = crossSystem != null && crossSystem.config == "i586-pc-gnu";
|
(let crossGNU = crossSystem != null && crossSystem.config == "i586-pc-gnu";
|
||||||
|
@ -5583,7 +5583,7 @@ let
|
||||||
libuuid =
|
libuuid =
|
||||||
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
||||||
then (utillinux // {
|
then (utillinux // {
|
||||||
hostDrv = lib.overrideDerivation utillinux.hostDrv (args: {
|
crossDrv = lib.overrideDerivation utillinux.crossDrv (args: {
|
||||||
# `libblkid' fails to build on GNU/Hurd.
|
# `libblkid' fails to build on GNU/Hurd.
|
||||||
configureFlags = args.configureFlags
|
configureFlags = args.configureFlags
|
||||||
+ " --disable-libblkid --disable-mount --disable-libmount"
|
+ " --disable-libblkid --disable-mount --disable-libmount"
|
||||||
|
|
|
@ -5,21 +5,21 @@ let
|
||||||
/* Basic list of packages to cross-build */
|
/* Basic list of packages to cross-build */
|
||||||
basicHostDrv = {
|
basicHostDrv = {
|
||||||
gccCrossStageFinal = nativePlatforms;
|
gccCrossStageFinal = nativePlatforms;
|
||||||
bison.hostDrv = nativePlatforms;
|
bison.crossDrv = nativePlatforms;
|
||||||
busybox.hostDrv = nativePlatforms;
|
busybox.crossDrv = nativePlatforms;
|
||||||
coreutils.hostDrv = nativePlatforms;
|
coreutils.crossDrv = nativePlatforms;
|
||||||
dropbear.hostDrv = nativePlatforms;
|
dropbear.crossDrv = nativePlatforms;
|
||||||
tigervnc.hostDrv = nativePlatforms;
|
tigervnc.crossDrv = nativePlatforms;
|
||||||
#openoffice.hostDrv = nativePlatforms;
|
#openoffice.crossDrv = nativePlatforms;
|
||||||
wxGTK.hostDrv = nativePlatforms;
|
wxGTK.crossDrv = nativePlatforms;
|
||||||
#firefox = nativePlatforms;
|
#firefox = nativePlatforms;
|
||||||
xorg = {
|
xorg = {
|
||||||
#xorgserver.hostDrv = nativePlatforms;
|
#xorgserver.crossDrv = nativePlatforms;
|
||||||
};
|
};
|
||||||
nixUnstable.hostDrv = nativePlatforms;
|
nixUnstable.crossDrv = nativePlatforms;
|
||||||
linuxPackages_3_3.kernel.hostDrv = linux;
|
linuxPackages_3_3.kernel.crossDrv = linux;
|
||||||
linuxPackages_3_4.kernel.hostDrv = linux;
|
linuxPackages_3_4.kernel.crossDrv = linux;
|
||||||
linuxPackages_3_6.kernel.hostDrv = linux;
|
linuxPackages_3_6.kernel.crossDrv = linux;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Basic list of packages to be natively built,
|
/* Basic list of packages to be natively built,
|
||||||
|
@ -50,7 +50,7 @@ in {
|
||||||
crossSheevaplugLinux = mapTestOnCross crossSystem (
|
crossSheevaplugLinux = mapTestOnCross crossSystem (
|
||||||
basic //
|
basic //
|
||||||
{
|
{
|
||||||
ubootSheevaplug.hostDrv = nativePlatforms;
|
ubootSheevaplug.crossDrv = nativePlatforms;
|
||||||
});
|
});
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ in {
|
||||||
crossSheevaplugLinuxUclibc = mapTestOnCross crossSystem (
|
crossSheevaplugLinuxUclibc = mapTestOnCross crossSystem (
|
||||||
basic //
|
basic //
|
||||||
{
|
{
|
||||||
ubootSheevaplug.hostDrv = nativePlatforms;
|
ubootSheevaplug.crossDrv = nativePlatforms;
|
||||||
});
|
});
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
@ -153,14 +153,14 @@ let
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
crossMingw32 = mapTestOnCross crossSystem {
|
crossMingw32 = mapTestOnCross crossSystem {
|
||||||
coreutils.hostDrv = nativePlatforms;
|
coreutils.crossDrv = nativePlatforms;
|
||||||
boehmgc.hostDrv = nativePlatforms;
|
boehmgc.crossDrv = nativePlatforms;
|
||||||
gmp.hostDrv = nativePlatforms;
|
gmp.crossDrv = nativePlatforms;
|
||||||
guile_1_8.hostDrv = nativePlatforms;
|
guile_1_8.crossDrv = nativePlatforms;
|
||||||
libffi.hostDrv = nativePlatforms;
|
libffi.crossDrv = nativePlatforms;
|
||||||
libtool.hostDrv = nativePlatforms;
|
libtool.crossDrv = nativePlatforms;
|
||||||
libunistring.hostDrv = nativePlatforms;
|
libunistring.crossDrv = nativePlatforms;
|
||||||
windows.wxMSW.hostDrv = nativePlatforms;
|
windows.wxMSW.crossDrv = nativePlatforms;
|
||||||
};
|
};
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
@ -176,14 +176,14 @@ let
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
crossMingwW64 = mapTestOnCross crossSystem {
|
crossMingwW64 = mapTestOnCross crossSystem {
|
||||||
coreutils.hostDrv = nativePlatforms;
|
coreutils.crossDrv = nativePlatforms;
|
||||||
boehmgc.hostDrv = nativePlatforms;
|
boehmgc.crossDrv = nativePlatforms;
|
||||||
gmp.hostDrv = nativePlatforms;
|
gmp.crossDrv = nativePlatforms;
|
||||||
guile_1_8.hostDrv = nativePlatforms;
|
guile_1_8.crossDrv = nativePlatforms;
|
||||||
libffi.hostDrv = nativePlatforms;
|
libffi.crossDrv = nativePlatforms;
|
||||||
libtool.hostDrv = nativePlatforms;
|
libtool.crossDrv = nativePlatforms;
|
||||||
libunistring.hostDrv = nativePlatforms;
|
libunistring.crossDrv = nativePlatforms;
|
||||||
windows.wxMSW.hostDrv = nativePlatforms;
|
windows.wxMSW.crossDrv = nativePlatforms;
|
||||||
};
|
};
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
@ -202,34 +202,34 @@ let
|
||||||
in {
|
in {
|
||||||
crossGNU = mapTestOnCross crossSystem {
|
crossGNU = mapTestOnCross crossSystem {
|
||||||
gnu.hurdCross = nativePlatforms;
|
gnu.hurdCross = nativePlatforms;
|
||||||
gnu.mach.hostDrv = nativePlatforms;
|
gnu.mach.crossDrv = nativePlatforms;
|
||||||
gnu.mig = nativePlatforms;
|
gnu.mig = nativePlatforms;
|
||||||
gnu.smbfs.hostDrv = nativePlatforms;
|
gnu.smbfs.crossDrv = nativePlatforms;
|
||||||
|
|
||||||
coreutils.hostDrv = nativePlatforms;
|
coreutils.crossDrv = nativePlatforms;
|
||||||
ed.hostDrv = nativePlatforms;
|
ed.crossDrv = nativePlatforms;
|
||||||
grub2.hostDrv = nativePlatforms;
|
grub2.crossDrv = nativePlatforms;
|
||||||
inetutils.hostDrv = nativePlatforms;
|
inetutils.crossDrv = nativePlatforms;
|
||||||
boehmgc.hostDrv = nativePlatforms;
|
boehmgc.crossDrv = nativePlatforms;
|
||||||
findutils.hostDrv = nativePlatforms;
|
findutils.crossDrv = nativePlatforms;
|
||||||
gcc.hostDrv = nativePlatforms;
|
gcc.crossDrv = nativePlatforms;
|
||||||
gcc46.hostDrv = nativePlatforms;
|
gcc46.crossDrv = nativePlatforms;
|
||||||
gdb.hostDrv = nativePlatforms;
|
gdb.crossDrv = nativePlatforms;
|
||||||
gmp.hostDrv = nativePlatforms;
|
gmp.crossDrv = nativePlatforms;
|
||||||
gnugrep.hostDrv = nativePlatforms;
|
gnugrep.crossDrv = nativePlatforms;
|
||||||
gnumake.hostDrv = nativePlatforms;
|
gnumake.crossDrv = nativePlatforms;
|
||||||
gnused.hostDrv = nativePlatforms;
|
gnused.crossDrv = nativePlatforms;
|
||||||
guile_1_8.hostDrv = nativePlatforms;
|
guile_1_8.crossDrv = nativePlatforms;
|
||||||
guile.hostDrv = nativePlatforms;
|
guile.crossDrv = nativePlatforms;
|
||||||
libffi.hostDrv = nativePlatforms;
|
libffi.crossDrv = nativePlatforms;
|
||||||
libtool.hostDrv = nativePlatforms;
|
libtool.crossDrv = nativePlatforms;
|
||||||
libunistring.hostDrv = nativePlatforms;
|
libunistring.crossDrv = nativePlatforms;
|
||||||
lsh.hostDrv = nativePlatforms;
|
lsh.crossDrv = nativePlatforms;
|
||||||
nixUnstable.hostDrv = nativePlatforms;
|
nixUnstable.crossDrv = nativePlatforms;
|
||||||
openssl.hostDrv = nativePlatforms; # dependency of Nix
|
openssl.crossDrv = nativePlatforms; # dependency of Nix
|
||||||
patch.hostDrv = nativePlatforms;
|
patch.crossDrv = nativePlatforms;
|
||||||
samba_light.hostDrv = nativePlatforms; # needed for `runInGenericVM'
|
samba_light.crossDrv = nativePlatforms; # needed for `runInGenericVM'
|
||||||
zile.hostDrv = nativePlatforms;
|
zile.crossDrv = nativePlatforms;
|
||||||
};
|
};
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
@ -261,13 +261,13 @@ let
|
||||||
in {
|
in {
|
||||||
fuloongminipc = mapTestOnCross crossSystem {
|
fuloongminipc = mapTestOnCross crossSystem {
|
||||||
|
|
||||||
coreutils.hostDrv = nativePlatforms;
|
coreutils.crossDrv = nativePlatforms;
|
||||||
ed.hostDrv = nativePlatforms;
|
ed.crossDrv = nativePlatforms;
|
||||||
grub2.hostDrv = nativePlatforms;
|
grub2.crossDrv = nativePlatforms;
|
||||||
inetutils.hostDrv = nativePlatforms;
|
inetutils.crossDrv = nativePlatforms;
|
||||||
nixUnstable.hostDrv = nativePlatforms;
|
nixUnstable.crossDrv = nativePlatforms;
|
||||||
patch.hostDrv = nativePlatforms;
|
patch.crossDrv = nativePlatforms;
|
||||||
zile.hostDrv = nativePlatforms;
|
zile.crossDrv = nativePlatforms;
|
||||||
};
|
};
|
||||||
}) // (
|
}) // (
|
||||||
|
|
||||||
|
@ -321,20 +321,20 @@ let
|
||||||
in {
|
in {
|
||||||
nanonote = mapTestOnCross crossSystem {
|
nanonote = mapTestOnCross crossSystem {
|
||||||
|
|
||||||
coreutils.hostDrv = nativePlatforms;
|
coreutils.crossDrv = nativePlatforms;
|
||||||
ed.hostDrv = nativePlatforms;
|
ed.crossDrv = nativePlatforms;
|
||||||
inetutils.hostDrv = nativePlatforms;
|
inetutils.crossDrv = nativePlatforms;
|
||||||
nixUnstable.hostDrv = nativePlatforms;
|
nixUnstable.crossDrv = nativePlatforms;
|
||||||
patch.hostDrv = nativePlatforms;
|
patch.crossDrv = nativePlatforms;
|
||||||
zile.hostDrv = nativePlatforms;
|
zile.crossDrv = nativePlatforms;
|
||||||
prboom.hostDrv = nativePlatforms;
|
prboom.crossDrv = nativePlatforms;
|
||||||
vim.hostDrv = nativePlatforms;
|
vim.crossDrv = nativePlatforms;
|
||||||
lynx.hostDrv = nativePlatforms;
|
lynx.crossDrv = nativePlatforms;
|
||||||
patchelf.hostDrv = nativePlatforms;
|
patchelf.crossDrv = nativePlatforms;
|
||||||
nix.hostDrv = nativePlatforms;
|
nix.crossDrv = nativePlatforms;
|
||||||
fossil.hostDrv = nativePlatforms;
|
fossil.crossDrv = nativePlatforms;
|
||||||
binutils.hostDrv = nativePlatforms;
|
binutils.crossDrv = nativePlatforms;
|
||||||
mpg123.hostDrv = nativePlatforms;
|
mpg123.crossDrv = nativePlatforms;
|
||||||
yacas.hostDrv = nativePlatforms;
|
yacas.crossDrv = nativePlatforms;
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -65,7 +65,7 @@ rec {
|
||||||
|
|
||||||
/* Similar to the testOn function, but with an additional 'crossSystem'
|
/* Similar to the testOn function, but with an additional 'crossSystem'
|
||||||
* parameter for allPackages, defining the target platform for cross builds,
|
* parameter for allPackages, defining the target platform for cross builds,
|
||||||
* and triggering the build of the host derivation (cross built - hostDrv). */
|
* and triggering the build of the host derivation (cross built - crossDrv). */
|
||||||
mapTestOnCross = crossSystem: pkgs.lib.mapAttrsRecursiveCond
|
mapTestOnCross = crossSystem: pkgs.lib.mapAttrsRecursiveCond
|
||||||
(as: !(as ? type && as.type == "job"))
|
(as: !(as ? type && as.type == "job"))
|
||||||
(path: value:
|
(path: value:
|
||||||
|
|
Loading…
Reference in New Issue