From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 +AC3NouedWdOJgAAqHPOHw:P1 (envelope-from ) for ; Wed, 01 Jan 2025 19:59:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id +AC3NouedWdOJgAAqHPOHw (envelope-from ) for ; Wed, 01 Jan 2025 20:59:08 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="MGBDBz/l"; dkim=fail ("headers rsa verify failed") header.d=whispers-vpn.org header.s=protonmail header.b=EH+9wGYx; 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=1735761547; h=from:from:sender:sender:reply-to: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=9OTzRdtDsToh2q6Jn2/Or+ficyLm9Fw10uyr6Ze3eUM=; b=ucVM58P+aR2wjS65oha6EAm9n3pJ3QYTM4PaULdlbTSJRVP71wXKX9UbtDYEMpIXBatLIB 2TZblouQ9oOLCxJNo44kFCK6j2SRxkHsU8miyGyawKJPeiwCnLukpENQOj58tLu30vTwQS K2vt1krH1iJSM1P3cqkOBPdzSmL7AQnwOh0rCY1DRmNQ4i9xEPWURC69bHtJ1+2M6nIFQH GJTFXqvbHViNncZzH2fdnNioAIu41nRNsWK8yP5RdkOh5WWRT30/29xAMyJrshqzyjdsMk KlS0cFLiU5tFceJs1ChXTZIvsQXPib85fAf6Qc5D7Be6wDXznoK8AGOm8JUqEA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="MGBDBz/l"; dkim=fail ("headers rsa verify failed") header.d=whispers-vpn.org header.s=protonmail header.b=EH+9wGYx; 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=1735761547; a=rsa-sha256; cv=none; b=tPb/85EOhTeJ56iM5HI/k5lx+SmJ8htwcqa2oWQzTFF38zZPGb4idd6BzoPOXR1ZtKeNsw R5OWsCs32HrOqzl9vrO6C2gjqWrbTCc4jMVLrwQgFWV8K73ylYJsOVcVKq9M8B9WO1To/A 37GmF9jYWVUvRTYWj1VSaAG4mOwMeQ7Xs7KO0vENelUHuTECqjA+NFK3fypxgkdiVKHLOx D7Wf0zpWAn0b9dX1WmSEfgrLSN/vg6xO/h848jEvMhPrREmipM/nIPTI7cxZjhoPUk1Wat He2zk9fPfTPVdtZMTbwdjWppgrtmdPkMUZRpT/arPnK23aO3GdeoVdaJNTa2JQ== 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 3F58E922CA for ; Wed, 01 Jan 2025 20:59:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tT4KE-0006cp-Pz; Wed, 01 Jan 2025 14:24:16 -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 1tT4K3-0006cS-T2 for guix-patches@gnu.org; Wed, 01 Jan 2025 14:24:05 -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 1tT4K3-000820-AJ for guix-patches@gnu.org; Wed, 01 Jan 2025 14:24:03 -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:From:Date:To:In-Reply-To:References:Subject; bh=9OTzRdtDsToh2q6Jn2/Or+ficyLm9Fw10uyr6Ze3eUM=; b=MGBDBz/lcaDNZe/i2pYI8M9fvi/mJbbNTq/f0vvOBMkWkkHqtWNNg4f/sKp466mZHkPoMIA7932KuO/7GqFL9BoajWTp3xYO7OqOwhnV0F7TNbMirM3vghVjuUNzXXP6gRIKDRjoTCFjX1e4WAlu44NCoE0jVORcvABY7zRllfQKcR//+cnC2xHDrvbmvZ7GdpBGF32g+wIzxaaxuu2kLgMAKBhrUZYQP3KSWrJpF1aq6wKPoTyAklCsAtEKTE4+JaJAXp56JTOwNe2IV/JIn+WfGMxIGEfgkrh2ZON07bRSS9+4NlZ3g8l8L4ugQyXPnOtfjZRso2b/jE4psF8Quw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tT4K2-0008V6-4W for guix-patches@gnu.org; Wed, 01 Jan 2025 14:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75063] [PATCH v2] gnu: dict: Add symbols to help users configure FreeDict with dicod. References: In-Reply-To: Resent-From: Runciter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jan 2025 19:24:02 +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: 75063@debbugs.gnu.org Cc: Runciter Received: via spool by 75063-submit@debbugs.gnu.org id=B75063.173575942032635 (code B ref 75063); Wed, 01 Jan 2025 19:24:02 +0000 Received: (at 75063) by debbugs.gnu.org; 1 Jan 2025 19:23:40 +0000 Received: from localhost ([127.0.0.1]:40485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tT4Jf-0008UJ-RF for submit@debbugs.gnu.org; Wed, 01 Jan 2025 14:23:40 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:30961) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tT4Jb-0008U0-Un for 75063@debbugs.gnu.org; Wed, 01 Jan 2025 14:23:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whispers-vpn.org; s=protonmail; t=1735759408; x=1736018608; bh=9OTzRdtDsToh2q6Jn2/Or+ficyLm9Fw10uyr6Ze3eUM=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=EH+9wGYxbLXlKHYPR3ATFYXW7y/dd53AaJq5KODqW6KuBh4EF+u93Fc7Q8zM+74Ll sm+ncYL7nc0gXUi6Erq2w7aRPeylMuZKW1vR56dqFM9H52HkWPBDsWetMcdcsk7n4B +oDFpS/I/xA9s1KATif1QKK/H6yKIPahs9HSAaIuCVR52uZN9NNTgeijmKVM36iX8W oNiUNGcgnFCco2l7fjmH6/to4THA7feSUC2L+vJFC6FaAaypJnwiWF/AjFcdCbQTey Z6WRoPZiHTGE1nCI/fxBHp6N8vwmbXY5hV4MigPjOjE/wjOA3xDUva09w9cIClVUxI ORzAfOXu+jhOA== Date: Wed, 01 Jan 2025 19:23:25 +0000 Message-ID: Feedback-ID: 119317227:user:proton X-Pm-Message-ID: 46ecf50adeae276bce650fb589b58f04eca69020 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: , Reply-to: Runciter X-ACL-Warn: , Runciter via Guix-patches From: Runciter via Guix-patches via 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: -3.50 X-Spam-Score: -3.50 X-Migadu-Queue-Id: 3F58E922CA X-TUID: YznnNqzNyO44 * gnu/services/dict.scm: (%dicod-database:freedict): New procedure; (dicod-freedict-databases): new variable. * doc/guix.texi: (Dictionary Service): Document them. Signed-off-by: Runciter --- doc/guix.texi | 25 +++++++++-- gnu/services/dict.scm | 100 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 121 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 08ffbc36d7..30ca842ea5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41148,7 +41148,23 @@ Miscellaneous Services Dictionary of English using the @code{gcide} package. @end defvar =20 -The following is an example @code{dicod-service-type} configuration. +@deffn {Procedure} %dicod-database:freedict dictionary-name +"Returns a record of type @code{dicod-database} for purpose of configuring= a +database for the FreeDict multilingual dictionary named by the string +@var{dictionary-name} into a service of type @code{dicod-service-type}." +@end deffn + +@defvar dicod-freedict-databases +A relatively large list of records of type @code{dicod-database}, made +available for users who wish to configure all the FreeDict multilingual +dictionaries provided by the @code{freedict-dictionaries} package into a +service of type @code{dicod-service-type}. +@end defvar + +The following is an example @code{dicod-service-type} configuration, +extending a @command{dicod} daemon serving databases for the wordnet and +gcide dictionaries, as well as a selection of FreeDict multilingual +dictionaries. =20 @lisp (service dicod-service-type @@ -41159,12 +41175,15 @@ Miscellaneous Services (module "wordnet") (options (list #~(string-append "wnhome=3D" #$wordnet)))))) - (databases (list + (databases (cons* (dicod-database (name "wordnet") (complex? #t) (handler "wordnet")) - %dicod-database:gcide)))) + %dicod-database:gcide + (map + %dicod-database:freedict + '("fra-eng" "eng-fra" "eng-spa" "spa-eng")))))) @end lisp =20 @cindex Docker diff --git a/gnu/services/dict.scm b/gnu/services/dict.scm index a4e25f5302..69028ab5d3 100644 --- a/gnu/services/dict.scm +++ b/gnu/services/dict.scm @@ -2,6 +2,7 @@ ;;; Copyright =C2=A9 2016 Sou Bunnbu ;;; Copyright =C2=A9 2016, 2017, 2018, 2020, 2022, 2023 Ludovic Court= =C3=A8s ;;; Copyright =C2=A9 2017 Huang Ying +;;; Copyright =C2=A9 2024 Runciter ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,7 +41,9 @@ (define-module (gnu services dict) dicod-configuration dicod-handler dicod-database - %dicod-database:gcide)) + %dicod-database:gcide + %dicod-database:freedict + dicod-freedict-databases)) =20 =0C ;;; @@ -94,6 +97,101 @@ (define %dicod-database:gcide (options (list #~(string-append "dbdir=3D" #$gcide "/share/gcide") #~(string-append "idxdir=3D" #$%dicod-gcide-index))))) =20 +(define (%dicod-database:freedict dictionary-name) + "Returns a record of type @code{dicod-database} for purpose of configuri= ng a +database for the FreeDict multilingual dictionary named by the string +@var{dictionary-name} into a service of type @code{dicod-service-type}." + (dicod-database (name (string-append "freedict-" + dictionary-name)) + (handler "dictorg") + (options (list #~(string-append "database=3D" + #$freedict-dictionaries + "/share/dictd/" + #$dictionary-name))))) + +(define dicod-freedict-databases + (map %dicod-database:freedict (list "afr-deu" + "afr-eng" + "ara-eng" + "bre-fra" + "ces-eng" + "ckb-kmr" + "cym-eng" + "dan-eng" + "deu-ita" + "deu-kur" + "deu-nld" + "deu-por" + "deu-tur" + "eng-afr" + "eng-ara" + "eng-ces" + "eng-cym" + "eng-dan" + "eng-ell" + "eng-fra" + "eng-gle" + "eng-hin" + "eng-hrv" + "eng-hun" + "eng-ita" + "eng-lat" + "eng-lit" + "eng-nld" + "eng-pol" + "eng-por" + "eng-rom" + "eng-rus" + "eng-spa" + "eng-srp" + "eng-swh" + "eng-tur" + "fra-bre" + "fra-eng" + "fra-nld" + "gla-deu" + "gle-eng" + "gle-pol" + "hrv-eng" + "hun-eng" + "isl-eng" + "ita-deu" + "ita-eng" + "jpn-deu" + "jpn-eng" + "jpn-fra" + "jpn-rus" + "kha-deu" + "kha-eng" + "kur-deu" + "kur-eng" + "kur-tur" + "lat-deu" + "lat-eng" + "lit-eng" + "mkd-bul" + "nld-deu" + "nld-eng" + "nld-fra" + "nno-nob" + "oci-cat" + "pol-gle" + "por-deu" + "por-eng" + "san-deu" + "slk-eng" + "slv-eng" + "spa-ast" + "spa-eng" + "spa-por" + "srp-eng" + "swe-eng" + "swh-eng" + "swh-pol" + "tur-deu" + "tur-eng" + "wol-fra"))) + (define %dicod-accounts (list (user-group (name "dicod") base-commit: 9dc91360fd2e41fb783ab4af341ac60aee2f5d31 --=20 2.47.1