top-level: stdenv.cross is now only defined with host != build

In practice, this is a strictly stronger condition than target != build
as we never have build = target != host. Really, the attribute should
be removed altogether, but for now we make it work for plain libraries,
which do not care about the target platform. In the few cases where the
compilers use this and actually care about the target platform, I'll
manually change them to use `targetPlatform` instead.
This commit is contained in:
John Ericson 2017-02-11 19:07:35 -05:00
parent db5a921945
commit a7d89139ea

View File

@ -110,8 +110,8 @@ let
in {
stdenv = super.stdenv // {
inherit (buildPlatform) platform;
} // lib.optionalAttrs (targetPlatform != buildPlatform) {
cross = targetPlatform;
} // lib.optionalAttrs (hostPlatform != buildPlatform) {
cross = hostPlatform;
};
inherit (buildPlatform) system platform;
};