nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 1146 lines 31 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 aspell, 6 which, 7 writeScript, 8}: 9 10/* 11 HOWTO: 12 13 * Add some of these to your profile or systemPackages. 14 15 ~~~~ 16 environment.systemPackages = [ 17 aspell 18 aspellDicts.en 19 aspellDicts.en-computers 20 aspellDicts.en-science 21 ]; 22 ~~~~ 23 24 * Rebuild and switch to the new profile. 25 * Add something like 26 27 ~~~~ 28 master en_US 29 extra-dicts en-computers.rws 30 add-extra-dicts en_US-science.rws 31 ~~~~ 32 33 to `/etc/aspell.conf` or `~/.aspell.conf`. 34 * Check that `aspell -a` starts without errors. 35 * (optional) Check your config with `aspell dump config | grep -vE '^(#|$)'`. 36 * Enjoy. 37*/ 38 39let 40 41 /* 42 Function to compile an Aspell dictionary. Fortunately, they all 43 build in the exact same way. 44 */ 45 buildDict = 46 { shortName, fullName, ... }@args: 47 48 stdenv.mkDerivation ( 49 { 50 pname = "aspell-dict-${shortName}"; 51 52 strictDeps = true; 53 54 nativeBuildInputs = [ 55 aspell 56 which 57 ]; 58 59 dontAddPrefix = true; 60 61 configurePlatforms = [ ]; 62 63 preBuild = "makeFlagsArray=(dictdir=$out/lib/aspell datadir=$out/lib/aspell)"; 64 65 meta = { 66 description = "Aspell dictionary for ${fullName}"; 67 platforms = lib.platforms.all; 68 } 69 // (args.meta or { }); 70 } 71 // removeAttrs args [ "meta" ] 72 ); 73 74 buildOfficialDict = 75 { 76 language, 77 version, 78 filename, 79 fullName, 80 sha256, 81 ... 82 }@args: 83 let 84 buildArgs = { 85 shortName = "${language}"; 86 87 src = fetchurl { 88 url = "mirror://gnu/aspell/dict/${language}/${filename}-${language}-${version}.tar.bz2"; 89 inherit sha256; 90 }; 91 92 /* 93 Remove any instances of u-deva.cmap and u-deva.cset since 94 they are included in the main aspell package and can 95 cause conflicts otherwise. 96 */ 97 postInstall = '' 98 rm -f $out/lib/aspell/u-deva.{cmap,cset} 99 ''; 100 101 passthru.updateScript = writeScript "update-aspellDict-${language}" '' 102 #!/usr/bin/env nix-shell 103 #!nix-shell -i bash -p nix curl gnused common-updater-scripts 104 set -eu -o pipefail 105 106 # List tarballs in the dictionary's subdirectory via HTTPS and 107 # the simple list method of Apache's mod_autoindex. 108 # 109 # Catalan dictionary has an exception where an earlier version 110 # compares as newer because the versioning scheme has changed. 111 versions=$( 112 echo '['; 113 curl -s 'https://ftp.gnu.org/gnu/aspell/dict/${language}/?F=0' | \ 114 sed -r 's/.* href="${filename}-${language}-([A-Za-z0-9_+.-]+)\.tar\.bz2".*/"\1"/;t;d' | \ 115 if [ '${language}' = "ca" ]; then grep -v 20040130-1; else cat; fi; \ 116 echo ']') 117 118 # Sort versions in descending order using Nix's and take the first as the latest. 119 sortVersions="(with builtins; head (sort (a: b: compareVersions a b > 0) $versions))" 120 # nix-instantiate outputs Nix strings (with quotes), so remove them to get 121 # a result similar to `nix eval --raw`. 122 latestVersion=$(nix-instantiate --eval --expr "$sortVersions" | tr -d '"') 123 124 update-source-version aspellDicts.${language} "$latestVersion" 125 ''; 126 127 meta = { 128 homepage = "http://ftp.gnu.org/gnu/aspell/dict/0index.html"; 129 } 130 // (args.meta or { }); 131 132 } 133 // 134 lib.optionalAttrs 135 (lib.elem language [ 136 "is" 137 "nb" 138 ]) 139 { 140 # These have Windows-1251 encoded non-ASCII characters, 141 # so need some special handling. 142 unpackPhase = '' 143 runHook preUnpack 144 145 tar -xf $src --strip-components=1 || true 146 147 runHook postUnpack 148 ''; 149 150 postPatch = lib.getAttr language { 151 is = '' 152 cp icelandic.alias íslenska.alias 153 sed -i 's/ .slenska\.alias/ íslenska.alias/g' Makefile.pre 154 ''; 155 nb = '' 156 cp bokmal.alias bokmål.alias 157 sed -i 's/ bokm.l\.alias/ bokmål.alias/g' Makefile.pre 158 ''; 159 }; 160 } 161 // removeAttrs args [ 162 "language" 163 "filename" 164 "sha256" 165 "meta" 166 ]; 167 in 168 buildDict buildArgs; 169 170 # Function to compile txt dict files into Aspell dictionaries. 171 buildTxtDict = 172 { 173 langInputs ? [ ], 174 ... 175 }@args: 176 buildDict ( 177 { 178 propagatedUserEnvPackages = langInputs; 179 180 preBuild = '' 181 # Aspell can't handle multiple data-dirs 182 # Copy everything we might possibly need 183 ${lib.concatMapStringsSep "\n" (p: '' 184 cp -a ${p}/lib/aspell/* . 185 '') ([ aspell ] ++ langInputs)} 186 export ASPELL_CONF="data-dir $(pwd)" 187 188 aspell-create() { 189 target=$1 190 shift 191 echo building $target 192 aspell create "$@" master ./$target.rws 193 } 194 195 words-only() { 196 awk -F'\t' '{print $1}' | sort | uniq 197 } 198 199 # drop comments 200 aspell-affix() { 201 words-only \ 202 | grep -a -v '#' \ 203 | aspell-create "$@" 204 } 205 206 # Hack: drop comments and words with affixes 207 aspell-plain() { 208 words-only \ 209 | grep -a -v '#' \ 210 | grep -a -v '/' \ 211 | aspell-create "$@" 212 } 213 214 aspell-install() { 215 install -d $out/lib/aspell 216 for a in "$@"; do 217 echo installing $a 218 install -t $out/lib/aspell $a.rws 219 done 220 } 221 ''; 222 223 dontUnpack = true; 224 } 225 // args 226 ); 227 228in 229rec { 230 231 ### Languages 232 233 af = buildOfficialDict { 234 language = "af"; 235 version = "0.50-0"; 236 fullName = "Afrikaans"; 237 filename = "aspell"; 238 sha256 = "00p6k2ndi0gzfr5fkbvx4hkcpj223pidjvmxg0r384arrap00q4x"; 239 meta.license = lib.licenses.lgpl21Only; 240 }; 241 242 am = buildOfficialDict { 243 language = "am"; 244 version = "0.03-1"; 245 fullName = "Amharic"; 246 filename = "aspell6"; 247 sha256 = "11ylp7gjq94wfacyawvp391lsq26rl1b84f268rjn7l7z0hxs9xz"; 248 meta.license = lib.licenses.publicDomain; 249 }; 250 251 ar = buildOfficialDict { 252 language = "ar"; 253 version = "1.2-0"; 254 fullName = "Arabic"; 255 filename = "aspell6"; 256 sha256 = "1avw40bp8yi5bnkq64ihm2rldgw34lk89yz281q9bmndh95a47h4"; 257 meta.license = lib.licenses.gpl2Only; 258 }; 259 260 ast = buildOfficialDict { 261 language = "ast"; 262 version = "0.01"; 263 fullName = "Asturian"; 264 filename = "aspell6"; 265 sha256 = "14hg85mxcyvdigf96yvslk7f3v9ngdsxn85qpgwkg31k3k83xwj3"; 266 meta.license = lib.licenses.gpl2Only; 267 }; 268 269 az = buildOfficialDict { 270 language = "az"; 271 version = "0.02-0"; 272 fullName = "Azerbaijani"; 273 filename = "aspell6"; 274 sha256 = "1hs4h1jscpxf9f9iyk6mvjqsnhkf0yslkbjhjkasqqcx8pn7cc86"; 275 meta.license = lib.licenses.gpl2Only; 276 }; 277 278 be = buildOfficialDict { 279 language = "be"; 280 version = "0.01"; 281 fullName = "Belarusian"; 282 filename = "aspell5"; 283 sha256 = "1svls9p7rsfi3hs0afh0cssj006qb4v1ik2yzqgj8hm10c6as2sm"; 284 meta.license = lib.licenses.gpl2Only; 285 }; 286 287 bg = buildOfficialDict { 288 language = "bg"; 289 version = "4.1-0"; 290 fullName = "Bulgarian"; 291 filename = "aspell6"; 292 sha256 = "1alacmgpfk0yrgq83y23d16fhav1bxmb98kg8d2a5r9bvh2h0mvl"; 293 meta.license = lib.licenses.gpl2Only; 294 }; 295 296 bn = buildOfficialDict { 297 language = "bn"; 298 version = "0.01.1-1"; 299 fullName = "Bengali"; 300 filename = "aspell6"; 301 sha256 = "1nc02jd67iggirwxnhdvlvaqm0xfyks35c4psszzj3dhzv29qgxh"; 302 meta.license = lib.licenses.gpl2Only; 303 }; 304 305 br = buildOfficialDict { 306 language = "br"; 307 version = "0.50-2"; 308 fullName = "Breton"; 309 filename = "aspell"; 310 sha256 = "0fradnm8424bkq9a9zhpl2132dk7y95xmw45sy1c0lx6rinjl4n2"; 311 meta.license = lib.licenses.gpl2Only; 312 }; 313 314 ca = buildOfficialDict { 315 language = "ca"; 316 version = "2.1.5-1"; 317 fullName = "Catalan"; 318 filename = "aspell6"; 319 sha256 = "1fb5y5kgvk25nlsfvc8cai978hg66x3pbp9py56pldc7vxzf9npb"; 320 meta.license = lib.licenses.gpl2Only; 321 }; 322 323 cs = buildOfficialDict { 324 language = "cs"; 325 version = "20040614-1"; 326 fullName = "Czech"; 327 filename = "aspell6"; 328 sha256 = "0rihj4hsw96pd9casvmpvw3r8040pfa28p1h73x4vyn20zwr3h01"; 329 meta.license = lib.licenses.gpl2Only; 330 }; 331 332 csb = buildOfficialDict { 333 language = "csb"; 334 version = "0.02-0"; 335 fullName = "Kashubian"; 336 filename = "aspell6"; 337 sha256 = "1612ypkm684wjvc7n081i87mlrrzif9simc7kyn177hfsl3ssrn1"; 338 meta.license = lib.licenses.gpl2Only; 339 }; 340 341 cy = buildOfficialDict { 342 language = "cy"; 343 version = "0.50-3"; 344 fullName = "Welsh"; 345 filename = "aspell"; 346 sha256 = "15vq601lzz1gi311xym4bv9lv1k21xcfn50jmzamw7h6f36rsffm"; 347 meta.license = lib.licenses.gpl2Only; 348 }; 349 350 da = buildOfficialDict { 351 language = "da"; 352 version = "1.4.42-1"; 353 fullName = "Danish"; 354 filename = "aspell5"; 355 sha256 = "1hfkmiyhgrx5lgrb2mffjbdn1hivrm73wcg7x0iid74p2yb0fjpp"; 356 meta.license = lib.licenses.gpl2Only; 357 }; 358 359 de = buildOfficialDict { 360 language = "de"; 361 version = "20161207-7-0"; 362 fullName = "German"; 363 filename = "aspell6"; 364 sha256 = "0wamclvp66xfmv5wff96v6gdlnfv4y8lx3f8wvxyzm5imwgms4n2"; 365 meta.license = lib.licenses.gpl2Plus; 366 }; 367 368 de-alt = buildOfficialDict { 369 language = "de-alt"; 370 version = "2.1-1"; 371 fullName = "German - Old Spelling"; 372 filename = "aspell6"; 373 sha256 = "0wwc2l29svv3fv041fh6vfa5m3hi9q9pkbxibzq1ysrsfin3rl9n"; 374 meta.license = lib.licenses.gpl2Only; 375 }; 376 377 el = buildOfficialDict { 378 language = "el"; 379 version = "0.08-0"; 380 fullName = "Greek"; 381 filename = "aspell6"; 382 sha256 = "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja"; 383 meta.license = lib.licenses.gpl2Only; 384 }; 385 386 en = buildOfficialDict { 387 language = "en"; 388 version = "2020.12.07-0"; 389 fullName = "English"; 390 filename = "aspell6"; 391 sha256 = "1cwzqkm8gr1w51rpckwlvb43sb0b5nbwy7s8ns5vi250515773sc"; 392 # some parts are under a custom free license others are just stated to be"public domain" 393 # see the Copyright file in the source for further information 394 meta.license = with lib.licenses; [ 395 free 396 publicDomain 397 bsdOriginalUC 398 ]; 399 }; 400 401 eo = buildOfficialDict { 402 language = "eo"; 403 version = "2.1.20000225a-2"; 404 fullName = "Esperanto"; 405 filename = "aspell6"; 406 sha256 = "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1"; 407 meta.license = lib.licenses.gpl2Only; 408 }; 409 410 es = buildOfficialDict { 411 language = "es"; 412 version = "1.11-2"; 413 fullName = "Spanish"; 414 filename = "aspell6"; 415 sha256 = "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd"; 416 meta.license = lib.licenses.gpl2Only; 417 }; 418 419 et = buildOfficialDict { 420 language = "et"; 421 version = "0.1.21-1"; 422 fullName = "Estonian"; 423 filename = "aspell6"; 424 sha256 = "0jdjfa2fskirhnb70fy86xryp9r6gkl729ib8qcjmsma7nm5gs5i"; 425 meta.license = lib.licenses.lgpl21Only; 426 }; 427 428 fa = buildOfficialDict { 429 language = "fa"; 430 version = "0.11-0"; 431 fullName = "Persian"; 432 filename = "aspell6"; 433 sha256 = "0nz1ybwv56q7nl9ip12hfmdch1vyyq2j55bkjcns13lshzm2cba8"; 434 meta.license = lib.licenses.gpl2Only; 435 }; 436 437 fi = buildOfficialDict { 438 language = "fi"; 439 version = "0.7-0"; 440 fullName = "Finnish"; 441 filename = "aspell6"; 442 sha256 = "07d5s08ba4dd89cmwy9icc01i6fjdykxlb9ravmhdrhi8mxz1mzq"; 443 meta.license = lib.licenses.gpl2Only; 444 }; 445 446 fo = buildOfficialDict { 447 language = "fo"; 448 version = "0.2.16-1"; 449 fullName = "Faroese"; 450 filename = "aspell5"; 451 sha256 = "022yz5lll20xrzizcyb7wksm3fgwklnvgnir5la5qkxv770dvq7p"; 452 meta.license = lib.licenses.gpl2Only; 453 }; 454 455 fr = buildOfficialDict { 456 language = "fr"; 457 version = "0.50-3"; 458 fullName = "French"; 459 filename = "aspell"; 460 sha256 = "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr"; 461 meta.license = lib.licenses.gpl2Only; 462 }; 463 464 fy = buildOfficialDict { 465 language = "fy"; 466 version = "0.12-0"; 467 fullName = "Frisian"; 468 filename = "aspell6"; 469 sha256 = "1almi6n4ni91d0rzrk8ig0473m9ypbwqmg56hchz76j51slwyirl"; 470 meta.license = lib.licenses.gpl2Only; 471 }; 472 473 ga = buildOfficialDict { 474 language = "ga"; 475 version = "4.5-0"; 476 fullName = "Irish"; 477 filename = "aspell5"; 478 sha256 = "0y869mmvfb3bzadfgajwa2rfb0xfhi6m9ydwgxkb9v2claydnps5"; 479 meta.license = lib.licenses.gpl2Only; 480 }; 481 482 gd = buildOfficialDict { 483 language = "gd"; 484 version = "0.1.1-1"; 485 fullName = "Scottish Gaelic"; 486 filename = "aspell5"; 487 sha256 = "0a89irv5d65j5m9sb0k36851x5rs0wij12gb2m6hv2nsfn5a05p3"; 488 meta.license = lib.licenses.gpl2Only; 489 }; 490 491 gl = buildOfficialDict { 492 language = "gl"; 493 version = "0.5a-2"; 494 fullName = "Galician"; 495 filename = "aspell6"; 496 sha256 = "12pwghmy18fcdvf9hvhb4q6shi339hb1kwxpkz0bhw0yjxjwzkdk"; 497 meta.license = lib.licenses.gpl2Only; 498 }; 499 500 grc = buildOfficialDict { 501 language = "grc"; 502 version = "0.02-0"; 503 fullName = "Ancient Greek"; 504 filename = "aspell6"; 505 sha256 = "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512"; 506 meta.license = lib.licenses.gpl3Only; 507 }; 508 509 gu = buildOfficialDict { 510 language = "gu"; 511 version = "0.03-0"; 512 fullName = "Gujarati"; 513 filename = "aspell6"; 514 sha256 = "04c38jnl74lpj2jhjz4zpqbs2623vwc71m6wc5h4b1karid14b23"; 515 meta.license = lib.licenses.gpl2Only; 516 }; 517 518 gv = buildOfficialDict { 519 language = "gv"; 520 version = "0.50-0"; 521 fullName = "Manx Gaelic"; 522 filename = "aspell"; 523 sha256 = "1rknf4yaw9s29c77sdzg98nhnmjwpicdb69igmz1n768npz2drmv"; 524 meta.license = lib.licenses.gpl2Only; 525 }; 526 527 he = buildOfficialDict { 528 language = "he"; 529 version = "1.0-0"; 530 fullName = "Hebrew"; 531 filename = "aspell6"; 532 sha256 = "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn"; 533 meta.license = lib.licenses.gpl2Only; 534 }; 535 536 hi = buildOfficialDict { 537 language = "hi"; 538 version = "0.02-0"; 539 fullName = "Hindi"; 540 filename = "aspell6"; 541 sha256 = "0drs374qz4419zx1lf2k281ydxf2750jk5ailafj1x0ncz27h1ys"; 542 meta.license = lib.licenses.gpl2Only; 543 }; 544 545 hil = buildOfficialDict { 546 language = "hil"; 547 version = "0.11-0"; 548 fullName = "Hiligaynon"; 549 filename = "aspell5"; 550 sha256 = "1s482fsfhzic9qa80al4418q3ni3gfn2bkwkd2y46ydrs17kf2jp"; 551 meta.license = lib.licenses.gpl2Only; 552 }; 553 554 hr = buildOfficialDict { 555 language = "hr"; 556 version = "0.51-0"; 557 fullName = "Croatian"; 558 filename = "aspell"; 559 sha256 = "09aafyf1vqhaxvcf3jfzf365k394b5pf0iivsr2ix5npah1h7i1a"; 560 meta.license = lib.licenses.lgpl21Only; 561 }; 562 563 hsb = buildOfficialDict { 564 language = "hsb"; 565 version = "0.02-0"; 566 fullName = "Upper Sorbian"; 567 filename = "aspell6"; 568 sha256 = "0bi2vhz7n1vmg43wbbh935pmzihv80iyz9z65j94lxf753j2m7wd"; 569 meta.license = lib.licenses.gpl2Only; 570 }; 571 572 hu = buildOfficialDict { 573 language = "hu"; 574 version = "0.99.4.2-0"; 575 fullName = "Hungarian"; 576 filename = "aspell6"; 577 sha256 = "1d9nybip2k1dz69zly3iv0npbi3yxgfznh1py364nxzrbjsafd9k"; 578 meta.license = lib.licenses.gpl2Only; 579 }; 580 581 hus = buildOfficialDict { 582 language = "hus"; 583 version = "0.03-1"; 584 fullName = "Huastec"; 585 filename = "aspell6"; 586 sha256 = "09glipfpkz9xch17z11zw1yn2z7jx1f2svfmjn9l6wm1s5qz6a3d"; 587 meta.license = lib.licenses.gpl3Only; 588 }; 589 590 hy = buildOfficialDict { 591 language = "hy"; 592 version = "0.10.0-0"; 593 fullName = "Armenian"; 594 filename = "aspell6"; 595 sha256 = "1w5wq8lfl2xp1nid30b1j5qmya4vjyidq0vpr4y3gf53jc08vsid"; 596 meta.license = lib.licenses.gpl2Only; 597 }; 598 599 ia = buildOfficialDict { 600 language = "ia"; 601 version = "0.50-1"; 602 fullName = "Interlingua"; 603 filename = "aspell"; 604 sha256 = "0bqcpgsa72pga24fv4fkw38b4qqdvqsw97jvzvw7q03dc1cwp5sp"; 605 meta.license = lib.licenses.lgpl21Only; 606 }; 607 608 id = buildOfficialDict { 609 language = "id"; 610 version = "1.2-0"; 611 fullName = "Indonesian"; 612 filename = "aspell5"; 613 sha256 = "023knfg0q03f7y5w6xnwa1kspnrcvcnky8xvdms93n2850414faj"; 614 meta.license = lib.licenses.gpl2Only; 615 }; 616 617 is = buildOfficialDict { 618 language = "is"; 619 version = "0.51.1-0"; 620 fullName = "Icelandic"; 621 filename = "aspell"; 622 sha256 = "1mp3248lhbr13cj7iq9zs7h5ix0dcwlprp5cwrkcwafrv8lvsd9h"; 623 meta.license = lib.licenses.gpl2Only; 624 }; 625 626 it = buildOfficialDict { 627 language = "it"; 628 version = "2.2_20050523-0"; 629 fullName = "Italian"; 630 filename = "aspell6"; 631 sha256 = "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v"; 632 meta.license = lib.licenses.gpl2Plus; 633 }; 634 635 kn = buildOfficialDict { 636 language = "kn"; 637 version = "0.01-1"; 638 fullName = "Kannada"; 639 filename = "aspell6"; 640 sha256 = "10sk0wx4x4ds1403kf9dqxv9yjvh06w8qqf4agx57y0jlws0n0fb"; 641 meta.license = lib.licenses.gpl3Only; 642 }; 643 644 ku = buildOfficialDict { 645 language = "ku"; 646 version = "0.20-1"; 647 fullName = "Kurdi"; 648 filename = "aspell5"; 649 sha256 = "09va98krfbgdaxl101nmd85j3ysqgg88qgfcl42c07crii0pd3wn"; 650 meta.license = lib.licenses.gpl2Only; 651 }; 652 653 ky = buildOfficialDict { 654 language = "ky"; 655 version = "0.01-0"; 656 fullName = "Kirghiz"; 657 filename = "aspell6"; 658 sha256 = "0kzv2syjnnn6pnwx0d578n46hg2l0j62977al47y6wabnhjjy3z1"; 659 meta.license = lib.licenses.gpl2Only; 660 }; 661 662 la = buildOfficialDict { 663 language = "la"; 664 version = "20020503-0"; 665 fullName = "Latin"; 666 filename = "aspell6"; 667 sha256 = "1199inwi16dznzl087v4skn66fl7h555hi2palx6s1f3s54b11nl"; 668 meta.license = lib.licenses.gpl2Only; 669 }; 670 671 lt = buildOfficialDict { 672 language = "lt"; 673 version = "1.2.1-0"; 674 fullName = "Lithuanian"; 675 filename = "aspell6"; 676 sha256 = "1asjck911l96q26zj36lmz0jp4b6pivvrf3h38zgc8lc85p3pxgn"; 677 meta.license = lib.licenses.bsd3; 678 }; 679 680 lv = buildOfficialDict { 681 language = "lv"; 682 version = "0.5.5-1"; 683 fullName = "Latvian"; 684 filename = "aspell6"; 685 sha256 = "12pvs584a6437ijndggdqpp5s7d0w607cimpkxsjwasnx83f4c1w"; 686 meta.license = lib.licenses.gpl2Only; 687 }; 688 689 mg = buildOfficialDict { 690 language = "mg"; 691 version = "0.03-0"; 692 fullName = "Malagasy"; 693 filename = "aspell5"; 694 sha256 = "0hdhbk9b5immjp8l5h4cy82gwgsqzcqbb0qsf7syw333w4rgi0ji"; 695 meta.license = lib.licenses.gpl2Only; 696 }; 697 698 mi = buildOfficialDict { 699 language = "mi"; 700 version = "0.50-0"; 701 fullName = "Maori"; 702 filename = "aspell"; 703 sha256 = "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy"; 704 meta.license = lib.licenses.lgpl21Only; 705 }; 706 707 mk = buildOfficialDict { 708 language = "mk"; 709 version = "0.50-0"; 710 fullName = "Macedonian"; 711 filename = "aspell"; 712 sha256 = "0wcr9n882xi5b7a7ln1hnhq4vfqd5gpqqp87v01j0gb7zf027z0m"; 713 meta.license = lib.licenses.gpl2Only; 714 }; 715 716 ml = buildOfficialDict { 717 language = "ml"; 718 version = "0.03-1"; 719 fullName = "Malayalam"; 720 filename = "aspell6"; 721 sha256 = "1zcn4114gwia085fkz77qk13z29xrbp53q2qvgj2cvcbalg5bkg4"; 722 meta.license = lib.licenses.gpl3Only; 723 }; 724 725 mn = buildOfficialDict { 726 language = "mn"; 727 version = "0.06-2"; 728 fullName = "Mongolian"; 729 filename = "aspell6"; 730 sha256 = "150j9y5c9pw80fwp5rzl5q31q9vjbxixaqljkfwxjb5q93fnw6rg"; 731 meta.license = lib.licenses.gpl2Only; 732 }; 733 734 mr = buildOfficialDict { 735 language = "mr"; 736 version = "0.10-0"; 737 fullName = "Marathi"; 738 filename = "aspell6"; 739 sha256 = "0cvgb2l40sppqbi842ivpznsh2xzp1d4hxc371dll8z0pr05m8yk"; 740 meta.license = lib.licenses.gpl2Only; 741 }; 742 743 ms = buildOfficialDict { 744 language = "ms"; 745 version = "0.50-0"; 746 fullName = "Malay"; 747 filename = "aspell"; 748 sha256 = "0vr4vhipcfhsxqfs8dim2ph7iiixn22gmlmlb375bx5hgd9y7i1w"; 749 meta.license = lib.licenses.fdl12Only; 750 }; 751 752 mt = buildOfficialDict { 753 language = "mt"; 754 version = "0.50-0"; 755 fullName = "Maltese"; 756 filename = "aspell"; 757 sha256 = "1d2rl1nlfjq6rfywblvx8m88cyy2x0mzc0mshzbgw359c2nwl3z0"; 758 meta.license = lib.licenses.lgpl21Only; 759 }; 760 761 nb = buildOfficialDict { 762 language = "nb"; 763 version = "0.50.1-0"; 764 fullName = "Norwegian Bokmal"; 765 filename = "aspell"; 766 sha256 = "12i2bmgdnlkzfinb20j2a0j4a20q91a9j8qpq5vgabbvc65nwx77"; 767 meta.license = lib.licenses.gpl2Only; 768 }; 769 770 nds = buildOfficialDict { 771 language = "nds"; 772 version = "0.01-0"; 773 fullName = "Low Saxon"; 774 filename = "aspell6"; 775 sha256 = "1nkjhwzn45dizi89d19q4bqyd87cim8xyrgr655fampgkn31wf6f"; 776 meta.license = lib.licenses.lgpl21Only; 777 }; 778 779 nl = buildOfficialDict { 780 language = "nl"; 781 version = "0.50-2"; 782 fullName = "Dutch"; 783 filename = "aspell"; 784 sha256 = "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4"; 785 # Emacs expects a language called "nederlands". 786 postInstall = '' 787 echo "add nl.rws" > $out/lib/aspell/nederlands.multi 788 ''; 789 # from the Copyright file: 790 # > The nl-aspell package includes the GPL COPYRIGHT file but no explicit copyright 791 # > notice. Since he was using autoconf this could have been added automatically. 792 # wtf whatever 793 meta.license = lib.licenses.free; 794 }; 795 796 nn = buildOfficialDict { 797 language = "nn"; 798 version = "0.50.1-1"; 799 fullName = "Norwegian Nynorsk"; 800 filename = "aspell"; 801 sha256 = "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc"; 802 meta.license = lib.licenses.gpl2Only; 803 }; 804 805 ny = buildOfficialDict { 806 language = "ny"; 807 version = "0.01-0"; 808 fullName = "Chichewa"; 809 filename = "aspell5"; 810 sha256 = "0gjb92vcg60sfgvrm2f6i89sfkgb179ahvwlgs649fx3dc7rfvqp"; 811 meta.license = lib.licenses.gpl2Only; 812 }; 813 814 "or" = buildOfficialDict { 815 language = "or"; 816 version = "0.03-1"; 817 fullName = "Oriya"; 818 filename = "aspell6"; 819 sha256 = "0kzj9q225z0ccrlbkijsrafy005pbjy14qcnxb6p93ciz1ls7zyn"; 820 meta.license = lib.licenses.gpl2Only; 821 }; 822 823 pa = buildOfficialDict { 824 language = "pa"; 825 version = "0.01-1"; 826 fullName = "Punjabi"; 827 filename = "aspell6"; 828 sha256 = "0if93zk10pyrs38wwj3vpcdm01h51m5z9gm85h3jxrpgqnqspwy7"; 829 meta.license = lib.licenses.gpl2Only; 830 }; 831 832 pl = buildOfficialDict { 833 language = "pl"; 834 version = "6.0_20061121-0"; 835 fullName = "Polish"; 836 filename = "aspell6"; 837 sha256 = "0kap4kh6bqbb22ypja1m5z3krc06vv4n0hakiiqmv20anzy42xq1"; 838 meta.license = with lib.licenses; [ 839 gpl2Only 840 lgpl21Only 841 mpl11 842 cc-sa-10 843 ]; 844 }; 845 846 pt_BR = buildOfficialDict { 847 language = "pt_BR"; 848 version = "20131030-12-0"; 849 fullName = "Brazilian Portuguese"; 850 filename = "aspell6"; 851 sha256 = "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb"; 852 meta.license = with lib.licenses; [ 853 lgpl21Only 854 lgpl21Plus 855 gpl3Plus 856 ]; 857 }; 858 859 pt_PT = buildOfficialDict { 860 language = "pt_PT"; 861 version = "20190329-1-0"; 862 fullName = "Portuguese"; 863 filename = "aspell6"; 864 sha256 = "0ld0d0ily4jqifjfsxfv4shbicz6ymm2gk56fq9gbzra1j4qnw75"; 865 meta.license = with lib.licenses; [ 866 lgpl21Plus 867 gpl3Plus 868 mpl11 869 ]; 870 }; 871 872 qu = buildOfficialDict { 873 language = "qu"; 874 version = "0.02-0"; 875 fullName = "Quechua"; 876 filename = "aspell6"; 877 sha256 = "009z0zsvzq7r3z3m30clyibs94v77b92h5lmzmzxlns2p0lpd5w0"; 878 meta.license = lib.licenses.gpl2Only; 879 }; 880 881 ro = buildOfficialDict { 882 language = "ro"; 883 version = "3.3-2"; 884 fullName = "Romanian"; 885 filename = "aspell5"; 886 sha256 = "0gb8j9iy1acdl11jq76idgc2lbc1rq3w04favn8cyh55d1v8phsk"; 887 meta.license = lib.licenses.gpl2Only; 888 }; 889 890 ru = buildOfficialDict { 891 language = "ru"; 892 version = "0.99f7-1"; 893 fullName = "Russian"; 894 filename = "aspell6"; 895 sha256 = "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw"; 896 meta.license = lib.licenses.free; 897 }; 898 899 rw = buildOfficialDict { 900 language = "rw"; 901 version = "0.50-0"; 902 fullName = "Kinyarwanda"; 903 filename = "aspell"; 904 sha256 = "10gh8g747jbrvfk2fn3pjxy1nhcfdpwgmnvkmrp4nd1k1qp101il"; 905 meta.license = lib.licenses.gpl2Only; 906 }; 907 908 sc = buildOfficialDict { 909 language = "sc"; 910 version = "1.0"; 911 fullName = "Sardinian"; 912 filename = "aspell5"; 913 sha256 = "0hl7prh5rccsyljwrv3m1hjcsphyrrywk2qvnj122irbf4py46jr"; 914 meta.license = lib.licenses.gpl2Only; 915 }; 916 917 sk = buildOfficialDict { 918 language = "sk"; 919 version = "2.01-2"; 920 fullName = "Slovak"; 921 filename = "aspell6"; 922 sha256 = "19k0m1v5pcf7xr4lxgjkzqkdlks8nyb13bvi1n7521f3i4lhma66"; 923 meta.license = with lib.licenses; [ 924 lgpl21Only 925 gpl2Only 926 mpl11 927 ]; 928 }; 929 930 sl = buildOfficialDict { 931 language = "sl"; 932 version = "0.50-0"; 933 fullName = "Slovenian"; 934 filename = "aspell"; 935 sha256 = "1l9kc5g35flq8kw9jhn2n0bjb4sipjs4qkqzgggs438kywkx2rp5"; 936 meta.license = lib.licenses.gpl2Only; 937 }; 938 939 sr = buildOfficialDict { 940 language = "sr"; 941 version = "0.02"; 942 fullName = "Serbian"; 943 filename = "aspell6"; 944 sha256 = "12cj01p4nj80cpf7m3s4jsaf0rsfng7s295j9jfchcq677xmhpkh"; 945 meta.license = lib.licenses.lgpl21Only; 946 }; 947 948 sv = buildOfficialDict { 949 language = "sv"; 950 version = "0.51-0"; 951 fullName = "Swedish"; 952 filename = "aspell"; 953 sha256 = "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v"; 954 meta.license = lib.licenses.lgpl21Only; 955 }; 956 957 sw = buildOfficialDict { 958 language = "sw"; 959 version = "0.50-0"; 960 fullName = "Swahili"; 961 filename = "aspell"; 962 sha256 = "15zjh7hdj2b4dgm5bc12w1ims9q357p1q3gjalspnyn5gl81zmby"; 963 meta.license = lib.licenses.lgpl21Only; 964 }; 965 966 ta = buildOfficialDict { 967 language = "ta"; 968 version = "20040424-1"; 969 fullName = "Tamil"; 970 filename = "aspell6"; 971 sha256 = "0sj8ygjsyvnr93cs6324y7az7k2vyw7rjxdc9vnm7z60lbqm5xaj"; 972 meta.license = lib.licenses.gpl2Only; 973 }; 974 975 te = buildOfficialDict { 976 language = "te"; 977 version = "0.01-2"; 978 fullName = "Telugu"; 979 filename = "aspell6"; 980 sha256 = "0pgcgxz7dz34zxp9sb85jjzbg3ky6il5wmhffz6ayrbsfn5670in"; 981 meta.license = lib.licenses.gpl2Only; 982 }; 983 984 tet = buildOfficialDict { 985 language = "tet"; 986 version = "0.1.1"; 987 fullName = "Tetum"; 988 filename = "aspell5"; 989 sha256 = "17n0y4fhjak47j9qnqf4m4z6zra6dn72rwhp7ig0hhlgqk4ldmcx"; 990 meta.license = lib.licenses.gpl2Only; 991 }; 992 993 tk = buildOfficialDict { 994 language = "tk"; 995 version = "0.01-0"; 996 fullName = "Turkmen"; 997 filename = "aspell5"; 998 sha256 = "02vad4jqhr0xpzqi5q5z7z0xxqccbn8j0c5dhpnm86mnr84l5wl6"; 999 meta.license = lib.licenses.gpl2Only; 1000 }; 1001 1002 tl = buildOfficialDict { 1003 language = "tl"; 1004 version = "0.02-1"; 1005 fullName = "Tagalog"; 1006 filename = "aspell5"; 1007 sha256 = "1kca6k7qnpfvvwjnq5r1n242payqsjy96skmw78m7ww6d0n5vdj8"; 1008 meta.license = lib.licenses.gpl2Only; 1009 }; 1010 1011 tn = buildOfficialDict { 1012 language = "tn"; 1013 version = "1.0.1-0"; 1014 fullName = "Setswana"; 1015 filename = "aspell5"; 1016 sha256 = "0q5x7c6z88cn0kkpk7q1craq34g4g03v8x3xcj5a5jia3l7c5821"; 1017 meta.license = lib.licenses.gpl2Only; 1018 }; 1019 1020 tr = buildOfficialDict { 1021 language = "tr"; 1022 version = "0.50-0"; 1023 fullName = "Turkish"; 1024 filename = "aspell"; 1025 sha256 = "0jpvpm96ga7s7rmsm6rbyrrr22b2dicxv2hy7ysv5y7bbq757ihb"; 1026 meta.license = lib.licenses.gpl2Only; 1027 }; 1028 1029 uk = buildOfficialDict { 1030 language = "uk"; 1031 version = "1.4.0-0"; 1032 fullName = "Ukrainian"; 1033 filename = "aspell6"; 1034 sha256 = "137i4njvnslab6l4s291s11xijr5jsy75lbdph32f9y183lagy9m"; 1035 meta.license = with lib.licenses; [ 1036 lgpl2Plus 1037 gpl2Plus 1038 ]; 1039 }; 1040 1041 uz = buildOfficialDict { 1042 language = "uz"; 1043 version = "0.6-0"; 1044 fullName = "Uzbek"; 1045 filename = "aspell6"; 1046 sha256 = "0sg3wlyply1idpq5ypyj7kgnaadaiskci1sqs811yhg2gzyc3092"; 1047 meta.license = lib.licenses.gpl2Only; 1048 }; 1049 1050 vi = buildOfficialDict { 1051 language = "vi"; 1052 version = "0.01.1-1"; 1053 fullName = "Vietnamese"; 1054 filename = "aspell6"; 1055 sha256 = "05vwgvf1cj45azhflywx69javqdvqd1f20swrc2d3c32pd9mvn1w"; 1056 meta.license = lib.licenses.gpl2Only; 1057 }; 1058 1059 wa = buildOfficialDict { 1060 language = "wa"; 1061 version = "0.50-0"; 1062 fullName = "Walloon"; 1063 filename = "aspell"; 1064 sha256 = "1r1zwz7xkx40dga9vf5wc9ja3jwk1dkpcr1kaa7wryvslf5al5ss"; 1065 meta.license = lib.licenses.gpl2Only; 1066 }; 1067 1068 yi = buildOfficialDict { 1069 language = "yi"; 1070 version = "0.01.1-1"; 1071 fullName = "Yiddish"; 1072 filename = "aspell6"; 1073 sha256 = "0mi842l4038bx3ll2wx9nz44nqrg1x46h5b02zigi1hbbddd6ycq"; 1074 meta.license = lib.licenses.gpl2Only; 1075 }; 1076 1077 zu = buildOfficialDict { 1078 language = "zu"; 1079 version = "0.50-0"; 1080 fullName = "Zulu"; 1081 filename = "aspell"; 1082 sha256 = "15k7gaxrnqnssdyk9l6g27dq317dqp9jz5yzafd25ri01g6mb8iz"; 1083 meta.license = lib.licenses.lgpl21Only; 1084 }; 1085 1086 ### Jargons 1087 1088 en-computers = buildTxtDict { 1089 shortName = "en-computers"; 1090 fullName = "English Computer Jargon"; 1091 version = "0"; 1092 1093 src = fetchurl { 1094 url = "https://mrsatterly.com/computer.dic"; 1095 sha256 = "1vzk7cdvcm9r1c6mgxpabrdcpvghdv9mjmnf6iq5wllcif5nsw2b"; 1096 }; 1097 1098 langInputs = [ en ]; 1099 1100 buildPhase = '' 1101 runHook preBuild 1102 cat $src | aspell-affix en-computers --dont-validate-words --lang=en 1103 runHook postBuild 1104 ''; 1105 installPhase = "aspell-install en-computers"; 1106 1107 meta = { 1108 homepage = "https://mrsatterly.com/spelling.html"; 1109 license = lib.licenses.wtfpl; # as a comment the source file 1110 }; 1111 }; 1112 1113 en-science = buildTxtDict { 1114 shortName = "en-science"; 1115 fullName = "English Scientific Jargon"; 1116 version = "0-unstable-2015-07-27"; 1117 1118 src1 = fetchurl { 1119 url = "https://web.archive.org/web/20180806094650if_/http://jpetrie.net/wp-content/uploads/custom_scientific_US.txt"; 1120 hash = "sha256-I5d/jf/5v9Nptu2H9qfvMBzSwJYoQOTEzJfQTxKoWN8="; 1121 }; 1122 1123 src2 = fetchurl { 1124 url = "https://web.archive.org/web/20180131231829if_/http://jpetrie.net/wp-content/uploads/custom_scientific_UK.txt"; 1125 hash = "sha256-oT4nUiev5q4QjHeuF8jNVBcyyHE9fdH9+uDMkZsOWp8="; 1126 }; 1127 1128 langInputs = [ en ]; 1129 1130 buildPhase = '' 1131 runHook preBuild 1132 cat $src1 | aspell-plain en_US-science --dont-validate-words --lang=en 1133 cat $src2 | aspell-plain en_GB-science --dont-validate-words --lang=en 1134 runHook postBuild 1135 ''; 1136 installPhase = "aspell-install en_US-science en_GB-science"; 1137 1138 meta = { 1139 homepage = "https://web.archive.org/web/20210425104207/http://www.jpetrie.net/scientific-word-list-for-spell-checkersspelling-dictionaries/"; 1140 # no license is given so we have to assume it is unfree 1141 license = lib.licenses.unfree; 1142 }; 1143 1144 }; 1145 1146}