nixpkgs/pkgs/stdenv/custom/default.nix
John Ericson 39753f5360 top-level: Close over fewer arguments for stdenv stages
This makes the flow of data easier to understand. There's little downside
because the args in question are already inspected by the stdenvs.

cross-compiling in particular is simpler because we don't need to worry
about overriding the config closed over by `allPackages`.
2016-11-30 19:11:03 -05:00

20 lines
549 B
Nix

{ lib, allPackages
, system, platform, crossSystem, config
}:
rec {
vanillaStdenv = import ../. {
inherit lib allPackages system platform crossSystem;
# Remove config.replaceStdenv to ensure termination.
config = builtins.removeAttrs config [ "replaceStdenv" ];
};
buildPackages = allPackages {
inherit system platform crossSystem config;
# It's OK to change the built-time dependencies
allowCustomOverrides = true;
stdenv = vanillaStdenv;
};
stdenvCustom = config.replaceStdenv { pkgs = buildPackages; };
}