mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Allow imports in submodules
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
bc409a6e00
commit
d465d6764a
@ -197,9 +197,9 @@ rec {
|
||||
recurseInto = name:
|
||||
moduleMerge (addName name) (modulesOf name);
|
||||
|
||||
recurseForOption = name: modules:
|
||||
recurseForOption = name: modules: args:
|
||||
moduleMerge name (
|
||||
map unifyModuleSyntax modules
|
||||
moduleClosure modules args
|
||||
);
|
||||
|
||||
errorSource = modules:
|
||||
|
@ -82,16 +82,11 @@ rec {
|
||||
handleOptionSets = opt:
|
||||
if opt ? type && opt.type.hasOptions then
|
||||
let
|
||||
|
||||
optionConfig = vals: args:
|
||||
map (f: lib.applyIfFunction f args)
|
||||
(opt.options ++ toList vals);
|
||||
|
||||
# Evaluate sub-modules.
|
||||
subModuleMerge = path: vals:
|
||||
lib.fix (args:
|
||||
let
|
||||
result = recurseInto path (optionConfig vals args);
|
||||
result = recurseInto path (opt.options ++ toList vals) args;
|
||||
name = lib.removePrefix (opt.name + ".") path;
|
||||
extraArgs = opt.extraArgs or {};
|
||||
individualExtraArgs = opt.individualExtraArgs or {};
|
||||
|
Loading…
Reference in New Issue
Block a user