diff options
author | John Ericson <Ericson2314@Yahoo.com> | 2016-11-27 12:37:45 -0800 |
---|---|---|
committer | John Ericson <jericson@galois.com> | 2016-11-30 19:11:03 -0500 |
commit | 39753f5360134f1aab1a949260374a876c0983eb (patch) | |
tree | 02dc06e81131d21218526443b19b96773a75896d /pkgs/stdenv/cross | |
parent | d240a0da1ab03ef8838553229b72b9b37a0ef3e7 (diff) |
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`.
Diffstat (limited to 'pkgs/stdenv/cross')
-rw-r--r-- | pkgs/stdenv/cross/default.nix | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index fcf06bcf1daf..10e2a7663563 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -1,14 +1,14 @@ -{ system, allPackages, platform, crossSystem, config, ... } @ args: +{ lib, allPackages +, system, platform, crossSystem, config +}: rec { - argClobber = { + vanillaStdenv = (import ../. { + inherit lib allPackages system platform; crossSystem = null; # Ignore custom stdenvs when cross compiling for compatability config = builtins.removeAttrs config [ "replaceStdenv" ]; - }; - vanillaStdenv = (import ../. (args // argClobber // { - allPackages = args: allPackages (argClobber // args); - })) // { + }) // { # Needed elsewhere as a hacky way to pass the target cross = crossSystem; }; |