From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: services: Add dicod-service. Date: Sun, 05 Jun 2016 00:43:31 +0200 Message-ID: <87bn3gtw18.fsf@gnu.org> References: <1464969365-1593-1-git-send-email-iyzsong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9KI7-00058J-Vg for guix-devel@gnu.org; Sat, 04 Jun 2016 18:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9KI3-0005W0-B1 for guix-devel@gnu.org; Sat, 04 Jun 2016 18:43:38 -0400 In-Reply-To: <1464969365-1593-1-git-send-email-iyzsong@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Fri, 3 Jun 2016 23:56:05 +0800") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > * gnu/services/dict.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi (Various Services): Document it. Nice! I=E2=80=99ve been wanting it for some time. :-) > +@deffn {Scheme Procedure} dicod-service [#:config (dicod-configuration)] > +Return a service that runs the dicod daemon, an implementation of @command{dicod} > +DICT server. ^ Add @pxref{Dicod,,, dico, GNU Dico Manual} > The optional CONFIG argument specifies the configuration @var{config} > +for dicod, which should be a object, by default @command{dicod}, @code{} > +it serving the GNU Collaborative International Dictonary of English. s/it serving/it serves/. It would be nice to document =E2=80=98dicod-configuration=E2=80=99 with @de= ftp, as done in some other places. Also, maybe we should mention or cross-reference how to configure dico to connect to localhost, since the default is to connect elsewhere; WDYT? > + (($ name module options) > + `(" > +load-module " ,module "; > +database { > + name \"" ,name "\"; > + handler \"" ,module > + ;; append the options list using space as separator before each eleme= nt. > + ,@(fold-right (cut cons* " " <> <>) '() options) "\"; > +}\n"))) > + databases)))) Maybe (string-join (fold-right cons '() options)) instead. > +(define* (dicod-service #:key (config (dicod-configuration))) > + "Return a service that runs the dicod daemon, an implementation of > +DICT server." Use the guix.texi doc as a docstring. Thank you! Ludo=E2=80=99.