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>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
41 (uri (string-append "mirror://gnu/aspell/aspell-"
45 "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
46 (patches (search-patches "aspell-default-dict-dir.patch"))))
47 (build-system gnu-build-system)
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")
55 (wrap-program bin/aspell
57 ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
58 (inputs `(("perl" ,perl)))
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")
66 (files '("lib/aspell")))))
68 (home-page "http://aspell.net/")
69 (synopsis "Spell checker")
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.")
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!).
85 (define* (aspell-dictionary dict-name full-name
86 #:key version sha256 (prefix "aspell6-"))
88 (name (string-append "aspell-dict-" dict-name))
92 (uri (string-append "mirror://gnu/aspell/dict/" dict-name
93 "/" prefix dict-name "-"
96 (build-system gnu-build-system)
99 (modify-phases %standard-phases
101 (lambda* (#:key outputs #:allow-other-keys)
102 (let ((out (assoc-ref outputs "out")))
103 (zero? (system* "./configure"))))))
105 (let ((out (assoc-ref %outputs "out")))
106 (list (string-append "dictdir=" out "/lib/aspell")
107 (string-append "datadir=" out "/lib/aspell")))
109 (native-inputs `(("aspell" ,aspell)
111 (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
113 "This package provides a dictionary for the GNU Aspell spell checker.")
115 (home-page "http://aspell.net/")))
118 (define-public aspell-dict-de
119 (aspell-dictionary "de" "German"
120 #:version "20030222-1"
123 "01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
125 (define-public aspell-dict-en
126 (aspell-dictionary "en" "English"
127 #:version "2017.01.22-0"
130 "1qamzpw1fsnn5n9jpsnnnzqj1a0m0xvsikmkdp5a6pmb7sp3ziwk")))
132 (define-public aspell-dict-eo
133 (aspell-dictionary "eo" "Esperanto"
134 #:version "2.1.20000225a-2"
137 "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
139 (define-public aspell-dict-es
140 (aspell-dictionary "es" "Spanish"
144 "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
146 (define-public aspell-dict-fr
147 (aspell-dictionary "fr" "French"
152 "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
154 (define-public aspell-dict-ru
155 (aspell-dictionary "ru" "Russian"
159 "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
161 (define-public aspell-dict-it
162 (aspell-dictionary "it" "Italian"
163 #:version "2.2_20050523-0"
166 "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v")))
168 (define-public aspell-dict-nl
169 (aspell-dictionary "nl" "Dutch"
174 "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
176 (define-public aspell-dict-he
177 (aspell-dictionary "he" "Hebrew"
181 "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
183 (define-public aspell-dict-sv
184 (aspell-dictionary "sv" "Swedish"
189 "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
191 (define-public aspell-dict-el
192 (aspell-dictionary "el" "Greek"
197 "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
199 (define-public aspell-dict-grc
200 (aspell-dictionary "grc" "Ancient Greek"
204 "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
206 (define-public aspell-dict-pt-br
207 (aspell-dictionary "pt-br" "Brazilian Portuguese"
208 #:version "20090702-0"
212 "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))