nixpkgs/pkgs/stdenv/cross/default.nix
John Ericson 9bfd03eff7 cross stdenv adaptor: Remove ccCross binutils attrs and binutils extra buildDepends
It now has the correct wrapped tools and nothing else is needed.
2017-06-22 17:52:28 -04:00

42 lines
1 KiB
Nix

{ lib
, localSystem, crossSystem, config, overlays
}:
let
bootStages = import ../. {
inherit lib localSystem overlays;
crossSystem = null;
# Ignore custom stdenvs when cross compiling for compatability
config = builtins.removeAttrs config [ "replaceStdenv" ];
};
in bootStages ++ [
# Build Packages
(vanillaPackages: {
buildPlatform = localSystem;
hostPlatform = localSystem;
targetPlatform = crossSystem;
inherit config overlays;
selfBuild = false;
# It's OK to change the built-time dependencies
allowCustomOverrides = true;
inherit (vanillaPackages) stdenv;
})
# Run Packages
(buildPackages: {
buildPlatform = localSystem;
hostPlatform = crossSystem;
targetPlatform = crossSystem;
inherit config overlays;
selfBuild = false;
stdenv = buildPackages.makeStdenvCross
buildPackages.stdenv
crossSystem
(if crossSystem.useiOSCross or false
then buildPackages.darwin.ios-cross
else buildPackages.gccCrossStageFinal);
})
]