mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
lib/modules.nix: remove unused bindings
This commit is contained in:
parent
07b3a5a0dd
commit
05fc3747c9
@ -12,7 +12,6 @@ let
|
|||||||
concatStringsSep
|
concatStringsSep
|
||||||
elem
|
elem
|
||||||
filter
|
filter
|
||||||
findFirst
|
|
||||||
foldl'
|
foldl'
|
||||||
getAttrFromPath
|
getAttrFromPath
|
||||||
head
|
head
|
||||||
@ -34,7 +33,6 @@ let
|
|||||||
recursiveUpdate
|
recursiveUpdate
|
||||||
reverseList sort
|
reverseList sort
|
||||||
setAttrByPath
|
setAttrByPath
|
||||||
toList
|
|
||||||
types
|
types
|
||||||
warnIf
|
warnIf
|
||||||
zipAttrsWith
|
zipAttrsWith
|
||||||
@ -46,7 +44,6 @@ let
|
|||||||
showFiles
|
showFiles
|
||||||
showOption
|
showOption
|
||||||
unknownModule
|
unknownModule
|
||||||
literalExpression
|
|
||||||
;
|
;
|
||||||
|
|
||||||
showDeclPrefix = loc: decl: prefix:
|
showDeclPrefix = loc: decl: prefix:
|
||||||
@ -603,7 +600,6 @@ rec {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
firstNonOption = findFirst (m: !isOption m.options) "" decls;
|
|
||||||
nonOptions = filter (m: !isOption m.options) decls;
|
nonOptions = filter (m: !isOption m.options) decls;
|
||||||
in
|
in
|
||||||
throw "The option `${showOption loc}' in module `${(lib.head optionDecls)._file}' would be a parent of the following options, but its type `${(lib.head optionDecls).options.type.description or "<no description>"}' does not support nested options.\n${
|
throw "The option `${showOption loc}' in module `${(lib.head optionDecls)._file}' would be a parent of the following options, but its type `${(lib.head optionDecls).options.type.description or "<no description>"}' does not support nested options.\n${
|
||||||
@ -651,11 +647,7 @@ rec {
|
|||||||
'opts' is a list of modules. Each module has an options attribute which
|
'opts' is a list of modules. Each module has an options attribute which
|
||||||
correspond to the definition of 'loc' in 'opt.file'. */
|
correspond to the definition of 'loc' in 'opt.file'. */
|
||||||
mergeOptionDecls =
|
mergeOptionDecls =
|
||||||
let
|
loc: opts:
|
||||||
coerceOption = file: opt:
|
|
||||||
if isFunction opt then setDefaultModuleLocation file opt
|
|
||||||
else setDefaultModuleLocation file { options = opt; };
|
|
||||||
in loc: opts:
|
|
||||||
foldl' (res: opt:
|
foldl' (res: opt:
|
||||||
let t = res.type;
|
let t = res.type;
|
||||||
t' = opt.options.type;
|
t' = opt.options.type;
|
||||||
|
Loading…
Reference in New Issue
Block a user