gnu: ruby-pandoc-ruby: Use pandoc instead of ghc-pandoc.
[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, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
5 ;;; Copyright © 2017, 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
6 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
8 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
9 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages dictionaries)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system python)
33 #:use-module (guix build-system trivial)
34 #:use-module (guix build-system copy)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages emacs)
40 #:use-module (gnu packages flex)
41 #:use-module (gnu packages fribidi)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages pcre)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages readline)
47 #:use-module (gnu packages texinfo)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages tcl)
50 #:use-module (gnu packages xml))
51
52
53 (define-public vera
54 (package
55 (name "vera")
56 (version "1.23")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "mirror://gnu/vera/vera-" version
60 ".tar.gz"))
61 (sha256
62 (base32
63 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
64 (build-system trivial-build-system)
65 (arguments
66 `(#:builder (begin
67 (use-modules (guix build utils))
68
69 (let* ((out (assoc-ref %outputs "out"))
70 (info (string-append out "/share/info"))
71 (html (string-append out "/share/html"))
72 (source (assoc-ref %build-inputs "source"))
73 (tar (assoc-ref %build-inputs "tar"))
74 (gz (assoc-ref %build-inputs "gzip"))
75 (texi (assoc-ref %build-inputs "texinfo")))
76 (setenv "PATH" (string-append gz "/bin"))
77 (invoke (string-append tar "/bin/tar") "xvf" source)
78
79 (chdir (string-append "vera-" ,version))
80 (mkdir-p info)
81 (mkdir-p html)
82
83 ;; XXX: Use '--force' because the document is unhappy
84 ;; with Texinfo 5 (yes, documents can be unhappy.)
85 (invoke (string-append texi "/bin/makeinfo")
86 "vera.texi" "--force" "-o"
87 (string-append info "/vera.info"))
88 (invoke (string-append texi "/bin/makeinfo")
89 "vera.texi" "--force" "--html" "-o"
90 (string-append html "/vera.html"))))
91 #:modules ((guix build utils))))
92 (native-inputs `(("texinfo" ,texinfo)
93 ("tar" ,tar)
94 ("gzip" ,gzip)))
95 (home-page "https://savannah.gnu.org/projects/vera/")
96 (synopsis "List of acronyms")
97 (description
98 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
99 acronyms distributed as an info document.")
100 (license license:fdl1.3+)))
101
102 (define-public gcide
103 (package
104 (name "gcide")
105 (version "0.52")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append
109 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
110 (sha256
111 (base32
112 "1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
113 (build-system copy-build-system)
114 (arguments
115 '(#:install-plan
116 '(("." "share/gcide/" #:exclude ("COPYING")))))
117 (synopsis "GNU Collaborative International Dictionary of English")
118 (description
119 "GCIDE is a free dictionary based on a combination of sources. It can
120 be used via the GNU Dico program or accessed online at
121 http://gcide.gnu.org.ua/")
122 (home-page "https://gcide.gnu.org.ua/")
123 (license license:gpl3+)))
124
125 (define-public diction
126 ;; Not quite a dictionary, not quite a spell checker either…
127 (package
128 (name "diction")
129 (version "1.14")
130 (source
131 (origin
132 (method url-fetch)
133 (uri (string-append "http://www.moria.de/~michael/diction/diction-"
134 version ".tar.gz"))
135 (sha256
136 (base32 "1z6p5x3l1a00h4v4s33qa82fznzc1jdqdnlc4dnmd9nblnrjy0fs"))))
137 (build-system gnu-build-system)
138 (synopsis "Identifies wordy and commonly misused phrases")
139 (description
140 "A package providing two classic Unix commands, style and diction.
141 Diction is used to identify wordy and commonly misused phrases in a
142 body of text. Style instead analyzes surface aspects of a written
143 work, such as sentence length and other readability measures.")
144 (home-page "https://www.gnu.org/software/diction/")
145 (license license:gpl3+)))
146
147 (define-public ding
148 (package
149 (name "ding")
150 (version "1.8.1")
151 (source (origin
152 (method url-fetch)
153 (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
154 "/" name "-" version ".tar.gz"))
155 (sha256
156 (base32
157 "0chjqs3z9zs1w3l7b5lsaj682rgnkf9kibcbzhggqqcn1pbvl5sq"))))
158 (build-system gnu-build-system)
159 (inputs `(("tk" ,tk)))
160 (arguments
161 `(#:phases
162 (modify-phases %standard-phases
163 (delete 'configure)
164 (delete 'build)
165 (delete 'check)
166 (replace 'install
167 (lambda _
168 (let ((bindir (string-append
169 (assoc-ref %outputs "out") "/bin"))
170 (wish (string-append
171 (assoc-ref %build-inputs "tk")
172 "/bin/wish8.6"))
173 (sharedir (string-append
174 (assoc-ref %outputs "out")
175 "/share/applications"))
176 (libdir (string-append
177 (assoc-ref %outputs "out") "/lib")))
178 (mkdir-p bindir)
179 (mkdir-p libdir)
180 (mkdir-p sharedir)
181
182 (substitute* "ding.desktop"
183 (("Exec=/usr/bin/ding")
184 (string-append "Exec=" bindir "/ding")))
185 (with-fluids ((%default-port-encoding "ISO-8859-1"))
186 (substitute* "ding" (("exec wish") (string-append "exec " wish))))
187 (substitute* "install.sh"
188 (("/bin/cp") "cp")
189 (("/bin/mv") "mv")
190 (("NEEDPROG=\"wish\"")
191 (string-append "NEEDPROG=\"" wish "\""))
192 (("DEFBINDIR=\"/usr/local/bin\"")
193 (string-append "DEFBINDIR=\"" bindir "\""))
194 (("DEFLIBDIR=\"/usr/local/lib\"")
195 (string-append "DEFLIBDIR=\"" libdir "\"")))
196 (install-file "ding.desktop" sharedir)
197 (install-file "ding.png" sharedir)
198 (invoke "./install.sh")))))))
199 (synopsis "Dictionary lookup program with a German-English dictionary")
200 (description "Ding is a dictionary lookup program for the X window system.
201 It comes with a German-English dictionary with approximately 270,000 entries.")
202 (home-page "https://www-user.tu-chemnitz.de/~fri/ding/")
203 (license license:gpl2+)))
204
205 (define-public grammalecte
206 (package
207 (name "grammalecte")
208 (version "1.12.0")
209 (source
210 (origin
211 (method url-fetch/zipbomb)
212 (uri (string-append "https://grammalecte.net/grammalecte/zip/"
213 "Grammalecte-fr-v" version ".zip"))
214 (sha256
215 (base32 "1aifa7rj8zyxgk5cgmlgcws2hip7a7y6sr7kddjdnpfgdgy4jjgh"))))
216 (build-system python-build-system)
217 (home-page "https://grammalecte.net")
218 (synopsis "French spelling and grammar checker")
219 (description "Grammalecte is a grammar checker for the French language,
220 derived from Lightproof.
221
222 Grammalecte helps writing a proper French, without distracting users with
223 false positives. This grammar checker follows the principle: the less false
224 positives, the better; if it cannot know with a good chance that a dubious
225 expression is wrong, it keeps silent.
226
227 The package provides the command line interface, along with a server
228 and a Python library.")
229 (license license:gpl3+)))
230
231 (define-public translate-shell
232 (package
233 (name "translate-shell")
234 (version "0.9.6.12")
235 (source
236 (origin
237 (method git-fetch)
238 (uri (git-reference
239 (url"https://github.com/soimort/translate-shell.git")
240 (commit (string-append "v" version))))
241 (file-name (git-file-name name version))
242 (sha256
243 (base32 "075vqnha21rhr1b61dim7dqlfwm1yffyzcaa83s36rpk9r5sddzx"))))
244 (build-system gnu-build-system)
245 (arguments
246 `(#:phases
247 (modify-phases %standard-phases
248 (delete 'configure) ; no configure script
249 (add-after 'unpack 'remove-unnecessary-file
250 ;; This file gets generated during the build phase.
251 (lambda _
252 (delete-file "translate")
253 #t))
254 (add-after 'install 'wrap-binary
255 (lambda* (#:key inputs outputs #:allow-other-keys)
256 (let* ((out (assoc-ref outputs "out"))
257 (bin (string-append out "/bin/trans"))
258 (curl (assoc-ref inputs "curl"))
259 (fribidi (assoc-ref inputs "fribidi"))
260 (rlwrap (assoc-ref inputs "rlwrap")))
261 (wrap-program bin
262 `("PATH" ":" prefix
263 (,(string-append out "/bin:"
264 curl "/bin:"
265 fribidi "/bin:"
266 rlwrap "/bin")))))
267 #t))
268 (add-after 'install 'emacs-install
269 (lambda* (#:key inputs outputs #:allow-other-keys)
270 (let* ((out (assoc-ref outputs "out"))
271 (dest (string-append out "/share/emacs/site-lisp"))
272 (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")))
273 (install-file "google-translate-mode.el" dest)
274 (emacs-generate-autoloads ,name dest)))))
275 #:make-flags (list (string-append "PREFIX=" %output)
276 "NETWORK_ACCESS=no test")
277 #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils))
278 #:modules ((guix build gnu-build-system)
279 (guix build emacs-utils)
280 (guix build utils))
281 #:test-target "test"))
282 (inputs
283 `(("curl" ,curl)
284 ("fribidi" ,fribidi)
285 ("rlwrap" ,rlwrap)))
286 (native-inputs
287 `(("emacs" ,emacs-minimal)
288 ("util-linux" ,util-linux))) ; hexdump, for the test
289 (home-page "https://www.soimort.org/translate-shell/")
290 (synopsis "Translations from the command line")
291 (description
292 "Translate Shell (formerly Google Translate CLI) is a command-line
293 translator powered by Google Translate (default), Bing Translator,
294 Yandex.Translate and Apertium. It gives you easy access to one of these
295 translation engines from your terminal.")
296 (license license:public-domain)))
297
298 (define-public lttoolbox
299 (package
300 (name "lttoolbox")
301 (version "3.5.1")
302 (source
303 (origin
304 (method url-fetch)
305 (uri (string-append
306 "https://github.com/apertium/lttoolbox/releases/download/v"
307 version "/lttoolbox-" version ".tar.gz"))
308 (sha256
309 (base32 "14yyrkzyqlsrii3v3ggg4dyvwlrcqcqc0aprphz5781a44jsrcwz"))))
310 (build-system gnu-build-system)
311 (arguments
312 `(#:phases
313 (modify-phases %standard-phases
314 (replace 'bootstrap
315 ;; The included ./autogen.sh unconditionally runs ./configure before
316 ;; its shebangs have been patched.
317 (lambda _
318 (invoke "autoreconf" "-vfi"))))))
319 (inputs
320 `(("libxml2" ,libxml2)))
321 (native-inputs
322 `(("autoconf" ,autoconf)
323 ("automake" ,automake)
324 ("libtool" ,libtool)
325 ("pkg-config" ,pkg-config)))
326 (home-page "http://wiki.apertium.org/wiki/Lttoolbox")
327 (synopsis "Lexical processing toolbox")
328 (description "Lttoolbox is a toolbox for lexical processing, morphological
329 analysis and generation of words. Analysis is the process of splitting a
330 word (e.g. cats) into its lemma \"cat\" and the grammatical information
331 @code{<n><pl>}. Generation is the opposite process.")
332 (license (list license:gpl2 ; main license
333 license:expat)))) ; utf8/*
334
335 (define-public apertium
336 (package
337 (name "apertium")
338 (version "3.5.2")
339 (source
340 (origin
341 (method url-fetch)
342 (uri (string-append
343 "https://github.com/apertium/apertium/releases/download/v"
344 version "/apertium-" version ".tar.gz"))
345 (sha256
346 (base32
347 "0lrx58ipx2kzh1pd3xm1viz05dqyrq38jbnj9dnk92c9ckkwkp4h"))
348 (file-name (string-append name "-" version ".tar.gz"))))
349 (build-system gnu-build-system)
350 (inputs
351 `(("libxml2" ,libxml2)
352 ("libxslt" ,libxslt)
353 ("lttoolbox" ,lttoolbox)
354 ("pcre" ,pcre)))
355 (native-inputs
356 `(("apertium-get"
357 ,(origin
358 (method git-fetch)
359 (uri (git-reference
360 (url "https://github.com/apertium/apertium-get")
361 (commit "692d030e68008fc123089cf2446070fe8c6e3a3b")))
362 (sha256
363 (base32
364 "0kgp68azvds7yjwfz57z8sa5094fyk5yr0qxzblrw7bisrrihnav"))))
365 ("flex" ,flex)
366 ("pkg-config" ,pkg-config)
367 ;; python is only required for running the test suite
368 ("python" ,python)))
369 (arguments
370 `(#:phases
371 (modify-phases %standard-phases
372 ;; If apertium-get does not exist in the source tree, the build tries
373 ;; to download it using an svn checkout. To avoid this, copy
374 ;; apertium-get into the source tree.
375 (add-after 'unpack 'unpack-apertium-get
376 (lambda* (#:key inputs #:allow-other-keys)
377 (copy-recursively (assoc-ref inputs "apertium-get")
378 "apertium/apertium-get")
379 #t)))))
380 (home-page "https://www.apertium.org/")
381 (synopsis "Rule based machine translation system")
382 (description "Apertium is a rule based machine translation system
383 featuring a shallow-transfer machine translation engine. The design of the
384 system makes translations fast (translating tens of thousands of words per
385 second on ordinary desktop computers) and, in spite of the errors, reasonably
386 intelligible and easily correctable.")
387 (license (list license:gpl2 ; main license
388 license:expat)))) ; utf8/*