3
0
Fork 0
forked from mirrors/nixpkgs

Rename __targetPackages to targetPackages

This commit is contained in:
John Ericson 2017-10-31 10:50:08 -04:00
parent a8f3d7215c
commit 5ae8f18f4d
5 changed files with 9 additions and 9 deletions

View file

@ -184,7 +184,7 @@
For now, feel free to use either method.
</para>
<note><para>
There is also a "backlink" <varname>__targetPackages</varname>, yielding a package set whose <varname>buildPackages</varname> is the current package set.
There is also a "backlink" <varname>targetPackages</varname>, yielding a package set whose <varname>buildPackages</varname> is the current package set.
This is a hack, though, to accommodate compilers with lousy build systems.
Please do not use this unless you are absolutely sure you are packaging such a compiler and there is no other way.
</para></note>

View file

@ -98,7 +98,7 @@ stageFuns: let
then args'
else allPackages ((builtins.removeAttrs args' ["selfBuild"]) // {
buildPackages = if args.selfBuild or true then null else prevStage;
__targetPackages = if args.selfBuild or true then null else nextStage;
targetPackages = if args.selfBuild or true then null else nextStage;
});
in dfold folder {} {} withAllowCustomOverrides

View file

@ -5527,7 +5527,7 @@ with pkgs;
# built with, and use, that cross-compiled libc.
gccCrossStageStatic = assert targetPlatform != buildPlatform; let
libcCross1 =
if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers
if targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers
else if targetPlatform.libc == "libSystem" then darwin.xcode
else null;
in wrapCCWith {
@ -8328,9 +8328,9 @@ with pkgs;
libcCrossChooser = name:
# libc is hackily often used from the previous stage. This `or`
# hack fixes the hack, *sigh*.
/**/ if name == "glibc" then __targetPackages.glibcCross or glibcCross
/**/ if name == "glibc" then targetPackages.glibcCross or glibcCross
else if name == "uclibc" then uclibcCross
else if name == "msvcrt" then __targetPackages.windows.mingw_w64 or windows.mingw_w64
else if name == "msvcrt" then targetPackages.windows.mingw_w64 or windows.mingw_w64
else if name == "libSystem" then darwin.xcode
else throw "Unknown libc";

View file

@ -67,7 +67,7 @@ let
if actuallySplice
then splicer defaultBuildScope defaultRunScope // {
# These should never be spliced under any circumstances
inherit (pkgs) pkgs buildPackages __targetPackages
inherit (pkgs) pkgs buildPackages targetPackages
buildPlatform targetPlatform hostPlatform;
}
else pkgs // pkgs.xorg;

View file

@ -26,13 +26,13 @@
# us to avoid expensive splicing.
buildPackages
, # The package set used in the next stage. If null, `__targetPackages` will be
, # 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
targetPackages
, # The standard environment to use for building packages.
stdenv
@ -72,7 +72,7 @@ let
stdenvBootstappingAndPlatforms = self: super: {
buildPackages = (if buildPackages == null then self else buildPackages)
// { recurseForDerivations = false; };
__targetPackages = (if __targetPackages == null then self else __targetPackages)
targetPackages = (if targetPackages == null then self else targetPackages)
// { recurseForDerivations = false; };
inherit stdenv;
};