1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages dictionaries)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (guix build-system trivial)
27 #:use-module (gnu packages base)
28 #:use-module (gnu packages texinfo)
29 #:use-module (gnu packages compression)
30 #:use-module (gnu packages tcl))
39 (uri (string-append "mirror://gnu/vera/vera-" version
43 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
44 (build-system trivial-build-system)
47 (use-modules (guix build utils))
49 (let* ((out (assoc-ref %outputs "out"))
50 (info (string-append out "/share/info"))
51 (html (string-append out "/share/html"))
52 (source (assoc-ref %build-inputs "source"))
53 (tar (assoc-ref %build-inputs "tar"))
54 (gz (assoc-ref %build-inputs "gzip"))
55 (texi (assoc-ref %build-inputs "texinfo")))
56 (setenv "PATH" (string-append gz "/bin"))
57 (system* (string-append tar "/bin/tar") "xvf" source)
59 (chdir (string-append "vera-" ,version))
63 ;; XXX: Use '--force' because the document is unhappy
64 ;; with Texinfo 5 (yes, documents can be unhappy.)
66 (system* (string-append texi "/bin/makeinfo")
67 "vera.texi" "--force" "-o"
68 (string-append info "/vera.info")))
70 (system* (string-append texi "/bin/makeinfo")
71 "vera.texi" "--force" "--html" "-o"
72 (string-append html "/vera.html"))))))
73 #:modules ((guix build utils))))
74 (native-inputs `(("texinfo" ,texinfo)
77 (home-page "http://savannah.gnu.org/projects/vera/")
78 (synopsis "List of acronyms")
80 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
81 acronyms distributed as an info document.")
91 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
94 "1wm0s51ygc6480dq8gwahzr35ls8jgpf34yiwl5yqcaa0i19fdv7"))))
95 (build-system trivial-build-system)
98 (use-modules (guix build utils))
99 (let* ((src (assoc-ref %build-inputs "source"))
100 (tar (assoc-ref %build-inputs "tar"))
101 (xz (assoc-ref %build-inputs "xz"))
102 (out (assoc-ref %outputs "out"))
103 (datadir (string-append out "/share/gcide")))
104 (set-path-environment-variable "PATH" '("bin")
107 (zero? (system* "tar" "-C" datadir
108 "--strip-components=1"
110 #:modules ((guix build utils))))
114 (synopsis "GNU Collaborative International Dictionary of English")
116 "GCIDE is a free dictionary based on a combination of sources. It can
117 be used via the GNU Dico program or accessed online at
118 http://gcide.gnu.org.ua/")
119 (home-page "http://gcide.gnu.org.ua/")
122 (define-public diction
123 ;; Not quite a dictionary, not quite a spell checker either…
129 (uri (string-append "mirror://gnu/diction/diction-"
133 "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
134 (build-system gnu-build-system)
135 (synopsis "Identifies wordy and commonly misused phrases")
137 "A package providing two classic Unix commands, style and diction.
138 Diction is used to identify wordy and commonly misused phrases in a
139 body of text. Style instead analyzes surface aspects of a written
140 work, such as sentence length and other readability measures.")
141 (home-page "https://www.gnu.org/software/diction/")
150 (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
151 "/" name "-" version ".tar.gz"))
154 "00z97ndwmzsgig9q6y98y8nbxy76pyi9qyj5qfpbbck24gakpz5l"))))
155 (build-system gnu-build-system)
156 (inputs `(("tk" ,tk)))
159 (modify-phases %standard-phases
166 (let ((bindir (string-append
167 (assoc-ref %outputs "out") "/bin"))
169 (assoc-ref %build-inputs "tk")
171 (sharedir (string-append
172 (assoc-ref %outputs "out")
173 "/share/applications"))
174 (libdir (string-append
175 (assoc-ref %outputs "out") "/lib")))
180 (substitute* "ding.desktop"
181 (("Exec=/usr/bin/ding")
182 (string-append "Exec=" bindir "/ding")))
183 (with-fluids ((%default-port-encoding "ISO-8859-1"))
184 (substitute* "ding" (("exec wish") (string-append "exec " wish))))
185 (substitute* "install.sh"
188 (("NEEDPROG=\"wish\"")
189 (string-append "NEEDPROG=\"" wish "\""))
190 (("DEFBINDIR=\"/usr/local/bin\"")
191 (string-append "DEFBINDIR=\"" bindir "\""))
192 (("DEFLIBDIR=\"/usr/local/lib\"")
193 (string-append "DEFLIBDIR=\"" libdir "\"")))
194 (install-file "ding.desktop" sharedir)
195 (install-file "ding.png" sharedir)
197 (system* "./install.sh"))))))))
198 (synopsis "Dictionary lookup program with a German-English dictionary")
199 (description "Ding is a dictionary lookup program for the X window system.
200 It comes with a German-English dictionary with approximately 270,000 entries.")
201 (home-page "http://www-user.tu-chemnitz.de/~fri/ding/")