mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
Merge pull request #269461 from Artturin/addcrossreplace
config.replaceCrossStdenv: add
This commit is contained in:
commit
124c828155
@ -10,6 +10,7 @@ let
|
||||
crossOverlays = [];
|
||||
|
||||
# Ignore custom stdenvs when cross compiling for compatibility
|
||||
# Use replaceCrossStdenv instead.
|
||||
config = builtins.removeAttrs config [ "replaceStdenv" ];
|
||||
};
|
||||
|
||||
@ -44,7 +45,8 @@ in lib.init bootStages ++ [
|
||||
inherit config;
|
||||
overlays = overlays ++ crossOverlays;
|
||||
selfBuild = false;
|
||||
stdenv = adaptStdenv (buildPackages.stdenv.override (old: rec {
|
||||
stdenv = let
|
||||
baseStdenv = adaptStdenv (buildPackages.stdenv.override (old: rec {
|
||||
buildPlatform = localSystem;
|
||||
hostPlatform = crossSystem;
|
||||
targetPlatform = crossSystem;
|
||||
@ -85,6 +87,7 @@ in lib.init bootStages ++ [
|
||||
buildPackages.updateAutotoolsGnuConfigScriptsHook
|
||||
;
|
||||
}));
|
||||
in if config ? replaceCrossStdenv then config.replaceCrossStdenv { inherit buildPackages baseStdenv; } else baseStdenv;
|
||||
})
|
||||
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user