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>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
23 (define-module (gnu packages dictionaries)
24 #:use-module (guix licenses)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix build-system python)
29 #:use-module (guix build-system trivial)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages base)
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)
37 #:use-module (gnu packages texinfo)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages tcl))
48 (uri (string-append "mirror://gnu/vera/vera-" version
52 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
53 (build-system trivial-build-system)
56 (use-modules (guix build utils))
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"))
66 (invoke (string-append tar "/bin/tar") "xvf" source)
68 (chdir (string-append "vera-" ,version))
72 ;; XXX: Use '--force' because the document is unhappy
73 ;; with Texinfo 5 (yes, documents can be unhappy.)
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"))))
80 #:modules ((guix build utils))))
81 (native-inputs `(("texinfo" ,texinfo)
84 (home-page "https://savannah.gnu.org/projects/vera/")
85 (synopsis "List of acronyms")
87 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
88 acronyms distributed as an info document.")
98 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
101 "1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
102 (build-system trivial-build-system)
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")
114 (invoke "tar" "-C" datadir
115 "--strip-components=1"
117 #:modules ((guix build utils))))
121 (synopsis "GNU Collaborative International Dictionary of English")
123 "GCIDE is a free dictionary based on a combination of sources. It can
124 be used via the GNU Dico program or accessed online at
125 http://gcide.gnu.org.ua/")
126 (home-page "http://gcide.gnu.org.ua/")
129 (define-public diction
130 ;; Not quite a dictionary, not quite a spell checker either…
136 (uri (string-append "mirror://gnu/diction/diction-"
140 "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
141 (build-system gnu-build-system)
142 (synopsis "Identifies wordy and commonly misused phrases")
144 "A package providing two classic Unix commands, style and diction.
145 Diction is used to identify wordy and commonly misused phrases in a
146 body of text. Style instead analyzes surface aspects of a written
147 work, such as sentence length and other readability measures.")
148 (home-page "https://www.gnu.org/software/diction/")
157 (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
158 "/" name "-" version ".tar.gz"))
161 "0chjqs3z9zs1w3l7b5lsaj682rgnkf9kibcbzhggqqcn1pbvl5sq"))))
162 (build-system gnu-build-system)
163 (inputs `(("tk" ,tk)))
166 (modify-phases %standard-phases
173 (let ((bindir (string-append
174 (assoc-ref %outputs "out") "/bin"))
176 (assoc-ref %build-inputs "tk")
178 (sharedir (string-append
179 (assoc-ref %outputs "out")
180 "/share/applications"))
181 (libdir (string-append
182 (assoc-ref %outputs "out") "/lib")))
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"
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)
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.
207 It comes with a German-English dictionary with approximately 270,000 entries.")
208 (home-page "http://www-user.tu-chemnitz.de/~fri/ding/")
211 (define-public grammalecte
217 (method url-fetch/zipbomb)
218 (uri (string-append "https://www.dicollecte.org/grammalecte/zip/"
219 "Grammalecte-fr-v" version ".zip"))
222 "1flsahqw2r0cmg0bixpl5w0acricmdh2cf4lf9zr66ydgmjnmv2s"))))
223 (build-system python-build-system)
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
227 language, derived from Lightproof.
229 Grammalecte aims at helping to write a proper French without distracting users
230 with false positives. This grammar checker follows the principle: the less
231 false positives, the better; if it cannot know with a good chance if
232 a dubious expression is wrong, it will keep silent.
234 The package provides the command line interface, along with a server
235 and a Python library.")
238 (define-public translate-shell
240 (name "translate-shell")
245 (uri (string-append "https://github.com/soimort/" name "/archive/v"
249 "17yc2kwk8957wwxyih0jmsai720ai2yqyvmrqrglcncqg6zdbz9w"))
250 (file-name (string-append name "-" version ".tar.gz"))))
251 (build-system gnu-build-system)
254 (modify-phases %standard-phases
255 (delete 'configure) ; no configure phase
256 (add-after 'install 'emacs-install
257 (lambda* (#:key inputs outputs #:allow-other-keys)
258 (let* ((out (assoc-ref outputs "out"))
259 (dest (string-append out "/share/emacs/site-lisp/guix.d/"
261 (emacs (string-append (assoc-ref inputs "emacs") "/bin/emacs")))
262 (install-file "google-translate-mode.el" dest)
263 (emacs-generate-autoloads ,name dest)))))
264 #:make-flags (list (string-append "PREFIX=" %output)
265 "NETWORK_ACCESS=no test")
266 #:imported-modules (,@%gnu-build-system-modules (guix build emacs-utils))
267 #:modules ((guix build gnu-build-system)
268 (guix build emacs-utils)
270 #:test-target "test"))
276 `(("emacs" ,emacs-minimal)
277 ("util-linux" ,util-linux))) ; hexdump, for the test
278 (home-page "https://www.soimort.org/translate-shell/")
279 (synopsis "Translations from the command line")
281 "Translate Shell (formerly Google Translate CLI) is a command-line
282 translator powered by Google Translate (default), Bing Translator,
283 Yandex.Translate and Apertium. It gives you easy access to one of these
284 translation engines from your terminal.")
285 (license public-domain)))