mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 14:57:28 +03:00
6f3630e128
derivation, the "buildInputs" in every stdenv mkDerivation don't map now directly to the environment variable "buildInputs" in the builder, but "buildNativeInputs". So, the inputs build by the native compiler. When cross compiling, they will map to the environment variable "buildInputs" (yes, now the same name), which means does to be built with the cross compiler. I think I improved the naming of variables a bit. There was a big mess, specially in the stdenv adapter for cross building, and also in the default builder script. I also tried to add proper manager of propagatedInputBuilds, these being propagated considering the host or build origin of that input build (so, at the end, being those propagatedInputBuilds being propagated properly to the native or the cross compiler. svn path=/nixpkgs/branches/stdenv-updates/; revision=18477
28 lines
564 B
Bash
28 lines
564 B
Bash
addCVars () {
|
|
if test -d $1/include; then
|
|
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$1/include"
|
|
fi
|
|
|
|
if test -d $1/lib; then
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L$1/lib"
|
|
fi
|
|
}
|
|
|
|
crossEnvHooks=(${crossEnvHooks[@]} addCVars)
|
|
|
|
# Note: these come *after* $out in the PATH (see setup.sh).
|
|
|
|
if test -n "@gcc@"; then
|
|
PATH=$PATH:@gcc@/bin
|
|
fi
|
|
|
|
if test -n "@binutils@"; then
|
|
PATH=$PATH:@binutils@/bin
|
|
fi
|
|
|
|
if test -n "@glibc@"; then
|
|
PATH=$PATH:@glibc@/bin
|
|
fi
|
|
|
|
configureFlags="$configureFlags --build=$system --host=$crossConfig"
|