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