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 QDkSHxFUo19pQAAA0tVLHw (envelope-from ) for ; Thu, 05 Nov 2020 01:23:29 +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 UAP7GhFUo1+uGQAAbx9fmQ (envelope-from ) for ; Thu, 05 Nov 2020 01:23:29 +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 AD9899401D0 for ; Thu, 5 Nov 2020 01:23:28 +0000 (UTC) Received: from localhost ([::1]:49642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaTzr-00018S-Gc for larch@yhetil.org; Wed, 04 Nov 2020 20:23:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaTzS-00018L-9U for guix-patches@gnu.org; Wed, 04 Nov 2020 20:23:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaTzS-0008UT-0S for guix-patches@gnu.org; Wed, 04 Nov 2020 20:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kaTzR-0005Ra-Rl for guix-patches@gnu.org; Wed, 04 Nov 2020 20:23:01 -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: Thu, 05 Nov 2020 01:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44457 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44457@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160453937420912 (code B ref -1); Thu, 05 Nov 2020 01:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Nov 2020 01:22:54 +0000 Received: from localhost ([127.0.0.1]:51047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaTzE-0005R8-PI for submit@debbugs.gnu.org; Wed, 04 Nov 2020 20:22:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:38410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaTz9-0005Qv-V4 for submit@debbugs.gnu.org; Wed, 04 Nov 2020 20:22:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaTz9-00017h-Pp for guix-patches@gnu.org; Wed, 04 Nov 2020 20:22:43 -0500 Received: from latitanza.investici.org ([82.94.249.234]:46945) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaTz5-0008RJ-3M for guix-patches@gnu.org; Wed, 04 Nov 2020 20:22:43 -0500 Received: from mx3.investici.org (unknown [127.0.0.1]) by latitanza.investici.org (Postfix) with ESMTP id 4CRQk40y3bz8sgP for ; Thu, 5 Nov 2020 01:22:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1604539356; bh=VaYS64UicGG137uNUMC9reDstUVon3uoRCbWlU4YA84=; h=To:From:Subject:Date:From; b=sti8URnV8Mas9OO5fcWgpyEpz1CB+ceI8b++HZS1sN+/A0iF9hAP6S9wzc2b/ZqaJ VLxCIV2x/ZeyS11PUmUwAMHRXZVbYoLknDkvLlB42Zqb9hitmka4n55B8ffBJ6YrN9 8EM4kN8mUv6E6gi6i4hFOP8hUytYMh+2Naq3yVoc= Received: from [82.94.249.234] (mx3.investici.org [82.94.249.234]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4CRQk32gMhz8sfr for ; Thu, 5 Nov 2020 01:22:35 +0000 (UTC) From: paul Message-ID: Date: Thu, 5 Nov 2020 02:22:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.3.3 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------410A34A94F90923DEE34E1E2" Content-Language: en-US Received-SPF: pass client-ip=82.94.249.234; envelope-from=goodoldpaul@autistici.org; helo=latitanza.investici.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 20:20:55 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.4 (--) 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" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=autistici.org header.s=stigmate header.b=sti8URnV; 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-Spam-Score: -0.01 X-TUID: rrUgWC0gv1oI This is a multi-part message in MIME format. --------------410A34A94F90923DEE34E1E2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Dear Guixers, as discussed here [0] and [1], I'm sending a patch to add a new=20 hunspell.scm file to store hunspell dictionaries and an Italian=20 dictionary. I tried to make my implementation reusable by other=20 languages by defining a function that produces dictionary packages. If there is consensus I can move other hunspell dictionaries to the new=20 file and/or convert them to use the new function. Thank you for your review. Cheers, Giacomo [0]: https://issues.guix.gnu.org/42474 [1]: https://lists.nongnu.org/archive/html/guix-devel/2020-11/msg00000.ht= ml --------------410A34A94F90923DEE34E1E2 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 e5db7d7e9c66fa105966fe88d18a40d8075b9f61 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 2a994bd3b9..510687e714 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -273,6 +273,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..1340ecee7b --- /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 gnu) + #: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 home-page licens= e) + (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 gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install ;no install target + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (hunspell (string-append out "/share/hunspell/")) + (myspell (string-append out "/share/myspell"))) + (for-each + (lambda (ext) + (install-file (string-append ,dict-name "/" ,dict-name= ext) + hunspell)) + '(".aff" ".dic")) + (symlink hunspell myspell) + #t)))) + #:tests? #f)) ; no tests + (synopsis + (string-append "Hunspell dictionary for " full-name " (" dict-name = ")")) + (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 ((home-page "https://libreitalia.org/") + (license license:gpl3)) + (hunspell-dictionary "it_IT" "Italian" + #:home-page home-page + #:license license))) --=20 2.29.1 --------------410A34A94F90923DEE34E1E2--