aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHuang Ying <huang.ying.caritas@gmail.com>2017-03-30 19:13:34 +0800
committerLudovic Courtès <ludo@gnu.org>2017-04-01 00:45:18 +0200
commit9af7ecd9591b4eff41389291bbc586dcf09e2665 (patch)
treedd36fdace6ec88b026d5a973a17b776a1c1177a9 /doc
parentbacc1d26c6e49f65b9c55296e3643999e7e8bc72 (diff)
downloadguix-9af7ecd9591b4eff41389291bbc586dcf09e2665.tar
guix-9af7ecd9591b4eff41389291bbc586dcf09e2665.tar.gz
services: dicod: Allow the configuration of "handlers".
* gnu/services/dict.scm (<dicod-configuration>)[handlers]: New field. (<dicod-handler>): New record type. (<dicod-database>): Add fields. (dicod-configuration-file): Support convert handlers and enhanced databases. configuration to config file. * doc/guix.texi (Miscellaneous Services): Update accordingly. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi52
1 files changed, 47 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 57595b95e7..ae5f04b70f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14370,25 +14370,49 @@ This is the list of IP addresses and ports and possibly socket file
names to listen to (@pxref{Server Settings, @code{listen} directive,,
dico, GNU Dico Manual}).
+@item @code{handlers} (default: @var{'()})
+List of @code{<dicod-handler>} objects denoting handlers (module instances).
+
@item @code{databases} (default: @var{(list %dicod-database:gcide)})
List of @code{<dicod-database>} objects denoting dictionaries to be served.
@end table
@end deftp
-@deftp {Data Type} dicod-database
-Data type representing a dictionary database.
+@deftp {Data Type} dicod-handler
+Data type representing a dictionary handler (module instance).
@table @asis
@item @code{name}
-Name of the database, will be used in DICT commands.
+Name of the handler (module instance).
-@item @code{module}
-Name of the dicod module used by this database
+@item @code{module} (default: @var{#f})
+Name of the dicod module of the handler (instance). If it is @code{#f},
+the module has the same name as the handler.
(@pxref{Modules,,, dico, GNU Dico Manual}).
@item @code{options}
List of strings or gexps representing the arguments for the module handler
+@end table
+@end deftp
+
+@deftp {Data Type} dicod-database
+Data type representing a dictionary database.
+
+@table @asis
+@item @code{name}
+Name of the database, will be used in DICT commands.
+
+@item @code{handler}
+Name of the dicod handler (module instance) used by this database
(@pxref{Handlers,,, dico, GNU Dico Manual}).
+
+@item @code{complex?} (default: @var{#f})
+Whether the database configuration complex. The complex configuration
+will need a corresponding @code{<dicod-handler>} object, otherwise not.
+
+@item @code{options}
+List of strings or gexps representing the arguments for the database
+(@pxref{Databases,,, dico, GNU Dico Manual}).
@end table
@end deftp
@@ -14397,6 +14421,24 @@ A @code{<dicod-database>} object serving the GNU Collaborative International
Dictonary of English using the @code{gcide} package.
@end defvr
+The following is an example @code{dicod-service} configuration.
+
+@example
+(dicod-service #:config
+ (dicod-configuration
+ (handlers (list (dicod-handler
+ (name "wordnet")
+ (module "dictorg")
+ (options
+ (list #~(string-append "dbdir=" #$wordnet))))))
+ (databases (list (dicod-database
+ (name "wordnet")
+ (complex? #t)
+ (handler "wordnet")
+ (options '("database=wn")))
+ %dicod-database:gcide))))
+@end example
+
@subsubsection Version Control
The @code{(gnu services version-control)} module provides the following services: