From 15756a7a12891ee973671611fb0ab62fafcc444e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 12 Jan 2014 22:44:39 +0100 Subject: 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. --- gnu/packages/aspell.scm | 73 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file 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 +;;; Copyright © 2013, 2014 Ludovic Courtès ;;; ;;; 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"))) -- cgit v1.2.3