From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id ALmuCwZ4bGc3oQAAe85BDQ:P1 (envelope-from ) for ; Wed, 25 Dec 2024 21:24:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id ALmuCwZ4bGc3oQAAe85BDQ (envelope-from ) for ; Wed, 25 Dec 2024 22:24:22 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=A8MuEF5h; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Zv4eWhXn; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735161862; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/f4S8tg0Bjk8SEpxt4uPGuL9EjmqE4XdQjHAVcZ15po=; b=UWJRIMwJ+VMVavFa2lJQ4Gre/sPyZUFafq37EJ+qvZarGx0q5lyln4YSDSJP0zG0Hl6yFJ i0+G+MZsBP6xMWc2/e35serXhBiTTk0U6moMMTOBr3QKaC7tmmBQ9qE0Wbba1/EKU+hs9R QbapHIk/YDrsS8/HD7IpSvJtbDV5Cgm8NJ/ooIeJEdrbC/jwtMYhs71Y5Bs8a77toEvzmz 83D4ng9kN0NJaa8FxHd5GtRAxQaCasKnGvMSBPRQmQFOtEHvByGOh4Utiw6sZ6YZw0xhbW wZ4gLi+vsAZBVZZJxRTxN9euzdsV10GMBQCkIuC7bM5zCP53wS3dxBGCy7aMpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=A8MuEF5h; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=Zv4eWhXn; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735161862; a=rsa-sha256; cv=none; b=FUBczD6EmChP0W9ySOWqM6L7giIbZUTP4OWNpjJ/wb6bG0sbExuCdGrFPLWzkbaTLgRrhs DrikBxNihOQeW5xRz5BD1WWeToWDIIG1HU3mDEAnr215I3HoGV+gYyRjWGrcfpiTulLaEO PEG7Zi31Xg3yxY1ZTamez3L3A2f+XNVNqgftslkaSRYkbMVJ0+lGv/F7Ieb0f7sbfBYvPl 4A7T16AGnE0R7M1GxD2BPhHswvCwzU00hnrkMNEahqEkDXsyfG+d6CsLKu82doK7Q9IQfe T1OTnlEl9sA5wZ9U+Pu9rcWvD4XlPhjSjAsh1U7DbRhLgacr/cD+tHpkpd9TPA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D087743A03 for ; Wed, 25 Dec 2024 22:24:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQYrL-0001qd-Vx; Wed, 25 Dec 2024 16:24:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQYrK-0001qO-Bz for guix-patches@gnu.org; Wed, 25 Dec 2024 16:24:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQYrK-0002s9-3W for guix-patches@gnu.org; Wed, 25 Dec 2024 16:24:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=/f4S8tg0Bjk8SEpxt4uPGuL9EjmqE4XdQjHAVcZ15po=; b=A8MuEF5hNyCuoNs7Ark6n1PvUELN8Ot0t/bgXMm39trkEfCmJGrDMaCyZfOgr5jilHe5EXIfWnX8wxO/3phUxuhYZGtmct1LyEasW2VhjmTDp0glWaJdesnmkFAQxuirf+MDIHr2mVQ6ct7UP7kfmJ5jhW35Q4SLGAEkRx3JKa7+txoq8GwAZ67ookbI3I+ZDkZ/PZ/cw1i2uRcDrtTqYjH6iJW8eJsin9Y45V8Y1LfGcnOvI4R4Qze8pT2FbBfoMOBDCwwuPeKvGxvMFtl1qY5GoeoTFtdIJjxTZi1qH3Hvj1RxEB1s8pt0r+XlCglTI/7zpZ+Mg6S7i4fIgVaIhw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQYrJ-0001Pj-OB for guix-patches@gnu.org; Wed, 25 Dec 2024 16:24:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75063] [PATCH 1/2] gnu: dict: Add symbols to help users configure FreeDict with dicod. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 25 Dec 2024 21:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75063 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Runciter Cc: 75063@debbugs.gnu.org Received: via spool by 75063-submit@debbugs.gnu.org id=B75063.17351618375424 (code B ref 75063); Wed, 25 Dec 2024 21:24:01 +0000 Received: (at 75063) by debbugs.gnu.org; 25 Dec 2024 21:23:57 +0000 Received: from localhost ([127.0.0.1]:39096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQYrF-0001PP-AC for submit@debbugs.gnu.org; Wed, 25 Dec 2024 16:23:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQYrD-0001P4-Nh for 75063@debbugs.gnu.org; Wed, 25 Dec 2024 16:23:56 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQYr8-0002r0-8g; Wed, 25 Dec 2024 16:23:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=/f4S8tg0Bjk8SEpxt4uPGuL9EjmqE4XdQjHAVcZ15po=; b=Zv4eWhXntpc99q1vOe30 WxkWYSYdPy+vOp/eGDLral612GYL29fNvuEfmNaA1MqWdCE2HAJ5RzWv6tPRIHhanQU58q+QcaBqr jD1BPXDL9VdABAnVXB00S3Tp7/fssIe9fyFN8NtVLKfSbIqe/Ms0heCJBn6G8g8ohPXWoHymkA9qM GAbrYrjKU4XyEjGc/Uwir2c0B8/DTqFXtCF3jrnNda2Li9EEvPyFfp5S8QVgv7hQM/pe3F0o9sTvD dXnNnsDcJhtUUYFLkofLV9jE6r3gxMZCITYguk/pEYj0yss0ZAFh7kxlNC/dXY4eBQf/eWLxg7Xk2 1+Lcn1CBLSv0CA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <37d349728afe8f4403d7a652e02b33fc895bc02b.1735043983.git.runciter@whispers-vpn.org> (runciter@whispers-vpn.org's message of "Tue, 24 Dec 2024 13:00:45 +0000") References: <37d349728afe8f4403d7a652e02b33fc895bc02b.1735043983.git.runciter@whispers-vpn.org> Date: Wed, 25 Dec 2024 22:23:48 +0100 Message-ID: <874j2r4ftn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -5.81 X-Spam-Score: -5.81 X-Migadu-Queue-Id: D087743A03 X-TUID: 7Ox7myDewA02 Hi, Nice! I recently added FreeDict dictionaries to my own config and was contemplating the idea of having it properly integrated. Perfect. :-) FWIW, I have: --8<---------------cut here---------------start------------->8--- (define %freedict-databases (map (lambda (dictionary-name) (dicod-database (name "freedict") (handler "dictorg") (options (list #~(string-append "database=3D" #$freedict-dictionaries "/share/dictd/" #$dictionary-name))))) '("fra-eng" "eng-fra" "eng-spa" "spa-eng"))) --8<---------------cut here---------------end--------------->8--- and then: --8<---------------cut here---------------start------------->8--- (service dicod-service-type (dicod-configuration (databases (cons %dicod-database:gcide %freedict-databases)))) --8<---------------cut here---------------end--------------->8--- Runciter skribis: > * gnu/services/dict.scm: (%dictorg-handler): New variable; > (freedict-dictorg-database): new procedure; > (%freedict-dictorg-databases): new variable. > > Signed-off-by: Runciter [...] > +(define %dictorg-handler > + (dicod-handler (name "dictorg") > + (module "dictorg") > + (options (list #~(string-append "dbdir=3D/"))))) I believe we don=E2=80=99t even need that; it=E2=80=99s built-in. > +(define (freedict-dictorg-database dict-name) > + "Return a record of type @code{} that configures a > +database for the freedict multilingual dictionary named by the string > +DICT-NAME." > + (dicod-database (name (string-append "freedict-" > + dict-name)) > + (complex? #t) What does =E2=80=98complex?=E2=80=99 do actually? (Seems to work without i= t.) > * doc/guix.texi: (Dictionary Service): Update configuration example. Could you squash both commits? In general documentation goes to the same commit as the change it documents. > diff --git a/doc/guix.texi b/doc/guix.texi > index 08ffbc36d7..1a394b91b2 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -41158,13 +41158,15 @@ Miscellaneous Services > (name "wordnet") > (module "wordnet") > (options > - (list #~(string-append "wnhome=3D" #$wordnet)))))) > - (databases (list > + (list #~(string-append "wnhome=3D" #$wordnet)))) > + %dictorg-handler)) > + (databases (cons* > (dicod-database > (name "wordnet") > (complex? #t) > (handler "wordnet")) > - %dicod-database:gcide)))) > + %dicod-database:gcide > + %freedict-dictorg-databases)))) Could you also document =E2=80=98freedict-dictorg-databases=E2=80=99 and =E2=80=98%freedict-dictorg-databases=E2=80=99, similar to how =E2=80=98%dic= od-database:gcide=E2=80=99 is documented? For consistency, perhaps the these should be renamed to =E2=80=98dicod-freedict-databases=E2=80=99 and =E2=80=98%dicod-database:fre= edict=E2=80=99. Thanks in advance, Ludo=E2=80=99.