diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index 8b166fb5b49f..47c61aaad818 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -70,8 +70,6 @@ let pkgs = pkgsFun ({inherit system;} // selectedCrossSystem); - inherit (pkgs.buildPackages) stdenv nukeReferences cpio binutilsCross; - glibc = pkgs.buildPackages.libcCross; bash = pkgs.bash; findutils = pkgs.findutils; @@ -126,11 +124,15 @@ rec { build = - stdenv.mkDerivation { + pkgs.buildPackages.stdenv.mkDerivation { name = "stdenv-bootstrap-tools-cross"; crossConfig = pkgs.hostPlatform.config; - buildInputs = [nukeReferences cpio binutilsCross]; + buildInputs = [ + pkgs.buildPackages.nukeReferences + pkgs.buildPackages.cpio + pkgs.buildPackages.binutils + ]; buildCommand = '' set -x @@ -261,7 +263,7 @@ rec { allowedReferences = []; }; - dist = stdenv.mkDerivation { + dist = pkgs.buildPackages.stdenv.mkDerivation { name = "stdenv-bootstrap-tools-cross"; buildCommand = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5da33b382446..a351284632bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6336,10 +6336,13 @@ with pkgs; binutils = if stdenv.isDarwin then darwin.binutils else binutils-raw; - binutils-raw = callPackage ../development/tools/misc/binutils { inherit noSysDirs; }; + binutils-raw = callPackage ../development/tools/misc/binutils { + # FHS sys dirs presumably only have stuff for the build platform + noSysDirs = (targetPlatform != buildPlatform) || noSysDirs; + cross = if targetPlatform != hostPlatform then targetPlatform else null; + }; - binutils_nogold = lowPrio (callPackage ../development/tools/misc/binutils { - inherit noSysDirs; + binutils_nogold = lowPrio (binutils-raw.override { gold = false; });