2016-04-27 16:09:12 +01:00
|
|
|
{ system, bootStdenv, crossSystem, config, platform, lib, nixpkgsFun }:
|
2016-03-20 15:14:57 +00:00
|
|
|
|
|
|
|
rec {
|
|
|
|
allStdenvs = import ../stdenv {
|
2016-11-07 05:27:38 +00:00
|
|
|
inherit system platform config crossSystem lib;
|
|
|
|
allPackages = nixpkgsFun;
|
2016-03-20 15:14:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
defaultStdenv = allStdenvs.stdenv // { inherit platform; };
|
|
|
|
|
|
|
|
stdenv =
|
2016-11-07 05:27:38 +00:00
|
|
|
if bootStdenv != null then
|
|
|
|
(bootStdenv // { inherit platform; })
|
|
|
|
else if crossSystem == null && config ? replaceStdenv then
|
|
|
|
config.replaceStdenv {
|
|
|
|
# We import again all-packages to avoid recursivities.
|
|
|
|
pkgs = nixpkgsFun {
|
|
|
|
# We remove packageOverrides to avoid recursivities
|
|
|
|
config = removeAttrs config [ "replaceStdenv" ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else
|
|
|
|
defaultStdenv;
|
2016-03-20 15:14:57 +00:00
|
|
|
}
|