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.for@openmailbox.org>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages aspell)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix licenses)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages base))
40 (uri (string-append "mirror://gnu/aspell/aspell-"
44 "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
45 (patches (search-patches "aspell-default-dict-dir.patch"))))
46 (build-system gnu-build-system)
49 (modify-phases %standard-phases
50 (add-after 'install 'wrap-aspell
51 (lambda* (#:key outputs #:allow-other-keys)
52 (let ((bin/aspell (string-append (assoc-ref outputs "out")
54 (wrap-program bin/aspell
56 ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
57 (inputs `(("perl" ,perl)))
60 ;; This is a Guix-specific environment variable that takes a single
61 ;; entry, not an actual search path.
62 (list (search-path-specification
63 (variable "ASPELL_DICT_DIR")
65 (files '("lib/aspell")))))
67 (home-page "http://aspell.net/")
68 (synopsis "Spell checker")
70 "Aspell is a spell-checker which can be used either as a library or as
71 a standalone program. Notable features of Aspell include its full support of
72 documents written in the UTF-8 encoding and its ability to use multiple
73 dictionaries, including personal ones.")
79 ;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use
80 ;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as
81 ;;; long as 'HOME' is set, that's fine!).
84 (define* (aspell-dictionary dict-name full-name
85 #:key version sha256 (prefix "aspell6-"))
87 (name (string-append "aspell-dict-" dict-name))
91 (uri (string-append "mirror://gnu/aspell/dict/" dict-name
92 "/" prefix dict-name "-"
95 (build-system gnu-build-system)
98 (modify-phases %standard-phases
100 (lambda* (#:key outputs #:allow-other-keys)
101 (let ((out (assoc-ref outputs "out")))
102 (zero? (system* "./configure"))))))
104 (let ((out (assoc-ref %outputs "out")))
105 (list (string-append "dictdir=" out "/lib/aspell")
106 (string-append "datadir=" out "/lib/aspell")))
108 (native-inputs `(("aspell" ,aspell)
110 (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
112 "This package provides a dictionary for the GNU Aspell spell checker.")
114 (home-page "http://aspell.net/")))
117 (define-public aspell-dict-de
118 (aspell-dictionary "de" "German"
119 #:version "20030222-1"
122 "01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
124 (define-public aspell-dict-en
125 (aspell-dictionary "en" "English"
126 #:version "2016.11.20-0"
129 "1496jnhh2jvhkzcj0p4vy89bcs4g5wz6a76m33vw4dhchn5xm9jw")))
131 (define-public aspell-dict-eo
132 (aspell-dictionary "eo" "Esperanto"
133 #:version "2.1.20000225a-2"
136 "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
138 (define-public aspell-dict-es
139 (aspell-dictionary "es" "Spanish"
143 "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
145 (define-public aspell-dict-fr
146 (aspell-dictionary "fr" "French"
151 "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
153 (define-public aspell-dict-ru
154 (aspell-dictionary "ru" "Russian"
158 "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
160 (define-public aspell-dict-it
161 (aspell-dictionary "it" "Italian"
162 #:version "2.2_20050523-0"
165 "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v")))
167 (define-public aspell-dict-nl
168 (aspell-dictionary "nl" "Dutch"
173 "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
175 (define-public aspell-dict-he
176 (aspell-dictionary "he" "Hebrew"
180 "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
182 (define-public aspell-dict-sv
183 (aspell-dictionary "sv" "Swedish"
188 "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
190 (define-public aspell-dict-el
191 (aspell-dictionary "el" "Greek"
196 "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
198 (define-public aspell-dict-grc
199 (aspell-dictionary "grc" "Ancient Greek"
203 "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
205 (define-public aspell-dict-pt-br
206 (aspell-dictionary "pt-br" "Brazilian Portuguese"
207 #:version "20090702-0"
211 "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))