mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
lib/modules.nix: Move comment to the actual legacy code
This commit is contained in:
parent
db08290453
commit
e162ed8a14
1 changed files with 4 additions and 3 deletions
|
@ -799,13 +799,14 @@ rec {
|
||||||
compare = a: b: (a.priority or 1000) < (b.priority or 1000);
|
compare = a: b: (a.priority or 1000) < (b.priority or 1000);
|
||||||
in sort compare defs';
|
in sort compare defs';
|
||||||
|
|
||||||
/* Hack for backward compatibility: convert options of type
|
|
||||||
optionSet to options of type submodule. FIXME: remove
|
|
||||||
eventually. */
|
|
||||||
fixupOptionType = loc: opt:
|
fixupOptionType = loc: opt:
|
||||||
let
|
let
|
||||||
options = opt.options or
|
options = opt.options or
|
||||||
(throw "Option `${showOption loc}' has type optionSet but has no option attribute, in ${showFiles opt.declarations}.");
|
(throw "Option `${showOption loc}' has type optionSet but has no option attribute, in ${showFiles opt.declarations}.");
|
||||||
|
|
||||||
|
# Hack for backward compatibility: convert options of type
|
||||||
|
# optionSet to options of type submodule. FIXME: remove
|
||||||
|
# eventually.
|
||||||
f = tp:
|
f = tp:
|
||||||
let optionSetIn = type: (tp.name == type) && (tp.functor.wrapped.name == "optionSet");
|
let optionSetIn = type: (tp.name == type) && (tp.functor.wrapped.name == "optionSet");
|
||||||
in
|
in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue