| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> |
| 4 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> |
| 5 | ;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il> |
| 6 | ;;; Copyright © 2016 Christopher Andersson <christopher@8bits.nu> |
| 7 | ;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org> |
| 8 | ;;; Copyright © 2016, 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr> |
| 9 | ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk> |
| 10 | ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si> |
| 11 | ;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl> |
| 12 | ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de> |
| 13 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
| 14 | ;;; Copyright © 2020 Noah Landis <noahlandis@posteo.net> |
| 15 | ;;; Copyright © 2021 Sergiu Ivanov <sivanov@colimite.fr> |
| 16 | ;;; |
| 17 | ;;; This file is part of GNU Guix. |
| 18 | ;;; |
| 19 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 20 | ;;; under the terms of the GNU General Public License as published by |
| 21 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 22 | ;;; your option) any later version. |
| 23 | ;;; |
| 24 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 25 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 26 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 27 | ;;; GNU General Public License for more details. |
| 28 | ;;; |
| 29 | ;;; You should have received a copy of the GNU General Public License |
| 30 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 31 | |
| 32 | (define-module (gnu packages aspell) |
| 33 | #:use-module (guix packages) |
| 34 | #:use-module (guix download) |
| 35 | #:use-module (guix build-system gnu) |
| 36 | #:use-module (guix licenses) |
| 37 | #:use-module (guix utils) |
| 38 | #:use-module (gnu packages) |
| 39 | #:use-module (gnu packages base) |
| 40 | #:use-module (gnu packages bison) |
| 41 | #:use-module (gnu packages compression) |
| 42 | #:use-module (gnu packages ncurses) |
| 43 | #:use-module (gnu packages perl) |
| 44 | #:use-module (ice-9 match)) |
| 45 | |
| 46 | (define-public aspell |
| 47 | (package |
| 48 | (name "aspell") |
| 49 | (version "0.60.8") |
| 50 | (source |
| 51 | (origin |
| 52 | (method url-fetch) |
| 53 | (uri (string-append "mirror://gnu/aspell/aspell-" |
| 54 | version ".tar.gz")) |
| 55 | (sha256 |
| 56 | (base32 |
| 57 | "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr")) |
| 58 | (patches (search-patches "aspell-default-dict-dir.patch")))) |
| 59 | (build-system gnu-build-system) |
| 60 | (arguments |
| 61 | `(#:phases |
| 62 | (modify-phases %standard-phases |
| 63 | (add-before 'build 'set-filter-path |
| 64 | (lambda* (#:key outputs #:allow-other-keys) |
| 65 | ;; Change the default value of 'filter-path' so that filters such |
| 66 | ;; as 'tex-filter.so' can be found. By default none of the |
| 67 | ;; filters would be found. |
| 68 | (let* ((out (assoc-ref outputs "out")) |
| 69 | (libdir (string-append out "/lib/aspell-" |
| 70 | ,(version-major+minor version)))) |
| 71 | (substitute* "common/config.cpp" |
| 72 | (("\"filter-path(.*)DICT_DIR" _ middle) |
| 73 | (string-append "\"filter-path" middle |
| 74 | "\"" libdir "\""))) |
| 75 | #t)))))) |
| 76 | (inputs `(("perl" ,perl))) |
| 77 | |
| 78 | (native-search-paths |
| 79 | ;; This is a Guix-specific environment variable that takes a single |
| 80 | ;; entry, not an actual search path. |
| 81 | (list (search-path-specification |
| 82 | (variable "ASPELL_DICT_DIR") |
| 83 | (separator #f) |
| 84 | (files '("lib/aspell"))))) |
| 85 | |
| 86 | (home-page "http://aspell.net/") |
| 87 | (synopsis "Spell checker") |
| 88 | (description |
| 89 | "Aspell is a spell-checker which can be used either as a library or as |
| 90 | a standalone program. Notable features of Aspell include its full support of |
| 91 | documents written in the UTF-8 encoding and its ability to use multiple |
| 92 | dictionaries, including personal ones.") |
| 93 | (license lgpl2.1+))) |
| 94 | |
| 95 | ;;; |
| 96 | ;;; Dictionaries. |
| 97 | ;;; |
| 98 | ;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use |
| 99 | ;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as |
| 100 | ;;; long as 'HOME' is set, that's fine!). |
| 101 | ;;; |
| 102 | |
| 103 | (define* (aspell-dictionary dict-name full-name |
| 104 | #:key version sha256 (prefix "aspell6-")) |
| 105 | (package |
| 106 | (name (string-append |
| 107 | "aspell-dict-" |
| 108 | ;; Downcase and replace underscore in package names |
| 109 | ;; to follow Guix naming conventions. |
| 110 | (string-map (match-lambda |
| 111 | (#\_ #\-) |
| 112 | (chr chr)) |
| 113 | (string-downcase dict-name)))) |
| 114 | (version version) |
| 115 | (source (origin |
| 116 | (method url-fetch) |
| 117 | (uri (string-append "mirror://gnu/aspell/dict/" dict-name |
| 118 | "/" prefix dict-name "-" |
| 119 | version ".tar.bz2")) |
| 120 | (hash (content-hash sha256)))) |
| 121 | (build-system gnu-build-system) |
| 122 | (arguments |
| 123 | `(#:phases |
| 124 | (modify-phases %standard-phases |
| 125 | (replace 'configure |
| 126 | (lambda* (#:key outputs #:allow-other-keys) |
| 127 | (let ((out (assoc-ref outputs "out"))) |
| 128 | (invoke "./configure"))))) |
| 129 | #:make-flags |
| 130 | (let ((out (assoc-ref %outputs "out"))) |
| 131 | (list (string-append "dictdir=" out "/lib/aspell") |
| 132 | (string-append "datadir=" out "/lib/aspell"))) |
| 133 | #:tests? #f)) |
| 134 | (native-inputs `(("aspell" ,aspell) |
| 135 | ("which" ,which))) |
| 136 | (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n |
| 137 | (description |
| 138 | "This package provides a dictionary for the GNU Aspell spell checker.") |
| 139 | (license gpl2+) |
| 140 | (home-page "http://aspell.net/"))) |
| 141 | |
| 142 | |
| 143 | (define-public aspell-dict-ar |
| 144 | (aspell-dictionary "ar" "Arabic" |
| 145 | #:version "1.2-0" |
| 146 | #:prefix "aspell6-" |
| 147 | #:sha256 |
| 148 | (base32 |
| 149 | "1avw40bp8yi5bnkq64ihm2rldgw34lk89yz281q9bmndh95a47h4"))) |
| 150 | |
| 151 | (define-public aspell-dict-be |
| 152 | (aspell-dictionary "be" "Belarusian" |
| 153 | #:version "0.01" |
| 154 | #:prefix "aspell5-" |
| 155 | #:sha256 |
| 156 | (base32 |
| 157 | "1svls9p7rsfi3hs0afh0cssj006qb4v1ik2yzqgj8hm10c6as2sm"))) |
| 158 | |
| 159 | (define-public aspell-dict-ca |
| 160 | (let ((version "2.5.0") |
| 161 | (sha256 |
| 162 | (base32 "0kbi8fi7a1bys31kfqrlh332gyik0cfdmxgl7n15sa9c305rkgwq"))) |
| 163 | (package |
| 164 | (inherit (aspell-dictionary "ca" "Catalan" |
| 165 | #:version version |
| 166 | #:sha256 sha256)) |
| 167 | (source |
| 168 | (origin |
| 169 | (method url-fetch) |
| 170 | (uri (string-append "https://www.softcatala.org/pub/softcatala/aspell/" |
| 171 | version "/aspell6-ca-" version ".tar.bz2")) |
| 172 | (hash (content-hash sha256)))) |
| 173 | (home-page "https://www.softcatala.org/pub/softcatala/aspell/")))) |
| 174 | |
| 175 | (define-public aspell-dict-cs |
| 176 | (aspell-dictionary "cs" "Czech" |
| 177 | #:version "20040614-1" |
| 178 | #:sha256 |
| 179 | (base32 |
| 180 | "0rihj4hsw96pd9casvmpvw3r8040pfa28p1h73x4vyn20zwr3h01"))) |
| 181 | |
| 182 | (define-public aspell-dict-de |
| 183 | (aspell-dictionary "de" "German" |
| 184 | #:version "20161207-7-0" |
| 185 | #:sha256 |
| 186 | (base32 |
| 187 | "0wamclvp66xfmv5wff96v6gdlnfv4y8lx3f8wvxyzm5imwgms4n2"))) |
| 188 | |
| 189 | (define-public aspell-dict-da |
| 190 | (aspell-dictionary "da" "Danish" |
| 191 | #:version "1.6.36-11-0" |
| 192 | #:sha256 |
| 193 | (base32 |
| 194 | "1xz2haayvwlxgss9jf1x2311a1ixbk75q2vgfprjhibsmb7cpinv"))) |
| 195 | |
| 196 | (define-public aspell-dict-el |
| 197 | (aspell-dictionary "el" "Greek" |
| 198 | #:version "0.08-0" |
| 199 | #:prefix "aspell6-" |
| 200 | #:sha256 |
| 201 | (base32 |
| 202 | "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja"))) |
| 203 | |
| 204 | (define-public aspell-dict-en |
| 205 | (aspell-dictionary "en" "English" |
| 206 | #:version "2020.12.07-0" |
| 207 | #:sha256 |
| 208 | (base32 |
| 209 | "1cwzqkm8gr1w51rpckwlvb43sb0b5nbwy7s8ns5vi250515773sc"))) |
| 210 | |
| 211 | (define-public aspell-dict-eo |
| 212 | (aspell-dictionary "eo" "Esperanto" |
| 213 | #:version "2.1.20000225a-2" |
| 214 | #:sha256 |
| 215 | (base32 |
| 216 | "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1"))) |
| 217 | |
| 218 | (define-public aspell-dict-es |
| 219 | (aspell-dictionary "es" "Spanish" |
| 220 | #:version "1.11-2" |
| 221 | #:sha256 |
| 222 | (base32 |
| 223 | "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd"))) |
| 224 | |
| 225 | (define-public aspell-dict-fi |
| 226 | (aspell-dictionary "fi" "Finnish" |
| 227 | #:version "0.7-0" |
| 228 | #:prefix "aspell6-" |
| 229 | #:sha256 |
| 230 | (base32 |
| 231 | "07d5s08ba4dd89cmwy9icc01i6fjdykxlb9ravmhdrhi8mxz1mzq"))) |
| 232 | |
| 233 | (define-public aspell-dict-fr |
| 234 | (aspell-dictionary "fr" "French" |
| 235 | #:version "0.50-3" |
| 236 | #:prefix "aspell-" |
| 237 | #:sha256 |
| 238 | (base32 |
| 239 | "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr"))) |
| 240 | |
| 241 | (define-public aspell-dict-grc |
| 242 | (aspell-dictionary "grc" "Ancient Greek" |
| 243 | #:version "0.02-0" |
| 244 | #:sha256 |
| 245 | (base32 |
| 246 | "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512"))) |
| 247 | |
| 248 | (define-public aspell-dict-he |
| 249 | (aspell-dictionary "he" "Hebrew" |
| 250 | #:version "1.0-0" |
| 251 | #:sha256 |
| 252 | (base32 |
| 253 | "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn"))) |
| 254 | |
| 255 | (define-public aspell-dict-hi |
| 256 | (aspell-dictionary "hi" "Hindi" |
| 257 | #:version "0.02-0" |
| 258 | #:prefix "aspell6-" |
| 259 | #:sha256 |
| 260 | (base32 |
| 261 | "0drs374qz4419zx1lf2k281ydxf2750jk5ailafj1x0ncz27h1ys"))) |
| 262 | |
| 263 | (define-public aspell-dict-it |
| 264 | (let ((version "2.4-20070901-0") |
| 265 | (sha256 |
| 266 | (base32 "0d6ypii3jblprpibazb6ypady536jz62rwxlss1x1raq07rhvvqn"))) |
| 267 | (package |
| 268 | (inherit (aspell-dictionary "it" "Italian" |
| 269 | #:version version |
| 270 | #:sha256 sha256)) |
| 271 | |
| 272 | ;; The version hosted at <https://ftp.gnu.org/gnu/aspell/dict> is even |
| 273 | ;; more out of date. |
| 274 | (source |
| 275 | (origin |
| 276 | (method url-fetch) |
| 277 | (uri (string-append "mirror://sourceforge/linguistico/" |
| 278 | "Dizionario%20italiano%20per%20Aspell/" version "/" |
| 279 | "aspell6-it-" version ".tar.bz2")) |
| 280 | (hash (content-hash sha256)))) |
| 281 | (home-page |
| 282 | "http://linguistico.sourceforge.net/pages/dizionario_italiano.html")))) |
| 283 | |
| 284 | (define-public aspell-dict-mi |
| 285 | (aspell-dictionary "mi" "Maori" |
| 286 | #:version "0.50-0" |
| 287 | #:prefix "aspell-" |
| 288 | #:sha256 |
| 289 | (base32 |
| 290 | "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy"))) |
| 291 | |
| 292 | (define-public aspell-dict-nl |
| 293 | (aspell-dictionary "nl" "Dutch" |
| 294 | #:version "0.50-2" |
| 295 | #:prefix "aspell-" |
| 296 | #:sha256 |
| 297 | (base32 |
| 298 | "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4"))) |
| 299 | |
| 300 | (define-public aspell-dict-nn |
| 301 | (aspell-dictionary "nn" "Norwegian Nynorsk" |
| 302 | #:version "0.50.1-1" |
| 303 | #:prefix "aspell-" |
| 304 | #:sha256 |
| 305 | (base32 |
| 306 | "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc"))) |
| 307 | |
| 308 | (define-public aspell-dict-pl |
| 309 | (aspell-dictionary "pl" "Polish" |
| 310 | #:version "0.51-0" |
| 311 | #:prefix "aspell-" |
| 312 | #:sha256 |
| 313 | (base32 |
| 314 | "1a3ccji6k5gys7l3ilr2lh5pzxgzb7ipc5vb737svl6nqgdy8757"))) |
| 315 | |
| 316 | (define-public aspell-dict-pt-br |
| 317 | (aspell-dictionary "pt_BR" "Brazilian Portuguese" |
| 318 | #:version "20131030-12-0" |
| 319 | #:sha256 |
| 320 | (base32 |
| 321 | "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb"))) |
| 322 | |
| 323 | (define-public aspell-dict-pt-pt |
| 324 | (aspell-dictionary "pt_PT" "Portuguese" |
| 325 | #:version "20190329-1-0" |
| 326 | #:sha256 |
| 327 | (base32 |
| 328 | "0ld0d0ily4jqifjfsxfv4shbicz6ymm2gk56fq9gbzra1j4qnw75"))) |
| 329 | |
| 330 | (define-public aspell-dict-ru |
| 331 | (aspell-dictionary "ru" "Russian" |
| 332 | #:version "0.99f7-1" |
| 333 | #:sha256 |
| 334 | (base32 |
| 335 | "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw"))) |
| 336 | |
| 337 | (define-public aspell-dict-sl |
| 338 | (aspell-dictionary "sl" "Slovenian" |
| 339 | #:version "0.50-0" |
| 340 | #:prefix "aspell-" |
| 341 | #:sha256 |
| 342 | (base32 |
| 343 | "1l9kc5g35flq8kw9jhn2n0bjb4sipjs4qkqzgggs438kywkx2rp5"))) |
| 344 | |
| 345 | (define-public aspell-dict-sv |
| 346 | (aspell-dictionary "sv" "Swedish" |
| 347 | #:version "0.51-0" |
| 348 | #:prefix "aspell-" |
| 349 | #:sha256 |
| 350 | (base32 |
| 351 | "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v"))) |
| 352 | |
| 353 | (define-public aspell-dict-uk |
| 354 | (aspell-dictionary "uk" "Ukrainian" |
| 355 | #:version "1.4.0-0" |
| 356 | #:sha256 |
| 357 | (base32 |
| 358 | "137i4njvnslab6l4s291s11xijr5jsy75lbdph32f9y183lagy9m"))) |
| 359 | |
| 360 | (define-public aspell-dict-ro |
| 361 | (aspell-dictionary "ro" "Romanian" |
| 362 | #:version "3.3-2" |
| 363 | #:prefix "aspell5-" |
| 364 | #:sha256 |
| 365 | (base32 |
| 366 | "0gb8j9iy1acdl11jq76idgc2lbc1rq3w04favn8cyh55d1v8phsk"))) |
| 367 | |
| 368 | \f |
| 369 | ;;; |
| 370 | ;;; Hunspell packages made from the Aspell word lists. |
| 371 | ;;; |
| 372 | |
| 373 | (define* (aspell-word-list language synopsis |
| 374 | #:optional |
| 375 | (nick (string-map (lambda (chr) |
| 376 | (if (char=? #\_ chr) |
| 377 | #\- |
| 378 | chr)) |
| 379 | (string-downcase language)))) |
| 380 | (package |
| 381 | (name (string-append "hunspell-dict-" nick)) |
| 382 | (version "2018.04.16") |
| 383 | (source (origin |
| 384 | (method url-fetch) |
| 385 | (uri (string-append |
| 386 | "mirror://sourceforge/wordlist/SCOWL/" |
| 387 | version "/scowl-" version ".tar.gz")) |
| 388 | (sha256 |
| 389 | (base32 |
| 390 | "11lkrnhwrf5mvrrq45k4mads3n9aswgac8dc25ba61c75alxb5rs")))) |
| 391 | (native-inputs |
| 392 | `(("tar" ,tar) |
| 393 | ("gzip" ,gzip) |
| 394 | ("perl" ,perl) |
| 395 | ("aspell" ,aspell))) |
| 396 | (build-system gnu-build-system) |
| 397 | (arguments |
| 398 | `(#:phases |
| 399 | (modify-phases %standard-phases |
| 400 | (add-after 'unpack 'make-reproducible |
| 401 | (lambda _ |
| 402 | (substitute* "speller/README_en.txt.sh" |
| 403 | (("\\bdate\\b") "")))) |
| 404 | (delete 'configure) |
| 405 | (delete 'check) |
| 406 | (replace 'build |
| 407 | (lambda _ |
| 408 | (substitute* "speller/make-hunspell-dict" |
| 409 | (("zip -9 .*$") |
| 410 | "return\n")) |
| 411 | (mkdir "speller/hunspell") |
| 412 | |
| 413 | ;; XXX: This actually builds all the dictionary variants. |
| 414 | (invoke "make" "-C" "speller" "hunspell"))) |
| 415 | (replace 'install |
| 416 | (lambda* (#:key outputs #:allow-other-keys) |
| 417 | (let* ((out (assoc-ref %outputs "out")) |
| 418 | (hunspell (string-append out "/share/hunspell")) |
| 419 | (myspell (string-append out "/share/myspell")) |
| 420 | (doc (string-append out "/share/doc/" |
| 421 | ,name)) |
| 422 | (dot-dic ,(string-append "speller/" language ".dic"))) |
| 423 | (mkdir-p myspell) |
| 424 | |
| 425 | ;; Usually there's only a 'LANGUAGE.dic' file, but for the "en" |
| 426 | ;; dictionary, there no 'en.dic'. Instead, there's a set of |
| 427 | ;; 'en*.dic' files, hence the 'find-files' call below. |
| 428 | (if (file-exists? dot-dic) |
| 429 | (install-file dot-dic hunspell) |
| 430 | (for-each (lambda (dic) |
| 431 | (install-file dic hunspell)) |
| 432 | (find-files "speller" |
| 433 | ,(string-append language ".*\\.dic$")))) |
| 434 | |
| 435 | ;; Install affix files corresponding to installed dictionaries |
| 436 | (for-each (lambda (dic) |
| 437 | (install-file (string-append |
| 438 | "speller/" (basename dic ".dic") ".aff") |
| 439 | hunspell)) |
| 440 | (find-files hunspell ".*\\.dic$")) |
| 441 | (symlink hunspell (string-append myspell "/dicts")) |
| 442 | (for-each (lambda (file) |
| 443 | (install-file file doc)) |
| 444 | (find-files "." |
| 445 | "^(Copyright|.*\\.(txt|org|md))$")) |
| 446 | #t)))))) |
| 447 | (synopsis synopsis) |
| 448 | (description |
| 449 | "This package provides a dictionary for the Hunspell spell-checking |
| 450 | library.") |
| 451 | (home-page "http://wordlist.aspell.net/") |
| 452 | (license (non-copyleft "file://Copyright" |
| 453 | "Word lists come from several sources, all |
| 454 | under permissive licensing terms. See the 'Copyright' file.")))) |
| 455 | |
| 456 | (define-syntax define-word-list-dictionary |
| 457 | (syntax-rules (synopsis) |
| 458 | ((_ name language (synopsis text)) |
| 459 | (define-public name |
| 460 | (aspell-word-list language text))) |
| 461 | ((_ name language nick (synopsis text)) |
| 462 | (define-public name |
| 463 | (aspell-word-list language text nick))))) |
| 464 | |
| 465 | (define-word-list-dictionary hunspell-dict-en |
| 466 | "en" |
| 467 | (synopsis "Hunspell dictionary for English")) |
| 468 | |
| 469 | (define-word-list-dictionary hunspell-dict-en-au |
| 470 | "en_AU" |
| 471 | (synopsis "Hunspell dictionary for Australian English")) |
| 472 | |
| 473 | (define-word-list-dictionary hunspell-dict-en-ca |
| 474 | "en_CA" |
| 475 | (synopsis "Hunspell dictionary for Canadian English")) |
| 476 | |
| 477 | (define-word-list-dictionary hunspell-dict-en-gb |
| 478 | "en_GB-ise" "en-gb" |
| 479 | (synopsis "Hunspell dictionary for British English, with -ise endings")) |
| 480 | |
| 481 | (define-word-list-dictionary hunspell-dict-en-gb-ize |
| 482 | "en_GB-ize" |
| 483 | (synopsis "Hunspell dictionary for British English, with -ize endings")) |
| 484 | |
| 485 | (define-word-list-dictionary hunspell-dict-en-us |
| 486 | "en_US" |
| 487 | (synopsis "Hunspell dictionary for United States English")) |
| 488 | |
| 489 | (define-public ispell |
| 490 | (package |
| 491 | (name "ispell") |
| 492 | (version "3.4.04") |
| 493 | (source |
| 494 | (origin |
| 495 | (method url-fetch) |
| 496 | (uri (string-append "https://www.cs.hmc.edu/~geoff/tars/ispell-" |
| 497 | version ".tar.gz")) |
| 498 | (sha256 |
| 499 | (base32 "0gp1rwn8grkvz28wgisc2j9w9svldnaiahl3lyis118xabqddg47")))) |
| 500 | (build-system gnu-build-system) |
| 501 | (arguments |
| 502 | `(#:parallel-build? #f |
| 503 | #:tests? #f ; no tests |
| 504 | #:phases |
| 505 | (modify-phases %standard-phases |
| 506 | (replace 'configure |
| 507 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 508 | ;; Based on local.h.linux |
| 509 | (let* ((grep (assoc-ref inputs "grep")) |
| 510 | (out (assoc-ref outputs "out"))) |
| 511 | (call-with-output-file "local.h" |
| 512 | (lambda (port) |
| 513 | (format port "#define MINIMENU~%") |
| 514 | (format port "#define USG~%") |
| 515 | (format port "#define HAS_RENAME~%") |
| 516 | (format port "#define CC \"gcc\"~%") |
| 517 | (format port "#define POUNDBANG \"#!~a\"~%" (which "sh")) |
| 518 | (format port "#define EGREPCMD \"~a/bin/grep -Ei\"~%" grep) |
| 519 | (format port "#define BINDIR \"~a/bin\"~%" out) |
| 520 | (format port "#define LIBDIR \"~a/lib/ispell\"~%" out) |
| 521 | (format port "#define MAN1DIR \"~a/share/man/man1\"~%" out) |
| 522 | (format port "#define MAN45DIR \"~a/share/man/man5\"~%" out)))) |
| 523 | #t))))) |
| 524 | (inputs |
| 525 | `(("grep" ,grep) |
| 526 | ("ncurses" ,ncurses))) |
| 527 | (native-inputs |
| 528 | `(("bison" ,bison))) |
| 529 | (synopsis "Interactive spell-checking tool for Unix") |
| 530 | (description "Ispell is an interactive spell-checking tool supporting many |
| 531 | European languages.") |
| 532 | (home-page "https://www.cs.hmc.edu/~geoff/ispell.html") |
| 533 | (license bsd-3))) |