forked from mirrors/nixpkgs
lib/types, lib/modules: Remove unused extensionOffset
This commit is contained in:
parent
d4a84aeeca
commit
9dead5565a
|
@ -113,10 +113,6 @@ rec {
|
|||
args ? {}
|
||||
, # This would be remove in the future, Prefer _module.check option instead.
|
||||
check ? true
|
||||
# Internal variable to avoid `_key` collisions regardless
|
||||
# of `extendModules`. Used in `submoduleWith`.
|
||||
# Test case: lib/tests/modules, "168767"
|
||||
, extensionOffset ? 0
|
||||
}:
|
||||
let
|
||||
withWarnings = x:
|
||||
|
@ -345,17 +341,15 @@ rec {
|
|||
modules ? [],
|
||||
specialArgs ? {},
|
||||
prefix ? [],
|
||||
extensionOffset ? length modules,
|
||||
}:
|
||||
evalModules (evalModulesArgs // {
|
||||
modules = regularModules ++ modules;
|
||||
specialArgs = evalModulesArgs.specialArgs or {} // specialArgs;
|
||||
prefix = extendArgs.prefix or evalModulesArgs.prefix or [];
|
||||
inherit extensionOffset;
|
||||
});
|
||||
|
||||
type = lib.types.submoduleWith {
|
||||
inherit modules specialArgs extensionOffset;
|
||||
inherit modules specialArgs;
|
||||
};
|
||||
|
||||
result = withWarnings {
|
||||
|
|
|
@ -571,11 +571,6 @@ rec {
|
|||
, specialArgs ? {}
|
||||
, shorthandOnlyDefinesConfig ? false
|
||||
, description ? null
|
||||
|
||||
# Internal variable to avoid `_key` collisions regardless
|
||||
# of `extendModules`. Wired through by `evalModules`.
|
||||
# Test case: lib/tests/modules, "168767"
|
||||
, extensionOffset ? 0
|
||||
}@attrs:
|
||||
let
|
||||
inherit (lib.modules) evalModules;
|
||||
|
@ -623,7 +618,6 @@ rec {
|
|||
(base.extendModules {
|
||||
modules = [ { _module.args.name = last loc; } ] ++ allModules defs;
|
||||
prefix = loc;
|
||||
extensionOffset = extensionOffset + length defs;
|
||||
}).config;
|
||||
emptyValue = { value = {}; };
|
||||
getSubOptions = prefix: (base.extendModules
|
||||
|
|
Loading…
Reference in a new issue