From a7d89139ea74791137bfa606d109e515512c8460 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 11 Feb 2017 19:07:35 -0500 Subject: [PATCH] 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. --- pkgs/top-level/stage.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index d8e190cfd4be..f6e7f41ed883 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -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; };