You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

212 lines
7.9 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <>
;;; Copyright © 2015, 2016 Alex Kost <>
;;; Copyright © 2016 John Darrington <>
;;; Copyright © 2016 Efraim Flashner <>
;;; Copyright © 2016 Christopher Andersson <>
;;; Copyright © 2016 Theodoros Foradis <>
;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages aspell)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix licenses)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages base))
(define-public aspell
(name "aspell")
(version "")
(method url-fetch)
(uri (string-append "mirror://gnu/aspell/aspell-"
version ".tar.gz"))
(patches (search-patches "aspell-default-dict-dir.patch"))))
(build-system gnu-build-system)
(modify-phases %standard-phases
(add-after 'install 'wrap-aspell
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin/aspell (string-append (assoc-ref outputs "out")
(wrap-program bin/aspell
'("ASPELL_CONF" "" =
("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
(inputs `(("perl" ,perl)))
;; This is a Guix-specific environment variable that takes a single
;; entry, not an actual search path.
(list (search-path-specification
(variable "ASPELL_DICT_DIR")
(separator #f)
(files '("lib/aspell")))))
(home-page "")
(synopsis "Spell checker")
"Aspell is a spell-checker which can be used either as a library or as
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, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as
;;; long as 'HOME' is set, that's fine!).
(define* (aspell-dictionary dict-name full-name
#:key version sha256 (prefix "aspell6-"))
(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)
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(zero? (system* "./configure"))))))
(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
"This package provides a dictionary for the GNU Aspell spell checker.")
(license gpl2+)
(home-page "")))
(define-public aspell-dict-de
(aspell-dictionary "de" "German"
#:version "20030222-1"
(define-public aspell-dict-en
(aspell-dictionary "en" "English"
#:version "2017.01.22-0"
(define-public aspell-dict-eo
(aspell-dictionary "eo" "Esperanto"
#:version "2.1.20000225a-2"
(define-public aspell-dict-es
(aspell-dictionary "es" "Spanish"
#:version "1.11-2"
(define-public aspell-dict-fr
(aspell-dictionary "fr" "French"
#:version "0.50-3"
#:prefix "aspell-"
(define-public aspell-dict-ru
(aspell-dictionary "ru" "Russian"
#:version "0.99f7-1"
(define-public aspell-dict-it
(aspell-dictionary "it" "Italian"
#:version "2.2_20050523-0"
(define-public aspell-dict-nl
(aspell-dictionary "nl" "Dutch"
#:version "0.50-2"
#:prefix "aspell-"
(define-public aspell-dict-he
(aspell-dictionary "he" "Hebrew"
#:version "1.0-0"
(define-public aspell-dict-sv
(aspell-dictionary "sv" "Swedish"
#:version "0.51-0"
#:prefix "aspell-"
(define-public aspell-dict-el
(aspell-dictionary "el" "Greek"
#:version "0.08-0"
#:prefix "aspell6-"
(define-public aspell-dict-grc
(aspell-dictionary "grc" "Ancient Greek"
#:version "0.02-0"
(define-public aspell-dict-pt-br
(aspell-dictionary "pt-br" "Brazilian Portuguese"
#:version "20090702-0"
#:prefix "aspell6-"