summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-01-12 22:44:39 +0100
committerLudovic Courtès <ludo@gnu.org>2014-01-12 22:47:48 +0100
commit15756a7a12891ee973671611fb0ab62fafcc444e (patch)
tree5cb1f645545e0fdeba6c8974bd8fe5e9e7d4ee05 /gnu
parent1d6816f98ca1746f0b627a6dee9c0adbbf7533c4 (diff)
downloadguix-15756a7a12891ee973671611fb0ab62fafcc444e.tar.gz
gnu: Add Aspell dictionaries.
* gnu/packages/aspell.scm (aspell-dictionary): New procedure.
  (aspell-dict-en, aspell-dict-eo, aspell-dict-es, aspell-dict-fr): New
  variables.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/aspell.scm73
1 files changed, 71 insertions, 2 deletions
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index c1db358a3b..122daa7136 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,7 +21,8 @@
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix licenses)
-  #:use-module (gnu packages perl))
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages which))
 
 (define-public aspell
   (package
@@ -45,3 +46,71 @@ a standalone program.  Notable features of Aspell include its full support of
 documents written in the UTF-8 encoding and its ability to use multiple
 dictionaries, including personal ones.")
     (license lgpl2.1+)))
+
+
+;;;
+;;; Dictionaries.
+;;;
+;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use them.
+;;;
+
+(define* (aspell-dictionary dict-name full-name
+                            #:key version sha256 (prefix "aspell6-"))
+  (package
+    (name (string-append "aspell-dict-" dict-name))
+    (version version)
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/aspell/dict/" dict-name
+                                  "/" prefix dict-name "-"
+                                  version ".tar.bz2"))
+              (sha256 sha256)))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases (alist-replace
+                 'configure
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (let ((out (assoc-ref outputs "out")))
+                     (zero? (system* "./configure"))))
+                 %standard-phases)
+                #:make-flags (let ((out (assoc-ref %outputs "out")))
+                               (list (string-append "dictdir=" out "/lib/aspell")
+                                     (string-append "datadir=" out "/lib/aspell")))
+                #:tests? #f))
+    (native-inputs `(("aspell" ,aspell)
+                     ("which" ,which)))
+    (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
+    (description
+     "This package provides a dictionary for the GNU Aspell spell checker.")
+    (license gpl2+)
+    (home-page "http://aspell.net/")))
+
+
+(define-public aspell-dict-en
+  (aspell-dictionary "en" "English"
+                     #:version "7.1-0"
+                     #:sha256
+                     (base32
+                      "02ldfiny4iakgfgy4sdrzjqdzi7l1rmb6y30lv31kfy5x31g77gz")))
+
+(define-public aspell-dict-eo
+  (aspell-dictionary "eo" "Esperanto"
+                     #:version "2.1.20000225a-2"
+                     #:sha256
+                     (base32
+                      "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
+
+(define-public aspell-dict-es
+  (aspell-dictionary "es" "Spanish"
+                     #:version "1.11-2"
+                     #:sha256
+                     (base32
+                      "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
+
+(define-public aspell-dict-fr
+  (aspell-dictionary "fr" "French"
+                     #:version "0.50-3"
+                     #:prefix "aspell-"
+                     #:sha256
+                     (base32
+                      "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))