gnu: thermald: Update to 2.4.
[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.24")
57 (source (origin
58 (method url-fetch)
59 (uri (string-append "mirror://gnu/vera/vera-" version
60 ".tar.gz"))
61 (sha256
62 (base32
63 "1j5p679vw72bv766acbg6g89k31ynmrzlpg7s3wzy4krlwdf92xc"))))
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 ;; Change a ‘Malformed UTF-8 character: \xd7\x34 (unexpected
84 ;; non-continuation byte 0x34, immediately after start byte
85 ;; 0xd7; need 2 bytes, got 1) in pattern match (m//)’.
86 (substitute* "vera.h"
87 (("320.480") "320x480"))
88
89 ;; XXX: Use '--force' because the document is unhappy
90 ;; with Texinfo 5 (yes, documents can be unhappy.)
91 (invoke (string-append texi "/bin/makeinfo")
92 "vera.texi" "--force" "-o"
93 (string-append info "/vera.info"))
94 (invoke (string-append texi "/bin/makeinfo")
95 "vera.texi" "--force" "--html" "-o"
96 (string-append html "/vera.html"))))
97 #:modules ((guix build utils))))
98 (native-inputs `(("texinfo" ,texinfo)
99 ("tar" ,tar)
100 ("gzip" ,gzip)))
101 (home-page "https://savannah.gnu.org/projects/vera/")
102 (synopsis "List of acronyms")
103 (description
104 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
105 acronyms distributed as an info document.")
106 (license license:fdl1.3+)))
107
108 (define-public gcide
109 (package
110 (name "gcide")
111 (version "0.52")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append
115 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
116 (sha256
117 (base32
118 "1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
119 (build-system copy-build-system)
120 (arguments
121 '(#:install-plan
122 '(("." "share/gcide/" #:exclude ("COPYING")))))
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 "https://gcide.gnu.org.ua/")
129 (license 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.14")
136 (source
137 (origin
138 (method url-fetch)
139 (uri (string-append "http://www.moria.de/~michael/diction/diction-"
140 version ".tar.gz"))
141 (sha256
142 (base32 "1z6p5x3l1a00h4v4s33qa82fznzc1jdqdnlc4dnmd9nblnrjy0fs"))))
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 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 'install
173 (lambda _
174 (let ((bindir (string-append
175 (assoc-ref %outputs "out") "/bin"))
176 (wish (string-append
177 (assoc-ref %build-inputs "tk")
178 "/bin/wish8.6"))
179 (sharedir (string-append
180 (assoc-ref %outputs "out")
181 "/share/applications"))
182 (libdir (string-append
183 (assoc-ref %outputs "out") "/lib")))
184 (mkdir-p bindir)
185 (mkdir-p libdir)
186 (mkdir-p sharedir)
187
188 (substitute* "ding.desktop"
189 (("Exec=/usr/bin/ding")
190 (string-append "Exec=" bindir "/ding")))
191 (with-fluids ((%default-port-encoding "ISO-8859-1"))
192 (substitute* "ding" (("exec wish") (string-append "exec " wish))))
193 (substitute* "install.sh"
194 (("/bin/cp") "cp")
195 (("/bin/mv") "mv")
196 (("NEEDPROG=\"wish\"")
197 (string-append "NEEDPROG=\"" wish "\""))
198 (("DEFBINDIR=\"/usr/local/bin\"")
199 (string-append "DEFBINDIR=\"" bindir "\""))
200 (("DEFLIBDIR=\"/usr/local/lib\"")
201 (string-append "DEFLIBDIR=\"" libdir "\"")))
202 (install-file "ding.desktop" sharedir)
203 (install-file "ding.png" sharedir)
204 (invoke "./install.sh")))))))
205 (synopsis "Dictionary lookup program with a German-English dictionary")
206 (description "Ding is a dictionary lookup program for the X window system.
207 It comes with a German-English dictionary with approximately 270,000 entries.")
208 (home-page "https://www-user.tu-chemnitz.de/~fri/ding/")
209 (license license:gpl2+)))
210
211 (define-public grammalecte
212 (package
213 (name "grammalecte")
214 (version "1.12.2")
215 (source
216 (origin
217 (method url-fetch/zipbomb)
218 (uri (string-append "https://grammalecte.net/grammalecte/zip/"
219 "Grammalecte-fr-v" version ".zip"))
220 (sha256
221 (base32 "1qny2l5dr08pfj2dnzmvm5gmwqz8m879ryxfaw4k8dhaacrrrf62"))))
222 (build-system python-build-system)
223 (home-page "https://grammalecte.net")
224 (synopsis "French spelling and grammar checker")
225 (description "Grammalecte is a grammar checker for the French language,
226 derived from Lightproof.
227
228 Grammalecte helps writing a proper French, without distracting users with
229 false positives. This grammar checker follows the principle: the less false
230 positives, the better; if it cannot know with a good chance that a dubious
231 expression is wrong, it keeps silent.
232
233 The package provides the command line interface, along with a server
234 and a Python library.")
235 (license license:gpl3+)))
236
237 (define-public translate-shell
238 (package
239 (name "translate-shell")
240 (version "0.9.6.12")
241 (source
242 (origin
243 (method git-fetch)
244 (uri (git-reference
245 (url"https://github.com/soimort/translate-shell")
246 (commit (string-append "v" version))))
247 (file-name (git-file-name name version))
248 (sha256
249 (base32 "075vqnha21rhr1b61dim7dqlfwm1yffyzcaa83s36rpk9r5sddzx"))))
250 (build-system gnu-build-system)
251 (arguments
252 `(#:phases
253 (modify-phases %standard-phases
254 (delete 'configure) ; no configure script
255 (add-after 'unpack 'remove-unnecessary-file
256 ;; This file gets generated during the build phase.
257 (lambda _
258 (delete-file "translate")
259 #t))
260 (add-after 'install 'wrap-binary
261 (lambda* (#:key inputs outputs #:allow-other-keys)
262 (let* ((out (assoc-ref outputs "out"))
263 (bin (string-append out "/bin/trans"))
264 (curl (assoc-ref inputs "curl"))
265 (fribidi (assoc-ref inputs "fribidi"))
266 (rlwrap (assoc-ref inputs "rlwrap")))
267 (wrap-program bin
268 `("PATH" ":" prefix
269 (,(string-append out "/bin:"
270 curl "/bin:"
271 fribidi "/bin:"
272 rlwrap "/bin")))))
273 #t))
274 (add-after 'install 'emacs-install
275 (lambda* (#:key inputs outputs #:allow-other-keys)
276 (let* ((out (assoc-ref outputs "out"))
277 (dest (string-append out "/share/emacs/site-lisp"))
278 (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")))
279 (install-file "google-translate-mode.el" dest)
280 (emacs-generate-autoloads ,name dest)))))
281 #:make-flags (list (string-append "PREFIX=" %output)
282 "NETWORK_ACCESS=no test")
283 #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils))
284 #:modules ((guix build gnu-build-system)
285 (guix build emacs-utils)
286 (guix build utils))
287 #:test-target "test"))
288 (inputs
289 `(("curl" ,curl)
290 ("fribidi" ,fribidi)
291 ("rlwrap" ,rlwrap)))
292 (native-inputs
293 `(("emacs" ,emacs-minimal)
294 ("util-linux" ,util-linux))) ; hexdump, for the test
295 (home-page "https://www.soimort.org/translate-shell/")
296 (synopsis "Translations from the command line")
297 (description
298 "Translate Shell (formerly Google Translate CLI) is a command-line
299 translator powered by Google Translate (default), Bing Translator,
300 Yandex.Translate and Apertium. It gives you easy access to one of these
301 translation engines from your terminal.")
302 (license license:public-domain)))
303
304 (define-public lttoolbox
305 (package
306 (name "lttoolbox")
307 (version "3.5.1")
308 (source
309 (origin
310 (method url-fetch)
311 (uri (string-append
312 "https://github.com/apertium/lttoolbox/releases/download/v"
313 version "/lttoolbox-" version ".tar.gz"))
314 (sha256
315 (base32 "14yyrkzyqlsrii3v3ggg4dyvwlrcqcqc0aprphz5781a44jsrcwz"))))
316 (build-system gnu-build-system)
317 (arguments
318 `(#:phases
319 (modify-phases %standard-phases
320 (replace 'bootstrap
321 ;; The included ./autogen.sh unconditionally runs ./configure before
322 ;; its shebangs have been patched.
323 (lambda _
324 (invoke "autoreconf" "-vfi"))))))
325 (inputs
326 `(("libxml2" ,libxml2)))
327 (native-inputs
328 `(("autoconf" ,autoconf)
329 ("automake" ,automake)
330 ("libtool" ,libtool)
331 ("pkg-config" ,pkg-config)))
332 (home-page "http://wiki.apertium.org/wiki/Lttoolbox")
333 (synopsis "Lexical processing toolbox")
334 (description "Lttoolbox is a toolbox for lexical processing, morphological
335 analysis and generation of words. Analysis is the process of splitting a
336 word (e.g. cats) into its lemma \"cat\" and the grammatical information
337 @code{<n><pl>}. Generation is the opposite process.")
338 (license (list license:gpl2 ; main license
339 license:expat)))) ; utf8/*
340
341 (define-public apertium
342 (package
343 (name "apertium")
344 (version "3.5.2")
345 (source
346 (origin
347 (method url-fetch)
348 (uri (string-append
349 "https://github.com/apertium/apertium/releases/download/v"
350 version "/apertium-" version ".tar.gz"))
351 (sha256
352 (base32
353 "0lrx58ipx2kzh1pd3xm1viz05dqyrq38jbnj9dnk92c9ckkwkp4h"))
354 (file-name (string-append name "-" version ".tar.gz"))))
355 (build-system gnu-build-system)
356 (inputs
357 `(("libxml2" ,libxml2)
358 ("libxslt" ,libxslt)
359 ("lttoolbox" ,lttoolbox)
360 ("pcre" ,pcre)))
361 (native-inputs
362 `(("apertium-get"
363 ,(origin
364 (method git-fetch)
365 (uri (git-reference
366 (url "https://github.com/apertium/apertium-get")
367 (commit "692d030e68008fc123089cf2446070fe8c6e3a3b")))
368 (sha256
369 (base32
370 "0kgp68azvds7yjwfz57z8sa5094fyk5yr0qxzblrw7bisrrihnav"))))
371 ("flex" ,flex)
372 ("pkg-config" ,pkg-config)
373 ;; python is only required for running the test suite
374 ("python" ,python)))
375 (arguments
376 `(#:phases
377 (modify-phases %standard-phases
378 ;; If apertium-get does not exist in the source tree, the build tries
379 ;; to download it using an svn checkout. To avoid this, copy
380 ;; apertium-get into the source tree.
381 (add-after 'unpack 'unpack-apertium-get
382 (lambda* (#:key inputs #:allow-other-keys)
383 (copy-recursively (assoc-ref inputs "apertium-get")
384 "apertium/apertium-get")
385 #t)))))
386 (home-page "https://www.apertium.org/")
387 (synopsis "Rule based machine translation system")
388 (description "Apertium is a rule based machine translation system
389 featuring a shallow-transfer machine translation engine. The design of the
390 system makes translations fast (translating tens of thousands of words per
391 second on ordinary desktop computers) and, in spite of the errors, reasonably
392 intelligible and easily correctable.")
393 (license (list license:gpl2 ; main license
394 license:expat)))) ; utf8/*