summary refs log tree commit diff
path: root/pkgs/stdenv/cross/default.nix
diff options
context:
space:
mode:
authorJohn Ericson <Ericson2314@Yahoo.com>2016-12-26 14:32:14 -0800
committerJohn Ericson <Ericson2314@Yahoo.com>2017-02-05 12:01:53 -0500
commit5eaea6cee01e9172ae65ccb6356861786a0f85cc (patch)
treea62918492d439f8a35e14e3348c2877f08be4a70 /pkgs/stdenv/cross/default.nix
parent3ccc139b3db8d9417006eb9deeb75038b2fc33fa (diff)
downloadnixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.tar
nixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.tar.gz
nixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.tar.bz2
nixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.tar.lz
nixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.tar.xz
nixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.tar.zst
nixpkgs-5eaea6cee01e9172ae65ccb6356861786a0f85cc.zip
cross stdenv: let build package's build deps resolve to native packages
This fixes the "sliding window" principle:
  0. Run packages:       build = native;  host = foreign; target = foreign;
  1. Build packages:     build = native;  host = native;  target = foreign;
  2. Vanilla packages:   build = native;  host = native;  target = native;
  3. Vanilla packages:   build = native;  host = native;  target = native;
  n+3. ...

Each stage's build dependencies are resolved against the previous stage,
and the "foreigns" are shifted accordingly. Vanilla packages alone are
built against themsevles, since there are no more "foreign"s to shift away.

Before, build packages' build dependencies were resolved against
themselves:
  0. Run packages:       build = native;  host = foreign; target = foreign;
  1. Build packages:     build = native;  host = native;  target = foreign;
  2. Build packages:     build = native;  host = native;  target = foreign;
  n+2. ...

This is wrong because that principle is violated by the target
platform staying foreign.

This will change the hashes of many build packages and run packages, but
that is OK. This is an unavoidable cost of fixing cross compiling.

The cross compilation docs have been updated to reflect this fix.
Diffstat (limited to 'pkgs/stdenv/cross/default.nix')
-rw-r--r--pkgs/stdenv/cross/default.nix3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix
index 37f403acee9..e322d465520 100644
--- a/pkgs/stdenv/cross/default.nix
+++ b/pkgs/stdenv/cross/default.nix
@@ -18,8 +18,7 @@ in bootStages ++ [
     hostPlatform = localSystem;
     targetPlatform = crossSystem;
     inherit config overlays;
-    # Should be false, but we're trying to preserve hashes for now
-    selfBuild = true;
+    selfBuild = false;
     # It's OK to change the built-time dependencies
     allowCustomOverrides = true;
     stdenv = vanillaPackages.stdenv // {