Update e-mail for Theodoros Foradis.
[jackhill/guix/guix.git] / gnu / packages / aspell.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2017 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 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 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages aspell)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix licenses)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages base))
33
34 (define-public aspell
35 (package
36 (name "aspell")
37 (version "0.60.6.1")
38 (source
39 (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnu/aspell/aspell-"
42 version ".tar.gz"))
43 (sha256
44 (base32
45 "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
46 (patches (search-patches "aspell-default-dict-dir.patch"))))
47 (build-system gnu-build-system)
48 (arguments
49 `(#:phases
50 (modify-phases %standard-phases
51 (add-after 'install 'wrap-aspell
52 (lambda* (#:key outputs #:allow-other-keys)
53 (let ((bin/aspell (string-append (assoc-ref outputs "out")
54 "/bin/aspell")))
55 (wrap-program bin/aspell
56 '("ASPELL_CONF" "" =
57 ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
58 (inputs `(("perl" ,perl)))
59
60 (native-search-paths
61 ;; This is a Guix-specific environment variable that takes a single
62 ;; entry, not an actual search path.
63 (list (search-path-specification
64 (variable "ASPELL_DICT_DIR")
65 (separator #f)
66 (files '("lib/aspell")))))
67
68 (home-page "http://aspell.net/")
69 (synopsis "Spell checker")
70 (description
71 "Aspell is a spell-checker which can be used either as a library or as
72 a standalone program. Notable features of Aspell include its full support of
73 documents written in the UTF-8 encoding and its ability to use multiple
74 dictionaries, including personal ones.")
75 (license lgpl2.1+)))
76
77 ;;;
78 ;;; Dictionaries.
79 ;;;
80 ;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use
81 ;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as
82 ;;; long as 'HOME' is set, that's fine!).
83 ;;;
84
85 (define* (aspell-dictionary dict-name full-name
86 #:key version sha256 (prefix "aspell6-"))
87 (package
88 (name (string-append "aspell-dict-" dict-name))
89 (version version)
90 (source (origin
91 (method url-fetch)
92 (uri (string-append "mirror://gnu/aspell/dict/" dict-name
93 "/" prefix dict-name "-"
94 version ".tar.bz2"))
95 (sha256 sha256)))
96 (build-system gnu-build-system)
97 (arguments
98 `(#:phases
99 (modify-phases %standard-phases
100 (replace 'configure
101 (lambda* (#:key outputs #:allow-other-keys)
102 (let ((out (assoc-ref outputs "out")))
103 (zero? (system* "./configure"))))))
104 #:make-flags
105 (let ((out (assoc-ref %outputs "out")))
106 (list (string-append "dictdir=" out "/lib/aspell")
107 (string-append "datadir=" out "/lib/aspell")))
108 #:tests? #f))
109 (native-inputs `(("aspell" ,aspell)
110 ("which" ,which)))
111 (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
112 (description
113 "This package provides a dictionary for the GNU Aspell spell checker.")
114 (license gpl2+)
115 (home-page "http://aspell.net/")))
116
117
118 (define-public aspell-dict-de
119 (aspell-dictionary "de" "German"
120 #:version "20030222-1"
121 #:sha256
122 (base32
123 "01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
124
125 (define-public aspell-dict-en
126 (aspell-dictionary "en" "English"
127 #:version "2017.01.22-0"
128 #:sha256
129 (base32
130 "1qamzpw1fsnn5n9jpsnnnzqj1a0m0xvsikmkdp5a6pmb7sp3ziwk")))
131
132 (define-public aspell-dict-eo
133 (aspell-dictionary "eo" "Esperanto"
134 #:version "2.1.20000225a-2"
135 #:sha256
136 (base32
137 "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
138
139 (define-public aspell-dict-es
140 (aspell-dictionary "es" "Spanish"
141 #:version "1.11-2"
142 #:sha256
143 (base32
144 "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
145
146 (define-public aspell-dict-fr
147 (aspell-dictionary "fr" "French"
148 #:version "0.50-3"
149 #:prefix "aspell-"
150 #:sha256
151 (base32
152 "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
153
154 (define-public aspell-dict-ru
155 (aspell-dictionary "ru" "Russian"
156 #:version "0.99f7-1"
157 #:sha256
158 (base32
159 "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
160
161 (define-public aspell-dict-it
162 (aspell-dictionary "it" "Italian"
163 #:version "2.2_20050523-0"
164 #:sha256
165 (base32
166 "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v")))
167
168 (define-public aspell-dict-nl
169 (aspell-dictionary "nl" "Dutch"
170 #:version "0.50-2"
171 #:prefix "aspell-"
172 #:sha256
173 (base32
174 "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
175
176 (define-public aspell-dict-he
177 (aspell-dictionary "he" "Hebrew"
178 #:version "1.0-0"
179 #:sha256
180 (base32
181 "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
182
183 (define-public aspell-dict-sv
184 (aspell-dictionary "sv" "Swedish"
185 #:version "0.51-0"
186 #:prefix "aspell-"
187 #:sha256
188 (base32
189 "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
190
191 (define-public aspell-dict-el
192 (aspell-dictionary "el" "Greek"
193 #:version "0.08-0"
194 #:prefix "aspell6-"
195 #:sha256
196 (base32
197 "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
198
199 (define-public aspell-dict-grc
200 (aspell-dictionary "grc" "Ancient Greek"
201 #:version "0.02-0"
202 #:sha256
203 (base32
204 "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
205
206 (define-public aspell-dict-pt-br
207 (aspell-dictionary "pt-br" "Brazilian Portuguese"
208 #:version "20090702-0"
209 #:prefix "aspell6-"
210 #:sha256
211 (base32
212 "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))