mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 08:01:14 +00:00
295315cc87
See previous commit for what was done to `binutils` to make this possible. There were some uses of `forcedNativePackages` added. The combination of overrides with that attribute is highly spooky: it's often important that if an overridden package comes from it, the replaced arguments for that package come from it. Long term this package set and all the spookiness should be gone and irrelevant: "Move along, nothing to see here!" No hashes should be changed with this commit
46 lines
1.2 KiB
Nix
46 lines
1.2 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 = if crossSystem.useiOSCross or false
|
|
then let
|
|
inherit (buildPackages.darwin.ios-cross) cc binutils;
|
|
in buildPackages.makeStdenvCross
|
|
buildPackages.stdenv crossSystem
|
|
binutils cc
|
|
else buildPackages.makeStdenvCross
|
|
buildPackages.stdenv crossSystem
|
|
buildPackages.binutils buildPackages.gccCrossStageFinal;
|
|
})
|
|
|
|
]
|