0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

modules.nix: Generate the extra argument set from the configuration

This allows for module arguments to be handled modularly, in particular
allowing the nixpkgs module to handle the nixpkgs import internally.
This creates the __internal option namespace, which should only be added
to by the module system itself.
This commit is contained in:
Shea Levy 2014-05-05 15:18:53 -04:00 committed by Nicolas B. Pierron
parent 4f5c6330c9
commit 1d62ad4746
3 changed files with 36 additions and 8 deletions

View file

@ -3,7 +3,7 @@
# of the virtual consoles. The latter is useful for the installation
# CD.
{ config, lib, pkgs, baseModules, ... } @ extraArgs:
{ config, lib, pkgs, baseModules, ... }:
with lib;
@ -18,7 +18,7 @@ let
eval = evalModules {
modules = [ versionModule ] ++ baseModules;
args = (removeAttrs extraArgs ["config" "options"]) // { modules = [ ]; };
args = (config.__internal.args) // { modules = [ ]; };
};
manual = import ../../../doc/manual {