From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8DTeEMGX41+TLgAA0tVLHw (envelope-from ) for ; Wed, 23 Dec 2020 19:17:21 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sFStDMGX419/LgAAbx9fmQ (envelope-from ) for ; Wed, 23 Dec 2020 19:17:21 +0000 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 51D6A940485 for ; Wed, 23 Dec 2020 19:17:20 +0000 (UTC) Received: from localhost ([::1]:51770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ks9dO-0007k3-Tt for larch@yhetil.org; Wed, 23 Dec 2020 14:17:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ks9cA-0007jg-O1 for guix-patches@gnu.org; Wed, 23 Dec 2020 14:16:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ks9cA-0000M9-Fp for guix-patches@gnu.org; Wed, 23 Dec 2020 14:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ks9cA-00077D-9c for guix-patches@gnu.org; Wed, 23 Dec 2020 14:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44457] [PATCH]: gnu: Add hunspell-dict-it-it. Resent-From: paul Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Dec 2020 19:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44457 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 44457-submit@debbugs.gnu.org id=B44457.160875092427300 (code B ref 44457); Wed, 23 Dec 2020 19:16:02 +0000 Received: (at 44457) by debbugs.gnu.org; 23 Dec 2020 19:15:24 +0000 Received: from localhost ([127.0.0.1]:54193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ks9bT-000768-P1 for submit@debbugs.gnu.org; Wed, 23 Dec 2020 14:15:24 -0500 Received: from latitanza.investici.org ([82.94.249.234]:29999) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ks9bN-00075t-Tw for 44457@debbugs.gnu.org; Wed, 23 Dec 2020 14:15:17 -0500 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4D1NFX4yMFz8sg6; Wed, 23 Dec 2020 19:15:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1608750912; bh=sysTDyHspV+GwICmRUnpPjFQjHIcgH2awncyWzhUjfc=; h=To:Cc:References:From:Subject:Date:In-Reply-To:From; b=MhBKlDW3wHamCjTH18YKf3m5coHpCaGUECtKek8CmeYMZreNwngjL+l/ciLoF7e9S O2RU+PxchUSg3A++1boFvZUwvHbiBemLSrnt2WLEPSbJRRXcekhfEWKUbDvbH1F1cS u7E/mWw1DU1vAAJvQXXF6LQZfsb6bDVYLstsD3Ig= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4D1NFX3Bsvz8sfq; Wed, 23 Dec 2020 19:15:12 +0000 (UTC) References: <79f0de78-4d1f-7cae-3081-2581cafb51ee@autistici.org> <87tuscv62k.fsf@gnu.org> From: paul Message-ID: <9a6e026f-d5be-883f-f11b-b383ec858ec7@autistici.org> Date: Wed, 23 Dec 2020 20:15:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.6.0 MIME-Version: 1.0 In-Reply-To: <87tuscv62k.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------1FA3DAC7A3E3EDC80B69871F" Content-Language: en-US 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: , Cc: 44457@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.33 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=autistici.org header.s=stigmate header.b=MhBKlDW3; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 51D6A940485 X-Spam-Score: -1.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: GKDAUII7IlPp This is a multi-part message in MIME format. --------------1FA3DAC7A3E3EDC80B69871F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Ludo=E2=80=99 ! On 12/23/20 5:29 PM, Ludovic Court=C3=A8s wrote: > Hi! > > paul skribis: > >> From 17a476dd234fa4a128eb90ccc8ac9a565045bfa1 Mon Sep 17 00:00:00 200= 1 >> From: Giacomo Leidi >> Date: Thu, 5 Nov 2020 02:04:20 +0100 >> Subject: [PATCH] gnu: Add hunspell-dict-it-it. >> >> * gnu/packages/hunspell.scm: New file; >> (hunspell-dictionary): New variable; >> (hunspell-dict-it-it): New variable. >> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > I=E2=80=99m picking up this patch as it seems to have fallen through th= e > cracks. :-) Definitely not a problem but still thanks a lot :) > > Overall it LGTM; a couple of comments below. > > Apparently this is different from the Hunspell dictionaries made from > Aspell word lists that appear in (gnu packages aspell), right? > > Should we name the packages differently to avoid collisions with the > existing =E2=80=98hunspell-dict-*=E2=80=99 packages? We definitely can but if I understood correctly they are generated from=20 STOW wordlists [0] which seems to contain only variants of the English=20 language. Since also the Libreoffice repository contains some of those variants, I = was wondering, to achieve better consistency with future dictionaries,=20 if it's worth either - to migrate the duplicates to use (hunspell-dictionary) from (gnu=20 packages hunspell) - or just to use STOW for the English language and its variants and=20 Libreoffice dictionaries for all the supported languages I believe either way we should be able to avoid collisions, but maybe I=20 should just rename this one dictionary and, after we reach consensus, we = can always decide to change it back. What do you think? Should I move this discussion to guix-devel? >> + (synopsis >> + (string-append "Hunspell dictionary for " full-name " (" dict-na= me ")")) > This is recommended against as this prevents i18n: > > https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.h= tml I apologize about this, I attached an updated patch. Thank you for your time, Cheers Giacomo [0]: http://wordlist.aspell.net/scowl-readme/ --------------1FA3DAC7A3E3EDC80B69871F Content-Type: text/x-patch; charset=UTF-8; name="0001-gnu-Add-hunspell-dict-it-it.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-Add-hunspell-dict-it-it.patch" =46rom be2124a82d8c2902a2031e4c6d89100b9fa42168 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Thu, 5 Nov 2020 02:04:20 +0100 Subject: [PATCH] gnu: Add hunspell-dict-it-it. * gnu/packages/hunspell.scm: New file; (hunspell-dictionary): New variable; (hunspell-dict-it-it): New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/hunspell.scm | 81 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 gnu/packages/hunspell.scm diff --git a/gnu/local.mk b/gnu/local.mk index 2f267e8aee..025fe88f36 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -277,6 +277,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/packages/heads.scm \ %D%/packages/hexedit.scm \ %D%/packages/hugs.scm \ + %D%/packages/hunspell.scm \ %D%/packages/hurd.scm \ %D%/packages/hyperledger.scm \ %D%/packages/i2p.scm \ diff --git a/gnu/packages/hunspell.scm b/gnu/packages/hunspell.scm new file mode 100644 index 0000000000..e36c1b6cc9 --- /dev/null +++ b/gnu/packages/hunspell.scm @@ -0,0 +1,81 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2020 Giacomo Leidi +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages hunspell) + #:use-module (guix build-system trivial) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (ice-9 match) + #:use-module (gnu packages libreoffice)) + +(define* (hunspell-dictionary dict-name full-name #:key synopsis home-pa= ge license) + (package + (name (string-append + "hunspell-dict-" + ;; Downcase and replace underscore in package names + ;; to follow Guix naming conventions. + (string-map (match-lambda + (#\_ #\-) + (chr chr)) + (string-downcase dict-name)))) + (version (package-version libreoffice)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://anongit.freedesktop.org/git/" + "libreoffice/dictionaries.git/")) + (commit + (string-append "libreoffice-" version)))) + (file-name (git-file-name "libreoffice-dictionaries" version)) + (sha256 + (base32 "0vvxnjpm1322ahf9q8bqs1yhkn7krglw8c6yazcf7a3jljykd9k9"))= )) + (build-system trivial-build-system) + (native-inputs + `(("source" ,source))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let* ((dictionary + (string-append (assoc-ref %build-inputs "sour= ce") + "/" ,dict-name + "/" ,dict-name)) + (hunspell (string-append %output "/share/hunsp= ell/")) + (myspell (string-append %output "/share/myspel= l"))) + (for-each + (lambda (ext) + (install-file (string-append dictionary ext) + hunspell)) + '(".aff" ".dic")) + (symlink hunspell myspell) + #t)))) + (synopsis synopsis) + (description "This package provides a dictionary for the Hunspell +spell-checking library.") + (license license) + (home-page home-page))) + +(define-public hunspell-dict-it-it + (let ((synopsis identity)) + (hunspell-dictionary "it_IT" "Italian" + #:synopsis (synopsis "Hunspell dictionary for I= talian") + #:home-page "https://libreitalia.org/" + #:license license:gpl3))) --=20 2.29.2 --------------1FA3DAC7A3E3EDC80B69871F--