git.iko.soy/typeable/nixpkgs
on master help sign in
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

commitcac6631e614e0f417e38d588ac359d7dd6a4bb40 authorJai Flack <jaiflack@protonmail.com> dateWed 4 Sep 2019, 06:57 (7 years ago) parent0b32fe2
1 file changed+67−8
pkgs/development/libraries/hunspell/dictionaries.nix+67−8
pkgs/development/libraries/hunspell/dictionaries.nix+67−8
@@ -141,11 +141,12 @@ let
141141 };
142142
143143 mkDictFromWordlist =
144− { shortName, shortDescription, dictFileName, src }:
144+ { shortName, shortDescription, srcFileName, dictFileName, src }:
145145 mkDict rec {
146− inherit src dictFileName;
146+ inherit src srcFileName dictFileName;
147147 version = "2018.04.16";
148148 name = "hunspell-dict-${shortName}-wordlist-${version}";
149+ srcReadmeFile = "README_" + srcFileName + ".txt";
149150 readmeFile = "README_" + dictFileName + ".txt";
150151 meta = with stdenv.lib; {
151152 description = "Hunspell dictionary for ${shortDescription} from Wordlist";
@@ -158,7 +159,12 @@ let
158159 phases = "unpackPhase installPhase";
159160 sourceRoot = ".";
160161 unpackCmd = ''
161− unzip $src ${dictFileName}.dic ${dictFileName}.aff ${readmeFile}
162+ unzip $src ${srcFileName}.dic ${srcFileName}.aff ${srcReadmeFile}
163+ '';
164+ postUnpack = ''
165+ mv ${srcFileName}.dic ${dictFileName}.dic || true
166+ mv ${srcFileName}.aff ${dictFileName}.aff || true
167+ mv ${srcReadmeFile} ${readmeFile} || true
162168 '';
163169 };
164170
@@ -294,6 +300,7 @@ in rec {
294300 en-us = mkDictFromWordlist {
295301 shortName = "en-us";
296302 shortDescription = "English (United States)";
303+ srcFileName = "en_US";
297304 dictFileName = "en_US";
298305 src = fetchurl {
299306 url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_US-2018.04.16.zip;
@@ -301,10 +308,23 @@ in rec {
301308 };
302309 };
303310
311+ en_US-large = en-us-large;
312+ en-us-large = mkDictFromWordlist {
313+ shortName = "en-us-large";
314+ shortDescription = "English (United States) Large";
315+ srcFileName = "en_US-large";
316+ dictFileName = "en_US";
317+ src = fetchurl {
318+ url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_US-large-2018.04.16.zip;
319+ sha256 = "1xm9jgqbivp5cb78ykjxg47vzq1yqj82l7r4q5cjpivrv99s49qc";
320+ };
321+ };
322+
304323 en_CA = en-ca;
305324 en-ca = mkDictFromWordlist {
306325 shortName = "en-ca";
307326 shortDescription = "English (Canada)";
327+ srcFileName = "en_CA";
308328 dictFileName = "en_CA";
309329 src = fetchurl {
310330 url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_CA-2018.04.16.zip;
@@ -312,24 +332,50 @@ in rec {
312332 };
313333 };
314334
335+ en_CA-large = en-ca-large;
336+ en-ca-large = mkDictFromWordlist {
337+ shortName = "en-ca-large";
338+ shortDescription = "English (Canada) Large";
339+ srcFileName = "en_CA-large";
340+ dictFileName = "en_CA";
341+ src = fetchurl {
342+ url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_CA-large-2018.04.16.zip;
343+ sha256 = "1200xxyvv6ni8nk52v3059c367817vnrkm0cdh38rhiigb5flfha";
344+ };
345+ };
346+
347+ en_AU = en-au;
315348 en-au = mkDictFromWordlist {
316349 shortName = "en-au";
317350 shortDescription = "English (Australia)";
351+ srcFileName = "en_AU";
318352 dictFileName = "en_AU";
319353 src = fetchurl {
320354 url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_AU-2018.04.16.zip;
321355 sha256 = "1kp06npl1kd05mm9r52cg2iwc13x02zwqgpibdw15b6x43agg6f5";
322356 };
323357 };
324− en_AU = en-au;
358+
359+ en_AU-large = en-au-large;
360+ en-au-large = mkDictFromWordlist {
361+ shortName = "en-au-large";
362+ shortDescription = "English (Australia) Large";
363+ srcFileName = "en_AU-large";
364+ dictFileName = "en_AU";
365+ src = fetchurl {
366+ url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_AU-large-2018.04.16.zip;
367+ sha256 = "14l1w4dpk0k1js2wwq5ilfil89ni8cigph95n1rh6xi4lzxj7h6g";
368+ };
369+ };
325370
326371 en_GB-ise = en-gb-ise;
327372 en-gb-ise = mkDictFromWordlist {
328373 shortName = "en-gb-ise";
329374 shortDescription = "English (United Kingdom, 'ise' ending)";
330− dictFileName = "en_GB-ise";
375+ srcFileName = "en_GB-ise";
376+ dictFileName = "en_GB";
331377 src = fetchurl {
332− url = mirror://sourceforge/wordlist/speller//hunspell-en_GB-ise-2018.04.16.zip;
378+ url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-ise-2018.04.16.zip;
333379 sha256 = "0ylg1zvfvsawamymcc9ivrqcb9qhlpgpnizm076xc56jz554xc2l";
334380 };
335381 };
@@ -338,13 +384,26 @@ in rec {
338384 en-gb-ize = mkDictFromWordlist {
339385 shortName = "en-gb-ize";
340386 shortDescription = "English (United Kingdom, 'ize' ending)";
341− dictFileName = "en_GB-ize";
387+ srcFileName = "en_GB-ize";
388+ dictFileName = "en_GB";
342389 src = fetchurl {
343− url = mirror://sourceforge/wordlist/speller//hunspell-en_GB-ize-2018.04.16.zip;
390+ url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-ize-2018.04.16.zip;
344391 sha256 = "1rmwy6sxmd400cwjf58az6g14sq28p18f5mlq8ybg8y33q9m42ps";
345392 };
346393 };
347394
395+ en_GB-large = en-gb-large;
396+ en-gb-large = mkDictFromWordlist {
397+ shortName = "en-gb-large";
398+ shortDescription = "English (United Kingdom) Large";
399+ srcFileName = "en_GB-large";
400+ dictFileName = "en_GB";
401+ src = fetchurl {
402+ url = mirror://sourceforge/wordlist/speller/2018.04.16/hunspell-en_GB-large-2018.04.16.zip;
403+ sha256 = "1y4d7x5vvi1qh1s3i09m0vvqrpdzzqhsdngr8nsh7hc5bnlm37mi";
404+ };
405+ };
406+
348407 /* SPANISH */
349408
350409 es_ANY = es-any;