···
else if lib.isFunction x then "<function>"
34
-
optionsListDesc = lib.flip map optionsListVisible
34
+
optionsList = lib.flip map optionsListVisible
(opt: transformOptions opt
// lib.optionalAttrs (opt ? example) { example = substFunction opt.example; }
// lib.optionalAttrs (opt ? default) { default = substFunction opt.default; }
···
in "<itemizedlist>${lib.concatStringsSep "\n" (map (p: describe (unpack p)) packages)}</itemizedlist>";
72
-
# Custom "less" that pushes up all the things ending in ".enable*"
76
-
ise = lib.hasPrefix "enable";
77
-
isp = lib.hasPrefix "package";
78
-
cmp = lib.splitByAndCompare ise lib.compare
79
-
(lib.splitByAndCompare isp lib.compare lib.compare);
80
-
in lib.compareLists cmp a.loc b.loc < 0;
# Remove invisible and internal options.
optionsListVisible = lib.filter (opt: opt.visible && !opt.internal) (lib.optionAttrSetToDocList options);
85
-
# Customly sort option list for the man page.
86
-
# Always ensure that the sort order matches sortXML.py!
87
-
optionsList = lib.sort optionLess optionsListDesc;
# Convert the list of options into an XML file.
# This file is *not* sorted sorted to save on eval time, since the docbook XML
# and the manpage depend on it and thus we evaluate this on every system rebuild.
92
-
optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsListDesc);
78
+
optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList);
optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList);