gnu: r-genomeinfodbdata: Update to 0.99.1.
[jackhill/guix/guix.git] / gnu / packages / dictionaries.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages dictionaries)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system trivial)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages curl)
29 #:use-module (gnu packages emacs)
30 #:use-module (gnu packages fribidi)
31 #:use-module (gnu packages linux)
32 #:use-module (gnu packages readline)
33 #:use-module (gnu packages texinfo)
34 #:use-module (gnu packages compression)
35 #:use-module (gnu packages tcl))
36
37
38 (define-public vera
39 (package
40 (name "vera")
41 (version "1.23")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append "mirror://gnu/vera/vera-" version
45 ".tar.gz"))
46 (sha256
47 (base32
48 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
49 (build-system trivial-build-system)
50 (arguments
51 `(#:builder (begin
52 (use-modules (guix build utils))
53
54 (let* ((out (assoc-ref %outputs "out"))
55 (info (string-append out "/share/info"))
56 (html (string-append out "/share/html"))
57 (source (assoc-ref %build-inputs "source"))
58 (tar (assoc-ref %build-inputs "tar"))
59 (gz (assoc-ref %build-inputs "gzip"))
60 (texi (assoc-ref %build-inputs "texinfo")))
61 (setenv "PATH" (string-append gz "/bin"))
62 (system* (string-append tar "/bin/tar") "xvf" source)
63
64 (chdir (string-append "vera-" ,version))
65 (mkdir-p info)
66 (mkdir-p html)
67
68 ;; XXX: Use '--force' because the document is unhappy
69 ;; with Texinfo 5 (yes, documents can be unhappy.)
70 (and (zero?
71 (system* (string-append texi "/bin/makeinfo")
72 "vera.texi" "--force" "-o"
73 (string-append info "/vera.info")))
74 (zero?
75 (system* (string-append texi "/bin/makeinfo")
76 "vera.texi" "--force" "--html" "-o"
77 (string-append html "/vera.html"))))))
78 #:modules ((guix build utils))))
79 (native-inputs `(("texinfo" ,texinfo)
80 ("tar" ,tar)
81 ("gzip" ,gzip)))
82 (home-page "https://savannah.gnu.org/projects/vera/")
83 (synopsis "List of acronyms")
84 (description
85 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
86 acronyms distributed as an info document.")
87 (license fdl1.3+)))
88
89 (define-public gcide
90 (package
91 (name "gcide")
92 (version "0.51")
93 (source (origin
94 (method url-fetch)
95 (uri (string-append
96 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
97 (sha256
98 (base32
99 "1wm0s51ygc6480dq8gwahzr35ls8jgpf34yiwl5yqcaa0i19fdv7"))))
100 (build-system trivial-build-system)
101 (arguments
102 '(#:builder (begin
103 (use-modules (guix build utils))
104 (let* ((src (assoc-ref %build-inputs "source"))
105 (tar (assoc-ref %build-inputs "tar"))
106 (xz (assoc-ref %build-inputs "xz"))
107 (out (assoc-ref %outputs "out"))
108 (datadir (string-append out "/share/gcide")))
109 (set-path-environment-variable "PATH" '("bin")
110 (list tar xz))
111 (mkdir-p datadir)
112 (zero? (system* "tar" "-C" datadir
113 "--strip-components=1"
114 "-xvf" src))))
115 #:modules ((guix build utils))))
116 (native-inputs
117 `(("tar" ,tar)
118 ("xz" ,xz)))
119 (synopsis "GNU Collaborative International Dictionary of English")
120 (description
121 "GCIDE is a free dictionary based on a combination of sources. It can
122 be used via the GNU Dico program or accessed online at
123 http://gcide.gnu.org.ua/")
124 (home-page "http://gcide.gnu.org.ua/")
125 (license gpl3+)))
126
127 (define-public diction
128 ;; Not quite a dictionary, not quite a spell checker either…
129 (package
130 (name "diction")
131 (version "1.11")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "mirror://gnu/diction/diction-"
135 version ".tar.gz"))
136 (sha256
137 (base32
138 "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
139 (build-system gnu-build-system)
140 (synopsis "Identifies wordy and commonly misused phrases")
141 (description
142 "A package providing two classic Unix commands, style and diction.
143 Diction is used to identify wordy and commonly misused phrases in a
144 body of text. Style instead analyzes surface aspects of a written
145 work, such as sentence length and other readability measures.")
146 (home-page "https://www.gnu.org/software/diction/")
147 (license gpl3+)))
148
149 (define-public ding
150 (package
151 (name "ding")
152 (version "1.8")
153 (source (origin
154 (method url-fetch)
155 (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
156 "/" name "-" version ".tar.gz"))
157 (sha256
158 (base32
159 "00z97ndwmzsgig9q6y98y8nbxy76pyi9qyj5qfpbbck24gakpz5l"))))
160 (build-system gnu-build-system)
161 (inputs `(("tk" ,tk)))
162 (arguments
163 `(#:phases
164 (modify-phases %standard-phases
165 (delete 'configure)
166 (delete 'build)
167 (delete 'check)
168 (replace
169 'install
170 (lambda _
171 (let ((bindir (string-append
172 (assoc-ref %outputs "out") "/bin"))
173 (wish (string-append
174 (assoc-ref %build-inputs "tk")
175 "/bin/wish8.6"))
176 (sharedir (string-append
177 (assoc-ref %outputs "out")
178 "/share/applications"))
179 (libdir (string-append
180 (assoc-ref %outputs "out") "/lib")))
181 (mkdir-p bindir)
182 (mkdir-p libdir)
183 (mkdir-p sharedir)
184
185 (substitute* "ding.desktop"
186 (("Exec=/usr/bin/ding")
187 (string-append "Exec=" bindir "/ding")))
188 (with-fluids ((%default-port-encoding "ISO-8859-1"))
189 (substitute* "ding" (("exec wish") (string-append "exec " wish))))
190 (substitute* "install.sh"
191 (("/bin/cp") "cp")
192 (("/bin/mv") "mv")
193 (("NEEDPROG=\"wish\"")
194 (string-append "NEEDPROG=\"" wish "\""))
195 (("DEFBINDIR=\"/usr/local/bin\"")
196 (string-append "DEFBINDIR=\"" bindir "\""))
197 (("DEFLIBDIR=\"/usr/local/lib\"")
198 (string-append "DEFLIBDIR=\"" libdir "\"")))
199 (install-file "ding.desktop" sharedir)
200 (install-file "ding.png" sharedir)
201 (zero?
202 (system* "./install.sh"))))))))
203 (synopsis "Dictionary lookup program with a German-English dictionary")
204 (description "Ding is a dictionary lookup program for the X window system.
205 It comes with a German-English dictionary with approximately 270,000 entries.")
206 (home-page "http://www-user.tu-chemnitz.de/~fri/ding/")
207 (license gpl2+)))
208
209 (define-public translate-shell
210 (package
211 (name "translate-shell")
212 (version "0.9.6.4")
213 (source
214 (origin
215 (method url-fetch)
216 (uri (string-append "https://github.com/soimort/" name "/archive/v"
217 version ".tar.gz"))
218 (sha256
219 (base32
220 "1fg6nf1plvgimc57fsdr9rcjbf7jvmk5jrlj5ya509vpdcdgvj2s"))
221 (file-name (string-append name "-" version ".tar.gz"))))
222 (build-system gnu-build-system)
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (delete 'configure) ; no configure phase
227 (add-after 'install 'emacs-install
228 (lambda* (#:key inputs outputs #:allow-other-keys)
229 (let* ((out (assoc-ref outputs "out"))
230 (dest (string-append out "/share/emacs/site-lisp"))
231 (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")))
232 (install-file "google-translate-mode.el" dest)
233 (emacs-generate-autoloads ,name dest)))))
234 #:make-flags (list (string-append "PREFIX=" %output))
235 #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils))
236 #:modules ((guix build gnu-build-system)
237 (guix build emacs-utils)
238 (guix build utils))
239 #:test-target "test"))
240 (propagated-inputs
241 `(("curl" ,curl)
242 ("fribidi" ,fribidi)
243 ("rlwrap" ,rlwrap)))
244 (native-inputs
245 `(("emacs" ,emacs-minimal)
246 ("util-linux" ,util-linux))) ; hexdump, for the test
247 (home-page "https://www.soimort.org/translate-shell")
248 (synopsis "Translations from the command line")
249 (description
250 "Translate Shell (formerly Google Translate CLI) is a command-line
251 translator powered by Google Translate (default), Bing Translator,
252 Yandex.Translate and Apertium. It gives you easy access to one of these
253 translation engines from your terminal.")
254 (license public-domain)))