[PATCH] gnu: Add hunspell-en-US.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Ludovic Courtès
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 7 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kkebreau@posteo.net)
20171031144750.14587-1-kkebreau@posteo.net
* gnu/packages/dictionaries.scm (hunspell-en-US): New variable.
---
gnu/packages/dictionaries.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 062c29b66..0cc7df394 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -252,3 +253,39 @@ translator powered by Google Translate (default), Bing Translator,
Yandex.Translate and Apertium. It gives you easy access to one of these
translation engines from your terminal.")
(license public-domain)))
+
+(define-public hunspell-en-US
+ (package
+ (name "hunspell-en-US")
+ (version "2017.01.22")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://launchpad.net/hunspell-en_US/trunk/"
+ version "/+download/hunspell-en_US-" version
+ ".zip"))
+ (sha256
+ (base32
+ "0svc3m09vz7q37481a0lrf6j2raw65zqg6lazic06s7f1vc6h92i"))))
+ (build-system trivial-build-system)
+ (arguments
+ '(#:builder (begin
+ (use-modules (guix build utils))
+
+ (let* ((dict (assoc-ref %build-inputs "source"))
+ (out (assoc-ref %outputs "out"))
+ (share (string-append out "/share/hunspell"))
+ (unzip (string-append
+ (assoc-ref %build-inputs "unzip")
+ "/bin/unzip")))
+ (mkdir-p share)
+ (zero? (system* unzip dict "-d" share))))
+ #:modules ((guix build utils))))
+ (native-inputs
+ `(("source" ,source)
+ ("unzip" ,unzip)))
+ (home-page "http://wordlist.aspell.net/")
+ (synopsis "American English dictionary for use with hunspell")
+ (description
+ "This is an American English dictionary for use with the hunspell spell
+checker.")
+ (license (non-copyleft "file://README_en_US.txt"))))
--
2.14.3
Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 29079@debbugs.gnu.org)
87shdsmobm.fsf@gnu.org
Hi Kei,

Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/dictionaries.scm (hunspell-en-US): New variable.

On the same day I added this one and a couple of other dictionaries:


The package I committed builds the Hunspell list “from source”.

Let me know whether we should adjust things and what you think of it.

Thanks!

Ludo’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29079@debbugs.gnu.org)
87y3nivjjq.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (18 lines)
> Hi Kei,
>
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> * gnu/packages/dictionaries.scm (hunspell-en-US): New variable.
>
> On the same day I added this one and a couple of other dictionaries:
>
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=085bcca313c3827f7c56e7c345d4606588db9085
>
> The package I committed builds the Hunspell list “from source”.
>
> Let me know whether we should adjust things and what you think of it.
>
> Thanks!
>
> Ludo’.

I definitely like the generality and flexibility of this patch
better. To get the dictionary to work in LibreOffice I had to install
the .dic file as well [0], but once I did that everything seemed to work
as expected.

[0]:
(mkdir-p myspell)
+ (install-file ,(string-append "speller/" language ".dic")
+ hunspell)
(install-file ,(string-append "speller/" language ".aff")
hunspell)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAloBLEkACgkQ5qXuPBlG
eg02UA//XJcSF7xIIjNs9jr3DV9Qgxq2irRFp+6Hu+cNcmEKzuj011xj5L4/P/b8
STLTG3wEaT61dkoNnH8D4pHJtp50PYjnDK2l2a8JpsSNBDcHqXXMxNaYkHm7pC2K
CbNnTarS0oYYX4YG4CAbIrqH7UPlM7kkPdW7jOJy3tBwaToALHMCmn/yW1nWzZTE
AlXZT21NDkZKZoDkN/WLxCH/tbAtNWIjorLfwwSlou5eYV6qAoGfMyqQhC+TN1x+
zoPWIkdb/PDhbMllSc1GtZOrFhYuDnbAzjV8c9og26HJ1U48NGiZIJL3hmMDsAGt
pAkDCvnvNuwUS1lvGUG/KVPL0F+qTHxq5lKHAnyTm/XeR9JmpbVt4rsQhKa422bw
abJfEql1KomFQpRIoxqoO2GDqXiVghTFqkF4uA9H1HsolIvYKHRjphjxGRcP09Bo
xkWfbykRAYrrNKPrFbjo0kXhC9HKsqeenfMCxme2dZEB2GP4sXgPdIBFoKnLGq+h
TGxMFkk322mZL9j4IFN6E/XSPpFrtTp/1jQ3TsMEfE44npCQc2KlFFCgj4xArB96
SUl3byn6l1oNfetI6w8y4auwX7xjSd5tARj8Ilq7JORUiMRvzpOQ4SEoQxSUx4Ib
D9frjAySLaiCQT6wKlwJg1IgBRYfuUU85UxU8FLa1GOSMbaElPI=
=5Z9f
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 29079@debbugs.gnu.org)
877ev2cvnm.fsf@gnu.org
Hi Kei,

Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (32 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hi Kei,
>>
>> Kei Kebreau <kkebreau@posteo.net> skribis:
>>
>>> * gnu/packages/dictionaries.scm (hunspell-en-US): New variable.
>>
>> On the same day I added this one and a couple of other dictionaries:
>>
>> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=085bcca313c3827f7c56e7c345d4606588db9085
>>
>> The package I committed builds the Hunspell list “from source”.
>>
>> Let me know whether we should adjust things and what you think of it.
>>
>> Thanks!
>>
>> Ludo’.
>
> I definitely like the generality and flexibility of this patch
> better. To get the dictionary to work in LibreOffice I had to install
> the .dic file as well [0], but once I did that everything seemed to work
> as expected.
>
> [0]:
> (mkdir-p myspell)
> + (install-file ,(string-append "speller/" language ".dic")
> + hunspell)
> (install-file ,(string-append "speller/" language ".aff")
> hunspell)

Nice (I thought Hunspell used exclusively the .aff files.)
OK for this patch!

The hunspell-dict-fr* packages include both .aff and .dic, so that
should be fine.

Thanks,
Ludo’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29079@debbugs.gnu.org)
87o9obysgr.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (45 lines)
> Hi Kei,
>
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> ludo@gnu.org (Ludovic Courtès) writes:
>>
>>> Hi Kei,
>>>
>>> Kei Kebreau <kkebreau@posteo.net> skribis:
>>>
>>>> * gnu/packages/dictionaries.scm (hunspell-en-US): New variable.
>>>
>>> On the same day I added this one and a couple of other dictionaries:
>>>
>>> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=085bcca313c3827f7c56e7c345d4606588db9085
>>>
>>> The package I committed builds the Hunspell list “from source”.
>>>
>>> Let me know whether we should adjust things and what you think of it.
>>>
>>> Thanks!
>>>
>>> Ludo’.
>>
>> I definitely like the generality and flexibility of this patch
>> better. To get the dictionary to work in LibreOffice I had to install
>> the .dic file as well [0], but once I did that everything seemed to work
>> as expected.
>>
>> [0]:
>> (mkdir-p myspell)
>> + (install-file ,(string-append "speller/" language ".dic")
>> + hunspell)
>> (install-file ,(string-append "speller/" language ".aff")
>> hunspell)
>
> Nice (I thought Hunspell used exclusively the .aff files.)
> OK for this patch!
>
> The hunspell-dict-fr* packages include both .aff and .dic, so that
> should be fine.
>
> Thanks,
> Ludo’.

Is this log message okay? I'm not sure how we handle changes to package
template functions.
From c143bad02ebcb7d94ad6e2582b6831c5d107e2a8 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kkebreau@posteo.net>
Date: Thu, 9 Nov 2017 17:49:02 -0500
Subject: [PATCH] gnu: Fix hunspell-dict-en-* dictionary installation.

* gnu/packages/aspell.scm (aspell-word-list)[arguments]: Install the .dic file
for all hunspell dictionaries.
---
gnu/packages/aspell.scm | 2 ++
1 file changed, 2 insertions(+)

Toggle diff (15 lines)
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 3eeeee64f..86e059834 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -270,6 +270,8 @@ dictionaries, including personal ones.")
(doc (string-append out "/share/doc/"
,name)))
(mkdir-p myspell)
+ (install-file ,(string-append "speller/" language ".dic")
+ hunspell)
(install-file ,(string-append "speller/" language ".aff")
hunspell)
(symlink hunspell (string-append myspell "/dicts"))
--
2.14.3
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAloE3GQACgkQ5qXuPBlG
eg324A//QRDzb2HXlCh68DrN+M7hbC76DsIypdokRASrTsIaO/D4sE5TGJOIsBNu
kRVm6DlBKxxFdyMKu0t2OvP4AwYQXYUU3wG2awQPV1gQTgYwQBNHpQ0T1VI1DVpW
TS2Vah1McF7a21ipVtUeCsChydI+wzYVmffLcCsygW4NOVD6rfCepKniyk2OJ5CC
ZlcBp2GD7mNOIXylEkgsJJCNY0DRcLElrjhkMR4AAUEkzXRrcBiiKcVfXVxDBxnv
NcmfQgsN/Wq3bGtE7fcOkFt7Fxm6Y4Lqe3NmaBxRkUygRNUMV+yd7G0dFjc5wLKC
5+DXNYQ2TTIusEmCVMWCqwGnqh9TfwDBIJBFLVfl9RUCnVkkDf/8XvNmHx2UKV9T
3lAq58P+2gaC1QzastNyORrCgmXypJMd55U5gFvYl6AIYQ9vlog22TzInDAXt5zA
vBhJVDpf0EEB92o7N4FSYlo9EMEj+56wpS++9UMRhrXXyRBvNzThfAxqReYSbbeN
K+y94rFPqem6JNCZ186cBw2c0yEL+A1on7tKRKmwerG999Wxxor7vMiGbaOMMJNv
AaO0mtXxIgPVyKdbkJ0XvYGKykNwtl3WYX6dGKiD1rzijLSbXEcXVMizFPqPtNHq
/dSNurv5WCyTNexviNFngCGsnlFRE5dvQILjWIeBsRU3m9FH+HA=
=G82N
-----END PGP SIGNATURE-----

Ludovic Courtès wrote 7 years ago
(name . Kei Kebreau)(address . kkebreau@posteo.net)(address . 29079@debbugs.gnu.org)
87wp2ymo04.fsf@gnu.org
Kei Kebreau <kkebreau@posteo.net> skribis:

Toggle quote (8 lines)
> From c143bad02ebcb7d94ad6e2582b6831c5d107e2a8 Mon Sep 17 00:00:00 2001
> From: Kei Kebreau <kkebreau@posteo.net>
> Date: Thu, 9 Nov 2017 17:49:02 -0500
> Subject: [PATCH] gnu: Fix hunspell-dict-en-* dictionary installation.
>
> * gnu/packages/aspell.scm (aspell-word-list)[arguments]: Install the .dic file
> for all hunspell dictionaries.

Perfect, thanks!

Ludo’.
Kei Kebreau wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 29079-done@debbugs.gnu.org)
87lgjeyspp.fsf@posteo.net
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (14 lines)
> Kei Kebreau <kkebreau@posteo.net> skribis:
>
>> From c143bad02ebcb7d94ad6e2582b6831c5d107e2a8 Mon Sep 17 00:00:00 2001
>> From: Kei Kebreau <kkebreau@posteo.net>
>> Date: Thu, 9 Nov 2017 17:49:02 -0500
>> Subject: [PATCH] gnu: Fix hunspell-dict-en-* dictionary installation.
>>
>> * gnu/packages/aspell.scm (aspell-word-list)[arguments]: Install the .dic file
>> for all hunspell dictionaries.
>
> Perfect, thanks!
>
> Ludo’.

Pushed as d4d7d70912642be18d93c9ce6470f8650097b5e5 to master!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAloF2yIACgkQ5qXuPBlG
eg2XSQ/+MtrkRx+IgbFoHYEprTeSAJsebHBUpRHv2t6mlxzZMrrG64/KIKqnMtoF
UA40Qfm0qiquaGtKTUvOXXuxMsEkP7P+4ssiYF9SuCnes6AlS9CWkEMdob4yeZhZ
CP2ncmNNeN3chx2zj3FgGQ1/dTDW+6MllJdxUA1DW8GoWCsPY8DAtApAkd+toa8F
4qDZ/7ezN7NYyrTWS/sbGd2GD+s/S8Ebgp02QcKvnAlf04NzeaDWB9rgdJGwe3n3
ckU+xf98wxZYhoNOJo0oi+/xg8PgM9orC56wKdZcYW866C07EKzkg9+NGoybfDN3
1Y+q/ly9weYnabWGGdmT8bWHZaTGENYniIEaaDerw4UZV3kqlLf6bQI7cMnaMrY3
SMP5+JgHWCGjKpHN+rs8IkVD4vD6vUhOCDyHVX2WFrTZvm277yGiZgJXe8a8h4iX
S197rJaIMMTuFq/ivzevWTgN6iVuHoulrqkOu21+yxqHSJnoBJfAoWEuFzYwV1zZ
JfezUDLa/5c1vBJc5ShPkGHux4dRniYrqaPQ75mX+o6h8faxsUtNeb6ZMPy5KxXJ
/KlAZzwzvEk9owzyBcYO/ATiyUNn7nqn3MENTWf1KeoPg6h16hrLYAhh8P4rOUqE
9ojzlAQzViR/eU6GLVqVOTyiGJ5KtK4zcMsDudu3HS28LZfRTns=
=eLgX
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 29079@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 29079
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help