summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2017-02-11 19:07:35 -0500
committerJohn Ericson <Ericson2314@Yahoo.com>2017-04-24 16:12:26 -0400
commita7d89139ea74791137bfa606d109e515512c8460 (patch)
tree3f4af5060d1c8f82eb64d2168114d079a4ec5f58 /pkgs
parentdb5a921945b9b2051077a6b7b708e3b1785cc3ea (diff)
downloadnixlib-a7d89139ea74791137bfa606d109e515512c8460.tar
nixlib-a7d89139ea74791137bfa606d109e515512c8460.tar.gz
nixlib-a7d89139ea74791137bfa606d109e515512c8460.tar.bz2
nixlib-a7d89139ea74791137bfa606d109e515512c8460.tar.lz
nixlib-a7d89139ea74791137bfa606d109e515512c8460.tar.xz
nixlib-a7d89139ea74791137bfa606d109e515512c8460.tar.zst
nixlib-a7d89139ea74791137bfa606d109e515512c8460.zip
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/top-level/stage.nix4
1 files 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;
   };