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