aspell.scm 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. (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))
  32. (define-public aspell
  33. (package
  34. (name "aspell")
  35. (version "0.60.6.1")
  36. (source
  37. (origin
  38. (method url-fetch)
  39. (uri (string-append "mirror://gnu/aspell/aspell-"
  40. version ".tar.gz"))
  41. (sha256
  42. (base32
  43. "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
  44. (patches (search-patches "aspell-default-dict-dir.patch"))))
  45. (build-system gnu-build-system)
  46. (arguments
  47. `(#:phases
  48. (modify-phases %standard-phases
  49. (add-after 'install 'wrap-aspell
  50. (lambda* (#:key outputs #:allow-other-keys)
  51. (let ((bin/aspell (string-append (assoc-ref outputs "out")
  52. "/bin/aspell")))
  53. (wrap-program bin/aspell
  54. '("ASPELL_CONF" "" =
  55. ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
  56. (inputs `(("perl" ,perl)))
  57. (native-search-paths
  58. ;; This is a Guix-specific environment variable that takes a single
  59. ;; entry, not an actual search path.
  60. (list (search-path-specification
  61. (variable "ASPELL_DICT_DIR")
  62. (separator #f)
  63. (files '("lib/aspell")))))
  64. (home-page "http://aspell.net/")
  65. (synopsis "Spell checker")
  66. (description
  67. "Aspell is a spell-checker which can be used either as a library or as
  68. a standalone program. Notable features of Aspell include its full support of
  69. documents written in the UTF-8 encoding and its ability to use multiple
  70. dictionaries, including personal ones.")
  71. (license lgpl2.1+)))
  72. ;;;
  73. ;;; Dictionaries.
  74. ;;;
  75. ;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use
  76. ;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as
  77. ;;; long as 'HOME' is set, that's fine!).
  78. ;;;
  79. (define* (aspell-dictionary dict-name full-name
  80. #:key version sha256 (prefix "aspell6-"))
  81. (package
  82. (name (string-append "aspell-dict-" dict-name))
  83. (version version)
  84. (source (origin
  85. (method url-fetch)
  86. (uri (string-append "mirror://gnu/aspell/dict/" dict-name
  87. "/" prefix dict-name "-"
  88. version ".tar.bz2"))
  89. (sha256 sha256)))
  90. (build-system gnu-build-system)
  91. (arguments
  92. `(#:phases
  93. (modify-phases %standard-phases
  94. (replace 'configure
  95. (lambda* (#:key outputs #:allow-other-keys)
  96. (let ((out (assoc-ref outputs "out")))
  97. (zero? (system* "./configure"))))))
  98. #:make-flags
  99. (let ((out (assoc-ref %outputs "out")))
  100. (list (string-append "dictdir=" out "/lib/aspell")
  101. (string-append "datadir=" out "/lib/aspell")))
  102. #:tests? #f))
  103. (native-inputs `(("aspell" ,aspell)
  104. ("which" ,which)))
  105. (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
  106. (description
  107. "This package provides a dictionary for the GNU Aspell spell checker.")
  108. (license gpl2+)
  109. (home-page "http://aspell.net/")))
  110. (define-public aspell-dict-de
  111. (aspell-dictionary "de" "German"
  112. #:version "20030222-1"
  113. #:sha256
  114. (base32
  115. "01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
  116. (define-public aspell-dict-en
  117. (aspell-dictionary "en" "English"
  118. #:version "2017.01.22-0"
  119. #:sha256
  120. (base32
  121. "1qamzpw1fsnn5n9jpsnnnzqj1a0m0xvsikmkdp5a6pmb7sp3ziwk")))
  122. (define-public aspell-dict-eo
  123. (aspell-dictionary "eo" "Esperanto"
  124. #:version "2.1.20000225a-2"
  125. #:sha256
  126. (base32
  127. "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
  128. (define-public aspell-dict-es
  129. (aspell-dictionary "es" "Spanish"
  130. #:version "1.11-2"
  131. #:sha256
  132. (base32
  133. "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
  134. (define-public aspell-dict-fr
  135. (aspell-dictionary "fr" "French"
  136. #:version "0.50-3"
  137. #:prefix "aspell-"
  138. #:sha256
  139. (base32
  140. "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
  141. (define-public aspell-dict-ru
  142. (aspell-dictionary "ru" "Russian"
  143. #:version "0.99f7-1"
  144. #:sha256
  145. (base32
  146. "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
  147. (define-public aspell-dict-it
  148. (aspell-dictionary "it" "Italian"
  149. #:version "2.2_20050523-0"
  150. #:sha256
  151. (base32
  152. "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v")))
  153. (define-public aspell-dict-nl
  154. (aspell-dictionary "nl" "Dutch"
  155. #:version "0.50-2"
  156. #:prefix "aspell-"
  157. #:sha256
  158. (base32
  159. "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
  160. (define-public aspell-dict-he
  161. (aspell-dictionary "he" "Hebrew"
  162. #:version "1.0-0"
  163. #:sha256
  164. (base32
  165. "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
  166. (define-public aspell-dict-sv
  167. (aspell-dictionary "sv" "Swedish"
  168. #:version "0.51-0"
  169. #:prefix "aspell-"
  170. #:sha256
  171. (base32
  172. "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
  173. (define-public aspell-dict-el
  174. (aspell-dictionary "el" "Greek"
  175. #:version "0.08-0"
  176. #:prefix "aspell6-"
  177. #:sha256
  178. (base32
  179. "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
  180. (define-public aspell-dict-grc
  181. (aspell-dictionary "grc" "Ancient Greek"
  182. #:version "0.02-0"
  183. #:sha256
  184. (base32
  185. "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
  186. (define-public aspell-dict-pt-br
  187. (aspell-dictionary "pt-br" "Brazilian Portuguese"
  188. #:version "20090702-0"
  189. #:prefix "aspell6-"
  190. #:sha256
  191. (base32
  192. "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))