From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id CPFGJO7Zf2fnwQAAqHPOHw:P1 (envelope-from ) for ; Thu, 09 Jan 2025 14:15:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id CPFGJO7Zf2fnwQAAqHPOHw (envelope-from ) for ; Thu, 09 Jan 2025 15:15:10 +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=X2iUMwHr; dkim=fail ("headers rsa verify failed") header.d=whispers-vpn.org header.s=protonmail header.b=k913EwkE; 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=1736432110; 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=fa6euTizjjeGJs87epfb6Lp8hGiZYm6Hgv+ipcQkGDo=; b=WuXjPg7z3d50lyksdVDvvOWaFfrzGsx2y+fZV3pKevv+F/9MJ/9XT85kaU6+GpEj0d3Pmp WJOAJxoOsAUYOPYWagfWhnRTq2JVGJSkTts2vC2r6vWwzx0O45hyjKX9JeKe9SGfbI8D0K rJ1MqZftN4njf1/8AaWH6+zWiuhWef5M8eTyYPnYOBg01bysqbRPrCk2CmNpHUqbVQ38wx DlVfAg2nV78sBSViwP8XDfwRkxob4PayLPPX+ny6es+J/2SXSGgpWYdT1bE2R/78DicyEp MlEIlbtA/PbO9bz6oG+tYhY9G6O+xmdHQ6C59rod+xBQRjACkoLr9tE/ZbHf9A== 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=X2iUMwHr; dkim=fail ("headers rsa verify failed") header.d=whispers-vpn.org header.s=protonmail header.b=k913EwkE; 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=1736432110; a=rsa-sha256; cv=none; b=Z0pKyWuwCKEFxb0O6VBIJ0nmNKtDK09um5s22tapUyq+Vd2tadjg9l+tCgZhbvh6ZJxoiQ NvXvJkKp/0FQMtsvE7wSKeMOXqlch31zRGhtBKqqqv+jbeO2SAWyHS8KHY8LdWKVM3ZgNl JHanZv+T/YTlqggUCWVeUTLBwXbQWiK8gEqkfWYNJb3ONIxkHCamZ1veHkBjWQzjwQ88AN 9tp7o2RKw3dVR09fIzwXDGzKzHSixcFW59LSGF7XE+8a4MAgCSt6P2VDhqbSAEbxCp6tYU uOr6osR5UCoG83YOMuE6yAi2L1EuD9cijcV13Rq8PXvF/wRquhDnPguBtC37ww== 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 E6EAE4E49 for ; Thu, 09 Jan 2025 15:15:09 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tVtJS-00031e-My; Thu, 09 Jan 2025 09:15:06 -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 1tVtJP-0002sK-GD for guix-patches@gnu.org; Thu, 09 Jan 2025 09:15:03 -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 1tVtJP-0000zV-2w for guix-patches@gnu.org; Thu, 09 Jan 2025 09:15: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=fa6euTizjjeGJs87epfb6Lp8hGiZYm6Hgv+ipcQkGDo=; b=X2iUMwHr2cb4PximrIlgUmuXB/ajiB/efaJm2U2AcASomTCTFX4pFE7XvbPD5ckqQ7CilzbDd51d6nWXJuzPr+xxmxPMXAQ7KcYau8NP4YKRNTIko/Qyf1Gci9LQRx31NkfwU4bKTlvNdOMVBJxbBL8I2WA6f6zUEWQdQHrLWhev992nS/IbPiVMGSnd83N3LjN5ma947r9QTsYXIvkW1qrKF/MsCoXUILWlHcFMHZ8EoClW5bVqaGDziJb4CPywnHda/ftN9KFOXTZL+nLJIEb5qw+Tf7a0cHVFQ5Jou2l1cRuplw50PPHNsB6zhMGD4sjF/Rp5FYlIa4hNPHWSUQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tVtJO-0001nP-OA for guix-patches@gnu.org; Thu, 09 Jan 2025 09:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75063] [PATCH v3] 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: Thu, 09 Jan 2025 14:15: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.17364320886857 (code B ref 75063); Thu, 09 Jan 2025 14:15:02 +0000 Received: (at 75063) by debbugs.gnu.org; 9 Jan 2025 14:14:48 +0000 Received: from localhost ([127.0.0.1]:51247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tVtJ9-0001mW-4e for submit@debbugs.gnu.org; Thu, 09 Jan 2025 09:14:47 -0500 Received: from mail-4022.proton.ch ([185.70.40.22]:46081) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tVtJ4-0001m1-0O for 75063@debbugs.gnu.org; Thu, 09 Jan 2025 09:14:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=whispers-vpn.org; s=protonmail; t=1736432075; x=1736691275; bh=fa6euTizjjeGJs87epfb6Lp8hGiZYm6Hgv+ipcQkGDo=; 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=k913EwkEo+3HClSbutM7mcaK2oGoItyJaIZxn3sDR3/ibSOomNx2WSrD3WbAZ2tcb M7u72m63/pV4VnRj2hKSq7Wr3kvcJKf/Olq8VOJKGqsFkzEP3zM5oCRn+UdkJuvqHx mtlWF8cfJcpd3frbCANRw1WRvWNCu384nYCwasiMzElFonp9F0TzWC2f5OeWVBVclo Qp16y7Iz1lYbox6KplUahBr9DxRE4Fbstf9EcjaHgeNeHiNrRo+6JYwM/+SPxt/th3 0mgDpJMj6D4JpgtaLBVFXOdsgAz8fzmY8Y3VNXNHrkFQyz2+bQAuDIB2A6yJANK7IP zKvQUaZtnVokg== Date: Thu, 09 Jan 2025 14:14:31 +0000 Message-ID: <265411a8be96823102d3c66a149763033341d384.1736432061.git.runciter@whispers-vpn.org> Feedback-ID: 119317227:user:proton X-Pm-Message-ID: ec8173d1c00672c86496ba3c2fe6da9c4faae07b 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: mx12.migadu.com X-Migadu-Spam-Score: 1.03 X-Spam-Score: 1.03 X-Migadu-Queue-Id: E6EAE4E49 X-TUID: IFJkFMp/6LxO * gnu/services/dict.scm: (dicod-freedict-database): New procedure; (%dicod-databases:freedict): new variable. * doc/guix.texi: (Dictionary Service): Document them. Signed-off-by: Runciter --- doc/guix.texi | 27 ++++++++++-- gnu/services/dict.scm | 100 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 123 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 08ffbc36d7..8552c102d7 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41148,7 +41148,25 @@ 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-freedict-database dictionary-name +Returns a record of type @code{dicod-database} for purpose of +configuring a database for the FreeDict multilingual dictionary named by +@var{dictionary-name}, a string such as @code{"kur-eng"} for the +Kurdish-to-English dictionary, into a service of type +@code{dicod-service-type}. +@end deffn + +@defvar %dicod-databases:freedict +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 +41177,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-freedict-database + '("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..fef8915439 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-freedict-database + %dicod-databases:freedict)) =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-freedict-database 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-databases:freedict + (map dicod-freedict-database (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