2016-03-20 15:14:57 +00:00
|
|
|
{ system, bootStdenv, crossSystem, config, platform, lib, ... }:
|
|
|
|
self: super:
|
|
|
|
|
|
|
|
with super;
|
|
|
|
|
|
|
|
rec {
|
|
|
|
allStdenvs = import ../stdenv {
|
|
|
|
inherit system platform config lib;
|
2016-06-22 09:39:50 +01:00
|
|
|
allPackages = args: import ../.. ({ inherit config system; } // args);
|
2016-03-20 15:14:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
defaultStdenv = allStdenvs.stdenv // { inherit platform; };
|
|
|
|
|
|
|
|
stdenv =
|
|
|
|
if bootStdenv != null then (bootStdenv // {inherit platform;}) else
|
|
|
|
if crossSystem != null then
|
|
|
|
stdenvCross
|
|
|
|
else
|
|
|
|
let
|
|
|
|
changer = config.replaceStdenv or null;
|
|
|
|
in if changer != null then
|
|
|
|
changer {
|
|
|
|
# We import again all-packages to avoid recursivities.
|
2016-06-22 09:39:50 +01:00
|
|
|
pkgs = import ../.. {
|
2016-03-20 15:14:57 +00:00
|
|
|
# We remove packageOverrides to avoid recursivities
|
|
|
|
config = removeAttrs config [ "replaceStdenv" ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
else
|
|
|
|
defaultStdenv;
|
|
|
|
}
|