diff options
-rw-r--r-- | doc/cross-compilation.xml | 2 | ||||
-rw-r--r-- | pkgs/stdenv/booter.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/splice.nix | 2 | ||||
-rw-r--r-- | pkgs/top-level/stage.nix | 6 |
5 files changed, 9 insertions, 9 deletions
diff --git a/doc/cross-compilation.xml b/doc/cross-compilation.xml index 77d020afa2d..9e9dd41c288 100644 --- a/doc/cross-compilation.xml +++ b/doc/cross-compilation.xml @@ -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> diff --git a/pkgs/stdenv/booter.nix b/pkgs/stdenv/booter.nix index a1055708f99..a8f8be75545 100644 --- a/pkgs/stdenv/booter.nix +++ b/pkgs/stdenv/booter.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 02a25a4333a..4f249c2349f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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"; diff --git a/pkgs/top-level/splice.nix b/pkgs/top-level/splice.nix index 44a46b7b692..b13fa86a995 100644 --- a/pkgs/top-level/splice.nix +++ b/pkgs/top-level/splice.nix @@ -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; diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 617fa0c30ce..7cddc664570 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -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; }; |