summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-19 20:24:43 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-09-20 00:59:19 -0400
commite19bb868dc55265cf99bb00ab542f96110b9cf6e (patch)
tree1c0ff813b7a4ffb38cb02ba8a9f77fa84ae634b8
parent100db4fa3b3ba5906350fb1d5f157e0a3a3b2ef1 (diff)
downloadnixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.tar
nixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.tar.gz
nixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.tar.bz2
nixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.tar.lz
nixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.tar.xz
nixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.tar.zst
nixlib-e19bb868dc55265cf99bb00ab542f96110b9cf6e.zip
all-packages: Remove `forcedNativePackages`; we no longer need it
Its kept around in the Hurd package set, but all that code is
presumably broken.
-rw-r--r--pkgs/os-specific/gnu/default.nix11
-rw-r--r--pkgs/top-level/all-packages.nix17
2 files changed, 13 insertions, 15 deletions
diff --git a/pkgs/os-specific/gnu/default.nix b/pkgs/os-specific/gnu/default.nix
index 247c73e468d0..fb3796394e81 100644
--- a/pkgs/os-specific/gnu/default.nix
+++ b/pkgs/os-specific/gnu/default.nix
@@ -3,15 +3,22 @@
 args@{ fetchgit, stdenv, autoconf, automake, automake111x, libtool
 , texinfo, glibcCross, hurdPartedCross, libuuid, samba
 , gccCrossStageStatic, gccCrossStageFinal
-, forcedNativePackages, forceSystem, newScope, platform, config
+, forceSystem, newScope, platform, config
 , targetPlatform, buildPlatform
-, overrides ? {} }:
+, overrides ? {}
+, buildPackages, pkgs
+}:
 
 with args;
 
 let
   callPackage = newScope gnu;
 
+  forcedNativePackages =
+    if stdenv.hostPlatform == stdenv.buildPlatform
+    then pkgs
+    else buildPackages;
+
   gnu = {
     hurdCross = forcedNativePackages.callPackage ./hurd {
       inherit fetchgit stdenv autoconf libtool texinfo
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 068fa3230d63..311b6c85df48 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -29,8 +29,6 @@ with pkgs;
 
   callPackage_i686 = pkgsi686Linux.callPackage;
 
-  forcedNativePackages = if hostPlatform == buildPlatform then pkgs else buildPackages;
-
   # A stdenv capable of building 32-bit binaries.  On x86_64-linux,
   # it uses GCC compiled with multilib support; on i686-linux, it's
   # just the plain stdenv.
@@ -5428,34 +5426,27 @@ with pkgs;
       else if targetPlatform.libc == "libSystem" then darwin.xcode
       else null;
     in wrapCCCross {
-      cc = forcedNativePackages.gcc.cc.override {
+      cc = gcc.cc.override {
         crossStageStatic = true;
         langCC = false;
         libcCross = libcCross1;
         enableShared = false;
         # Why is this needed?
-        inherit (forcedNativePackages) binutils;
       };
       libc = libcCross1;
-      inherit (forcedNativePackages) binutils;
   };
 
   # Only needed for mingw builds
   gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapCCCross {
     cc = gccCrossStageStatic.gcc;
     libc = windows.mingw_headers2;
-    inherit (forcedNativePackages) binutils;
   };
 
   gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapCCCross {
-    cc = forcedNativePackages.gcc.cc.override {
+    cc = gcc.cc.override {
       crossStageStatic = false;
-
-      # Why is this needed?
-      inherit (forcedNativePackages) binutils;
     };
     libc = libcCross;
-    inherit (forcedNativePackages) binutils;
   };
 
   gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 {
@@ -6232,7 +6223,7 @@ with pkgs;
   wrapCCCross =
     {cc, libc, binutils, name ? "gcc-cross-wrapper"}:
 
-    forcedNativePackages.ccWrapperFun {
+    ccWrapperFun {
       nativeTools = false;
       nativeLibc = false;
       noLibc = (libc == null);
@@ -7334,7 +7325,7 @@ with pkgs;
      cross_renaming: we should make all programs use pkgconfig as
      nativeBuildInput after the renaming.
      */
-  pkgconfig = forcedNativePackages.callPackage ../development/tools/misc/pkgconfig {
+  pkgconfig = callPackage ../development/tools/misc/pkgconfig {
     fetchurl = fetchurlBoot;
   };
   pkgconfigUpstream = lowPrio (pkgconfig.override { vanilla = true; });