Subject: [bug#29079] [PATCH] gnu: Add hunspell-en-US.

From: Kei Kebreau <[email-masked]>
Date: Thu, 09 Nov 2017 17:53:24 -0500

[email-masked] (Ludovic Courtès) writes:

> Hi Kei,
>
> Kei Kebreau <[email-masked]> skribis:
>
>> [email-masked] (Ludovic Courtès) writes:
>>
>>> Hi Kei,
>>>
>>> Kei Kebreau <[email-masked]> 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 <[email-masked]>
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(+)

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