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) |
11386e18 | 34 | #:use-module (guix build-system copy) |
196c8b37 | 35 | #:use-module (gnu packages) |
d2e1d022 | 36 | #:use-module (gnu packages autotools) |
a869565b | 37 | #:use-module (gnu packages base) |
0f3847bf EF |
38 | #:use-module (gnu packages curl) |
39 | #:use-module (gnu packages emacs) | |
30a1f6e2 | 40 | #:use-module (gnu packages flex) |
0f3847bf EF |
41 | #:use-module (gnu packages fribidi) |
42 | #:use-module (gnu packages linux) | |
30a1f6e2 | 43 | #:use-module (gnu packages pcre) |
d2e1d022 | 44 | #:use-module (gnu packages pkg-config) |
30a1f6e2 | 45 | #:use-module (gnu packages python) |
0f3847bf | 46 | #:use-module (gnu packages readline) |
a9a8f063 | 47 | #:use-module (gnu packages texinfo) |
274563e1 | 48 | #:use-module (gnu packages compression) |
d2e1d022 AI |
49 | #:use-module (gnu packages tcl) |
50 | #:use-module (gnu packages xml)) | |
274563e1 | 51 | |
a869565b LC |
52 | |
53 | (define-public vera | |
54 | (package | |
55 | (name "vera") | |
fdc1b2fd | 56 | (version "1.23") |
a869565b LC |
57 | (source (origin |
58 | (method url-fetch) | |
59 | (uri (string-append "mirror://gnu/vera/vera-" version | |
60 | ".tar.gz")) | |
61 | (sha256 | |
62 | (base32 | |
fdc1b2fd | 63 | "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz")))) |
a869565b LC |
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")) | |
22fc1b90 | 77 | (invoke (string-append tar "/bin/tar") "xvf" source) |
a869565b LC |
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.) | |
22fc1b90 MW |
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")))) | |
a869565b LC |
91 | #:modules ((guix build utils)))) |
92 | (native-inputs `(("texinfo" ,texinfo) | |
93 | ("tar" ,tar) | |
94 | ("gzip" ,gzip))) | |
6fd52309 | 95 | (home-page "https://savannah.gnu.org/projects/vera/") |
a869565b LC |
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.") | |
5790d163 | 100 | (license license:fdl1.3+))) |
68e9ee72 SB |
101 | |
102 | (define-public gcide | |
103 | (package | |
104 | (name "gcide") | |
8276a6f4 | 105 | (version "0.52") |
68e9ee72 SB |
106 | (source (origin |
107 | (method url-fetch) | |
108 | (uri (string-append | |
109 | "mirror://gnu/gcide/gcide-" version ".tar.xz")) | |
110 | (sha256 | |
111 | (base32 | |
8276a6f4 | 112 | "1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2")))) |
11386e18 | 113 | (build-system copy-build-system) |
68e9ee72 | 114 | (arguments |
11386e18 PN |
115 | '(#:install-plan |
116 | '(("." "share/gcide/" #:exclude ("COPYING"))))) | |
68e9ee72 SB |
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 "http://gcide.gnu.org.ua/") | |
5790d163 | 123 | (license license:gpl3+))) |
af456909 LC |
124 | |
125 | (define-public diction | |
126 | ;; Not quite a dictionary, not quite a spell checker either… | |
127 | (package | |
128 | (name "diction") | |
ec93777e TGR |
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")))) | |
af456909 LC |
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/") | |
5790d163 | 145 | (license license:gpl3+))) |
274563e1 JD |
146 | |
147 | (define-public ding | |
148 | (package | |
149 | (name "ding") | |
6872680c | 150 | (version "1.8.1") |
274563e1 JD |
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 | |
6872680c | 157 | "0chjqs3z9zs1w3l7b5lsaj682rgnkf9kibcbzhggqqcn1pbvl5sq")))) |
274563e1 JD |
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) | |
7f46dcc4 | 166 | (replace 'install |
274563e1 JD |
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) | |
7f46dcc4 | 198 | (invoke "./install.sh"))))))) |
274563e1 JD |
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.") | |
ef752646 | 202 | (home-page "https://www-user.tu-chemnitz.de/~fri/ding/") |
5790d163 | 203 | (license license:gpl2+))) |
0f3847bf | 204 | |
ad564a06 NG |
205 | (define-public grammalecte |
206 | (package | |
207 | (name "grammalecte") | |
9fad0550 | 208 | (version "1.8.0") |
ad564a06 NG |
209 | (source |
210 | (origin | |
211 | (method url-fetch/zipbomb) | |
2613bab6 | 212 | (uri (string-append "https://grammalecte.net/grammalecte/zip/" |
ad564a06 NG |
213 | "Grammalecte-fr-v" version ".zip")) |
214 | (sha256 | |
9fad0550 | 215 | (base32 "06z2na1zs5q6vla45q5b8fzjwpckanmwh42r8in8vhb7a8v2fkyp")))) |
ad564a06 | 216 | (build-system python-build-system) |
f0ac761f | 217 | (home-page "https://grammalecte.net") |
695ee52e | 218 | (synopsis "French spelling and grammar checker") |
ad564a06 NG |
219 | (description "Grammalecte is a grammar checker dedicated to the French |
220 | language, derived from Lightproof. | |
221 | ||
222 | Grammalecte aims at helping to write a proper French without distracting users | |
223 | with false positives. This grammar checker follows the principle: the less | |
224 | false positives, the better; if it cannot know with a good chance if | |
225 | a dubious expression is wrong, it will keep silent. | |
226 | ||
227 | The package provides the command line interface, along with a server | |
228 | and a Python library.") | |
5790d163 | 229 | (license license:gpl3+))) |
ad564a06 | 230 | |
0f3847bf EF |
231 | (define-public translate-shell |
232 | (package | |
233 | (name "translate-shell") | |
ece22ac8 | 234 | (version "0.9.6.11") |
0f3847bf EF |
235 | (source |
236 | (origin | |
cfa3b718 EF |
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)) | |
0f3847bf | 242 | (sha256 |
ece22ac8 | 243 | (base32 "137fz3ahzf65hfqcs4k7hhrmfjlhlw7wr3gfsvk88bnyqkyw44sm")))) |
0f3847bf EF |
244 | (build-system gnu-build-system) |
245 | (arguments | |
246 | `(#:phases | |
247 | (modify-phases %standard-phases | |
7f221c0e | 248 | (delete 'configure) ; no configure script |
cfa3b718 EF |
249 | (add-after 'unpack 'remove-unnecessary-file |
250 | ;; This file gets generated during the build phase. | |
251 | (lambda _ | |
252 | (delete-file "translate") | |
253 | #t)) | |
cf51b828 EF |
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)) | |
0f3847bf EF |
268 | (add-after 'install 'emacs-install |
269 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
270 | (let* ((out (assoc-ref outputs "out")) | |
6e02ef79 | 271 | (dest (string-append out "/share/emacs/site-lisp")) |
0f3847bf EF |
272 | (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs"))) |
273 | (install-file "google-translate-mode.el" dest) | |
274 | (emacs-generate-autoloads ,name dest))))) | |
196c8b37 OP |
275 | #:make-flags (list (string-append "PREFIX=" %output) |
276 | "NETWORK_ACCESS=no test") | |
0f3847bf EF |
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")) | |
cf51b828 | 282 | (inputs |
0f3847bf EF |
283 | `(("curl" ,curl) |
284 | ("fribidi" ,fribidi) | |
285 | ("rlwrap" ,rlwrap))) | |
286 | (native-inputs | |
287 | `(("emacs" ,emacs-minimal) | |
b92302fd | 288 | ("util-linux" ,util-linux))) ; hexdump, for the test |
196c8b37 | 289 | (home-page "https://www.soimort.org/translate-shell/") |
0f3847bf EF |
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.") | |
5790d163 AI |
296 | (license license:public-domain))) |
297 | ||
d2e1d022 AI |
298 | (define-public lttoolbox |
299 | (package | |
300 | (name "lttoolbox") | |
fbc2c04e | 301 | (version "3.5.1") |
d2e1d022 AI |
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 | |
9c478cbd | 309 | (base32 "14yyrkzyqlsrii3v3ggg4dyvwlrcqcqc0aprphz5781a44jsrcwz")))) |
d2e1d022 | 310 | (build-system gnu-build-system) |
fbc2c04e TGR |
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")))))) | |
d2e1d022 AI |
319 | (inputs |
320 | `(("libxml2" ,libxml2))) | |
321 | (native-inputs | |
fbc2c04e TGR |
322 | `(("autoconf" ,autoconf) |
323 | ("automake" ,automake) | |
324 | ("libtool" ,libtool) | |
325 | ("pkg-config" ,pkg-config))) | |
d2e1d022 AI |
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/* | |
30a1f6e2 AI |
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 | |
61506fe5 | 368 | ("python" ,python))) |
30a1f6e2 AI |
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/* |