gnu: Add anthy.
[jackhill/guix/guix.git] / gnu / packages / anthy.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages anthy)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu))
24
25 (define-public anthy
26 (package
27 (name "anthy")
28 (version "9100h")
29 (source (origin
30 (method url-fetch)
31 ;; The URI does not appear to be easily guessable. For
32 ;; example, you cannot download version "9100g" simply
33 ;; by replacing "9100h" in the URI.
34 (uri "http://tcpdiag.dl.osdn.jp/anthy/37536/anthy-9100h.tar.gz")
35 (sha256
36 (base32
37 "0ism4zibcsa5nl77wwi12vdsfjys3waxcphn1p5s7d0qy1sz0mnj"))))
38 (build-system gnu-build-system)
39 ;; Anthy also contains elisp modules for using anthy within Emacs.
40 ;; However, these modules are incompatible with the latest version
41 ;; of Emacs. This is because they rely on the presence of
42 ;; last-command-char, which was removed in Emacs 24.3. So, we
43 ;; don't try to install them here at this time.
44 (arguments
45 `(#:phases
46 (modify-phases %standard-phases
47 (replace 'check
48 (lambda _
49 (with-directory-excursion "test"
50 (zero? (system* "./anthy" "--all"))))))))
51 (home-page "http://anthy.osdn.jp/")
52 (synopsis "Japanese input method")
53 (description "Anthy is a Japanese input method for converting
54 hiragana text to mixed kana and kanji. It is written in the C
55 programming language. Anthy stores personal customizations (words it
56 has learned from the user's input, words the user has explicitly
57 added, etc.) in the ~/.anthy/ directory. This package contains the
58 anthy C libraries, the cannadic and alt-cannadic kana dictionaries, as
59 well as command-line tools for using anthy and managing
60 dictionaries.")
61 ;; Most of anthy is lgpl2.1+. However, some files (e.g., from
62 ;; alt-cannadic) use gpl2. See the file "COPYING" in the anthy
63 ;; source for details.
64 (license (list lgpl2.1+ gpl2))))