···
44
+
cachePath = lib.mkOption {
45
+
type = with lib.types; listOf str;
46
+
default = cfg.manPath;
47
+
defaultText = lib.literalExpression "config.documentation.man.mandoc.manPath";
48
+
example = lib.literalExpression "[ \"share/man\" \"share/man/fr\" ]";
50
+
Change the paths where mandoc {manpage}`makewhatis(8)`generates the
51
+
manual page index caches. {option}`documentation.man.generateCaches`
52
+
should be enabled to allow cache generation. This list should only
53
+
include the paths to manpages installed in the system configuration,
54
+
i. e. /run/current-system/sw/share/man. {manpage}`makewhatis(8)`
55
+
creates a database in each directory using the files
56
+
`mansection/[arch/]title.section` and `catsection/[arch/]title.0`
57
+
in it. If a directory contains no manual pages, no database is
58
+
created in that directory.
59
+
This option only needs to be set manually if extra paths should be
60
+
indexed or {option}`documentation.man.manPath` contains paths that
type = lib.types.package;
···
# TODO(@sternenseemman): fix symlinked directories not getting indexed,
# see: https://inbox.vuxu.org/mandoc-tech/20210906171231.GF83680@athene.usta.de/T/#e85f773c1781e3fef85562b2794f9cad7b2909a3c
extraSetup = lib.mkIf config.documentation.man.generateCaches ''
182
-
lib.concatMapStringsSep " " (path:
183
-
"$out/" + lib.escapeShellArg path
184
-
) cfg.manPath} ${lib.concatMapStringsSep " " (path:
185
-
lib.escapeShellArg path) cfg.settings.manpath
202
+
for man_path in ${lib.concatMapStringsSep " " (path: "$out/" + lib.escapeShellArg path) cfg.cachePath}
[[ -d "$man_path" ]] && ${makewhatis} -T utf8 $man_path