Add large hunspell dicts (#67424)

* Move en_AU alias to above declaration to match others

* Add en_GB-large, en_US-large, en_CA-large and en_AU-large hunspell dictionaries

Squashed commit of the following:

commit e3c0054263f6d71c1890ecb52b06ade71ce046ee
Author: Jai Flack <jaiflack@protonmail.com>
Date:   Tue Aug 27 18:38:34 2019 +1000

    Add en_GB-large, en_US-large, en_CA-large and en_AU-large hunspell
    dictionaries

    Squashed commit of the following:

    commit 6b16e7326061aa55bb6993b3913fb4fb701a9b8f
    Author: Jai Flack <jaiflack@protonmail.com>
    Date:   Sun Aug 25 15:38:08 2019 +1000

        Adding en_GB-large dictionary

    commit c94c6c39503750c820cdab533b4372695b61bad3
    Author: Jai Flack <jaiflack@protonmail.com>
    Date:   Sun Aug 25 15:37:37 2019 +1000

        Fix en_US-large and en_CA-large hashes

    commit 84a847b39e7ad967d26434b0f6935211bb42010a
    Author: Jai Flack <jaiflack@protonmail.com>
    Date:   Sun Aug 25 15:15:54 2019 +1000

        Adding en_AU-large dictionary

    commit b7d6e1ceebae98a5d7f3c6e119cb3816b879ed54
    Author: Jai Flack <jaiflack@protonmail.com>
    Date:   Sun Aug 25 15:15:36 2019 +1000

        Adding en_CA-large dictionary

    commit c1857a6e054b60bbe51eda4a8c3c55285cf6092e
    Author: Jai Flack <jaiflack@protonmail.com>
    Date:   Sun Aug 25 15:15:10 2019 +1000

        Adding en_US-large dictionary

    commit 898caa0eb9452992d5dc59cd82d267fcc8ad1133
    Author: Jai Flack <jaiflack@protonmail.com>
    Date:   Sun Aug 25 15:14:25 2019 +1000

        Modifying mkDictFromWordlist to allow for different src and destination
        file names
This commit is contained in:
Jai Flack 2019-09-04 06:57:46 +10:00 committed by Aristid Breitkreuz
parent 0b32fe2d7e
commit cac6631e61

View file

@ -141,11 +141,12 @@ let
};
mkDictFromWordlist =
{ shortName, shortDescription, dictFileName, src }:
{ shortName, shortDescription, srcFileName, dictFileName, src }:
mkDict rec {
inherit src dictFileName;
inherit src srcFileName dictFileName;
version = "2018.04.16";
name = "hunspell-dict-${shortName}-wordlist-${version}";
srcReadmeFile = "README_" + srcFileName + ".txt";
readmeFile = "README_" + dictFileName + ".txt";
meta = with stdenv.lib; {
description = "Hunspell dictionary for ${shortDescription} from Wordlist";
@ -158,7 +159,12 @@ let
phases = "unpackPhase installPhase";
sourceRoot = ".";
unpackCmd = ''
unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
unzip $src ${srcFileName}.dic ${srcFileName}.aff ${srcReadmeFile}
'';
postUnpack = ''
mv ${srcFileName}.dic ${dictFileName}.dic || true
mv ${srcFileName}.aff ${dictFileName}.aff || true
mv ${srcReadmeFile} ${readmeFile} || true
'';
};
@ -294,6 +300,7 @@ in rec {
en-us = mkDictFromWordlist {
shortName = "en-us";
shortDescription = "English (United States)";
srcFileName = "en_US";
dictFileName = "en_US";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_US-2018.04.16.zip;
@ -301,10 +308,23 @@ in rec {
};
};
en_US-large = en-us-large;
en-us-large = mkDictFromWordlist {
shortName = "en-us-large";
shortDescription = "English (United States) Large";
srcFileName = "en_US-large";
dictFileName = "en_US";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_US-large-2018.04.16.zip;
sha256 = "1xm9jgqbivp5cb78ykjxg47vzq1yqj82l7r4q5cjpivrv99s49qc";
};
};
en_CA = en-ca;
en-ca = mkDictFromWordlist {
shortName = "en-ca";
shortDescription = "English (Canada)";
srcFileName = "en_CA";
dictFileName = "en_CA";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_CA-2018.04.16.zip;
@ -312,24 +332,50 @@ in rec {
};
};
en_CA-large = en-ca-large;
en-ca-large = mkDictFromWordlist {
shortName = "en-ca-large";
shortDescription = "English (Canada) Large";
srcFileName = "en_CA-large";
dictFileName = "en_CA";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_CA-large-2018.04.16.zip;
sha256 = "1200xxyvv6ni8nk52v3059c367817vnrkm0cdh38rhiigb5flfha";
};
};
en_AU = en-au;
en-au = mkDictFromWordlist {
shortName = "en-au";
shortDescription = "English (Australia)";
srcFileName = "en_AU";
dictFileName = "en_AU";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_AU-2018.04.16.zip;
sha256 = "1kp06npl1kd05mm9r52cg2iwc13x02zwqgpibdw15b6x43agg6f5";
};
};
en_AU = en-au;
en_AU-large = en-au-large;
en-au-large = mkDictFromWordlist {
shortName = "en-au-large";
shortDescription = "English (Australia) Large";
srcFileName = "en_AU-large";
dictFileName = "en_AU";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_AU-large-2018.04.16.zip;
sha256 = "14l1w4dpk0k1js2wwq5ilfil89ni8cigph95n1rh6xi4lzxj7h6g";
};
};
en_GB-ise = en-gb-ise;
en-gb-ise = mkDictFromWordlist {
shortName = "en-gb-ise";
shortDescription = "English (United Kingdom, 'ise' ending)";
dictFileName = "en_GB-ise";
srcFileName = "en_GB-ise";
dictFileName = "en_GB";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller//hunspell-en_GB-ise-2018.04.16.zip;
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-ise-2018.04.16.zip;
sha256 = "0ylg1zvfvsawamymcc9ivrqcb9qhlpgpnizm076xc56jz554xc2l";
};
};
@ -338,13 +384,26 @@ in rec {
en-gb-ize = mkDictFromWordlist {
shortName = "en-gb-ize";
shortDescription = "English (United Kingdom, 'ize' ending)";
dictFileName = "en_GB-ize";
srcFileName = "en_GB-ize";
dictFileName = "en_GB";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller//hunspell-en_GB-ize-2018.04.16.zip;
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-ize-2018.04.16.zip;
sha256 = "1rmwy6sxmd400cwjf58az6g14sq28p18f5mlq8ybg8y33q9m42ps";
};
};
en_GB-large = en-gb-large;
en-gb-large = mkDictFromWordlist {
shortName = "en-gb-large";
shortDescription = "English (United Kingdom) Large";
srcFileName = "en_GB-large";
dictFileName = "en_GB";
src = fetchurl {
url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-large-2018.04.16.zip;
sha256 = "1y4d7x5vvi1qh1s3i09m0vvqrpdzzqhsdngr8nsh7hc5bnlm37mi";
};
};
/* SPANISH */
es_ANY = es-any;