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