Fixing a typo. And letting stdenvCross be prioritary to the global override.

svn path=/nixpkgs/trunk/; revision=31748
This commit is contained in:
Lluís Batlle i Rossell 2012-01-21 00:26:50 +00:00
parent 2f2ce81046
commit 09fee60ee2

View File

@ -204,18 +204,19 @@ let
stdenv = stdenv =
if bootStdenv != null then (bootStdenv // {inherit platform;}) else if bootStdenv != null then (bootStdenv // {inherit platform;}) else
let if crossSystem != null then
changer = getConfig ["replaceStdenv"] null;
in if changer != null then
changer {
# We import again all-packages to avoid recursivities.
pkgs = import ./all-packages.nix {
# We remove packageOverrides to avoid recursivities
config = removeAttrs config [ "replaceStdenv" ];
};
}
else if crossSystem != null then
stdenvCross stdenvCross
else
let
changer = getConfig ["replaceStdenv"] null;
in if changer != null then
changer {
# We import again all-packages to avoid recursivities.
pkgs = import ./all-packages.nix {
# We remove packageOverrides to avoid recursivities
config = removeAttrs config [ "replaceStdenv" ];
};
}
else else
defaultStdenv; defaultStdenv;
@ -2894,7 +2895,7 @@ let
# Wrapper that works as gcc or g++ # Wrapper that works as gcc or g++
# It can be used by setting in nixpkgs config like this, for example: # It can be used by setting in nixpkgs config like this, for example:
# replaceStdenv = { pkgs }: (pkgs.ccacheStdenv "/var/ccache") # replaceStdenv = { pkgs }: (pkgs.ccacheStdenv "/var/ccache");
# But if you build in chroot, you should have that path in chroot # But if you build in chroot, you should have that path in chroot
ccacheWrapper = cacheDir: wrapGCC (ccache.links cacheDir); ccacheWrapper = cacheDir: wrapGCC (ccache.links cacheDir);
ccacheStdenv = cacheDir: overrideGCC stdenv (ccacheWrapper cacheDir); ccacheStdenv = cacheDir: overrideGCC stdenv (ccacheWrapper cacheDir);