top-level: Introduce targetPackages and a "double link fold"
Each bootstrapping stage ought to just depend on the previous stage, but poorly-written compilers break this elegence. This provides an easy-enough way to depend on the next stage: targetPackages. PLEASE DO NOT USE IT UNLESS YOU MUST! I'm hoping someday in a pleasant future I can revert this commit :)
This commit is contained in:
@@ -50,6 +50,14 @@
|
||||
# us to avoid expensive splicing.
|
||||
buildPackages
|
||||
|
||||
, # The package set used in the next stage. If null, `__targetPackages` will be
|
||||
# defined internally as the final produced package set itself, just like with
|
||||
# `buildPackages` and for the same reasons.
|
||||
#
|
||||
# THIS IS A HACK for compilers that don't think critically about cross-
|
||||
# compilation. Please do *not* use unless you really know what you are doing.
|
||||
__targetPackages
|
||||
|
||||
, # The standard environment to use for building packages.
|
||||
stdenv
|
||||
|
||||
@@ -88,6 +96,8 @@ let
|
||||
stdenvBootstappingAndPlatforms = self: super: {
|
||||
buildPackages = (if buildPackages == null then self else buildPackages)
|
||||
// { recurseForDerivations = false; };
|
||||
__targetPackages = (if __targetPackages == null then self else __targetPackages)
|
||||
// { recurseForDerivations = false; };
|
||||
inherit stdenv
|
||||
buildPlatform hostPlatform targetPlatform;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user