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