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>
9 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
49 (uri (string-append "mirror://gnu/vera/vera-" version
53 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
54 (build-system trivial-build-system)
57 (use-modules (guix build utils))
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)
69 (chdir (string-append "vera-" ,version))
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)
85 (home-page "https://savannah.gnu.org/projects/vera/")
86 (synopsis "List of acronyms")
88 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
89 acronyms distributed as an info document.")
99 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
102 "1n3bp91sik66z3ca7mjqbr9nck3hg5ck0c8g84xc0qnfpx5vznh2"))))
103 (build-system trivial-build-system)
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")
115 (invoke "tar" "-C" datadir
116 "--strip-components=1"
118 #:modules ((guix build utils))))
122 (synopsis "GNU Collaborative International Dictionary of English")
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/")
130 (define-public diction
131 ;; Not quite a dictionary, not quite a spell checker either…
137 (uri (string-append "mirror://gnu/diction/diction-"
141 "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
142 (build-system gnu-build-system)
143 (synopsis "Identifies wordy and commonly misused phrases")
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/")
158 (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
159 "/" name "-" version ".tar.gz"))
162 "0chjqs3z9zs1w3l7b5lsaj682rgnkf9kibcbzhggqqcn1pbvl5sq"))))
163 (build-system gnu-build-system)
164 (inputs `(("tk" ,tk)))
167 (modify-phases %standard-phases
174 (let ((bindir (string-append
175 (assoc-ref %outputs "out") "/bin"))
177 (assoc-ref %build-inputs "tk")
179 (sharedir (string-append
180 (assoc-ref %outputs "out")
181 "/share/applications"))
182 (libdir (string-append
183 (assoc-ref %outputs "out") "/lib")))
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"
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)
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/")
212 (define-public grammalecte
218 (method url-fetch/zipbomb)
219 (uri (string-append "https://www.dicollecte.org/grammalecte/zip/"
220 "Grammalecte-fr-v" version ".zip"))
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.
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.
235 The package provides the command line interface, along with a server
236 and a Python library.")
239 (define-public translate-shell
241 (name "translate-shell")
246 (uri (string-append "https://github.com/soimort/" name "/archive/v"
250 "17yc2kwk8957wwxyih0jmsai720ai2yqyvmrqrglcncqg6zdbz9w"))
251 (file-name (string-append name "-" version ".tar.gz"))))
252 (build-system gnu-build-system)
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/"
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)
271 #:test-target "test"))
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")
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)))