gnu: mono: Make build reproducible.
[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 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
5 ;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
6 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages dictionaries)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system python)
30 #:use-module (guix build-system trivial)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages emacs)
35 #:use-module (gnu packages fribidi)
36 #:use-module (gnu packages linux)
37 #:use-module (gnu packages readline)
38 #:use-module (gnu packages texinfo)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages tcl))
41
42
43 (define-public vera
44 (package
45 (name "vera")
46 (version "1.23")
47 (source (origin
48 (method url-fetch)
49 (uri (string-append "mirror://gnu/vera/vera-" version
50 ".tar.gz"))
51 (sha256
52 (base32
53 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
54 (build-system trivial-build-system)
55 (arguments
56 `(#:builder (begin
57 (use-modules (guix build utils))
58
59 (let* ((out (assoc-ref %outputs "out"))
60 (info (string-append out "/share/info"))
61 (html (string-append out "/share/html"))
62 (source (assoc-ref %build-inputs "source"))
63 (tar (assoc-ref %build-inputs "tar"))
64 (gz (assoc-ref %build-inputs "gzip"))
65 (texi (assoc-ref %build-inputs "texinfo")))
66 (setenv "PATH" (string-append gz "/bin"))
67 (invoke (string-append tar "/bin/tar") "xvf" source)
68
69 (chdir (string-append "vera-" ,version))
70 (mkdir-p info)
71 (mkdir-p html)
72
73 ;; XXX: Use '--force' because the document is unhappy
74 ;; with Texinfo 5 (yes, documents can be unhappy.)
75 (invoke (string-append texi "/bin/makeinfo")
76 "vera.texi" "--force" "-o"
77 (string-append info "/vera.info"))
78 (invoke (string-append texi "/bin/makeinfo")
79 "vera.texi" "--force" "--html" "-o"
80 (string-append html "/vera.html"))))
81 #:modules ((guix build utils))))
82 (native-inputs `(("texinfo" ,texinfo)
83 ("tar" ,tar)
84 ("gzip" ,gzip)))
85 (home-page "https://savannah.gnu.org/projects/vera/")
86 (synopsis "List of acronyms")
87 (description
88 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
89 acronyms distributed as an info document.")
90 (license fdl1.3+)))
91
92 (define-public gcide
93 (package
94 (name "gcide")
95 (version "0.52")
96 (source (origin
97 (method url-fetch)
98 (uri (string-append
99 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
100 (sha256
101 (base32
102 "1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
103 (build-system trivial-build-system)
104 (arguments
105 '(#:builder (begin
106 (use-modules (guix build utils))
107 (let* ((src (assoc-ref %build-inputs "source"))
108 (tar (assoc-ref %build-inputs "tar"))
109 (xz (assoc-ref %build-inputs "xz"))
110 (out (assoc-ref %outputs "out"))
111 (datadir (string-append out "/share/gcide")))
112 (set-path-environment-variable "PATH" '("bin")
113 (list tar xz))
114 (mkdir-p datadir)
115 (invoke "tar" "-C" datadir
116 "--strip-components=1"
117 "-xvf" src)))
118 #:modules ((guix build utils))))
119 (native-inputs
120 `(("tar" ,tar)
121 ("xz" ,xz)))
122 (synopsis "GNU Collaborative International Dictionary of English")
123 (description
124 "GCIDE is a free dictionary based on a combination of sources. It can
125 be used via the GNU Dico program or accessed online at
126 http://gcide.gnu.org.ua/")
127 (home-page "http://gcide.gnu.org.ua/")
128 (license gpl3+)))
129
130 (define-public diction
131 ;; Not quite a dictionary, not quite a spell checker either…
132 (package
133 (name "diction")
134 (version "1.11")
135 (source (origin
136 (method url-fetch)
137 (uri (string-append "mirror://gnu/diction/diction-"
138 version ".tar.gz"))
139 (sha256
140 (base32
141 "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
142 (build-system gnu-build-system)
143 (synopsis "Identifies wordy and commonly misused phrases")
144 (description
145 "A package providing two classic Unix commands, style and diction.
146 Diction is used to identify wordy and commonly misused phrases in a
147 body of text. Style instead analyzes surface aspects of a written
148 work, such as sentence length and other readability measures.")
149 (home-page "https://www.gnu.org/software/diction/")
150 (license gpl3+)))
151
152 (define-public ding
153 (package
154 (name "ding")
155 (version "1.8.1")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
159 "/" name "-" version ".tar.gz"))
160 (sha256
161 (base32
162 "0chjqs3z9zs1w3l7b5lsaj682rgnkf9kibcbzhggqqcn1pbvl5sq"))))
163 (build-system gnu-build-system)
164 (inputs `(("tk" ,tk)))
165 (arguments
166 `(#:phases
167 (modify-phases %standard-phases
168 (delete 'configure)
169 (delete 'build)
170 (delete 'check)
171 (replace
172 '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 (zero?
205 (system* "./install.sh"))))))))
206 (synopsis "Dictionary lookup program with a German-English dictionary")
207 (description "Ding is a dictionary lookup program for the X window system.
208 It comes with a German-English dictionary with approximately 270,000 entries.")
209 (home-page "http://www-user.tu-chemnitz.de/~fri/ding/")
210 (license gpl2+)))
211
212 (define-public grammalecte
213 (package
214 (name "grammalecte")
215 (version "0.6.5")
216 (source
217 (origin
218 (method url-fetch/zipbomb)
219 (uri (string-append "https://www.dicollecte.org/grammalecte/zip/"
220 "Grammalecte-fr-v" version ".zip"))
221 (sha256
222 (base32
223 "11byjs3ggdhia5f4vyfqfvbbczsfqimll98h98g7hlsrm7vrifb0"))))
224 (build-system python-build-system)
225 (home-page "https://grammalecte.net")
226 (synopsis "French spelling and grammar checker")
227 (description "Grammalecte is a grammar checker dedicated to the French
228 language, derived from Lightproof.
229
230 Grammalecte aims at helping to write a proper French without distracting users
231 with false positives. This grammar checker follows the principle: the less
232 false positives, the better; if it cannot know with a good chance if
233 a dubious expression is wrong, it will keep silent.
234
235 The package provides the command line interface, along with a server
236 and a Python library.")
237 (license gpl3+)))
238
239 (define-public translate-shell
240 (package
241 (name "translate-shell")
242 (version "0.9.6.8")
243 (source
244 (origin
245 (method url-fetch)
246 (uri (string-append "https://github.com/soimort/" name "/archive/v"
247 version ".tar.gz"))
248 (sha256
249 (base32
250 "17yc2kwk8957wwxyih0jmsai720ai2yqyvmrqrglcncqg6zdbz9w"))
251 (file-name (string-append name "-" version ".tar.gz"))))
252 (build-system gnu-build-system)
253 (arguments
254 `(#:phases
255 (modify-phases %standard-phases
256 (delete 'configure) ; no configure phase
257 (add-after 'install 'emacs-install
258 (lambda* (#:key inputs outputs #:allow-other-keys)
259 (let* ((out (assoc-ref outputs "out"))
260 (dest (string-append out "/share/emacs/site-lisp/guix.d/"
261 ,name "-" ,version))
262 (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")))
263 (install-file "google-translate-mode.el" dest)
264 (emacs-generate-autoloads ,name dest)))))
265 #:make-flags (list (string-append "PREFIX=" %output)
266 "NETWORK_ACCESS=no test")
267 #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils))
268 #:modules ((guix build gnu-build-system)
269 (guix build emacs-utils)
270 (guix build utils))
271 #:test-target "test"))
272 (propagated-inputs
273 `(("curl" ,curl)
274 ("fribidi" ,fribidi)
275 ("rlwrap" ,rlwrap)))
276 (native-inputs
277 `(("emacs" ,emacs-minimal)
278 ("util-linux" ,util-linux))) ; hexdump, for the test
279 (home-page "https://www.soimort.org/translate-shell/")
280 (synopsis "Translations from the command line")
281 (description
282 "Translate Shell (formerly Google Translate CLI) is a command-line
283 translator powered by Google Translate (default), Bing Translator,
284 Yandex.Translate and Apertium. It gives you easy access to one of these
285 translation engines from your terminal.")
286 (license public-domain)))