Commit | Line | Data |
---|---|---|
a869565b | 1 | ;;; GNU Guix --- Functional package management for GNU |
af456909 | 2 | ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
fdc1b2fd | 3 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
68e9ee72 | 4 | ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> |
a869565b LC |
5 | ;;; |
6 | ;;; This file is part of GNU Guix. | |
7 | ;;; | |
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. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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/>. | |
20 | ||
21 | (define-module (gnu packages dictionaries) | |
a9a8f063 | 22 | #:use-module (guix licenses) |
a869565b LC |
23 | #:use-module (guix packages) |
24 | #:use-module (guix download) | |
af456909 | 25 | #:use-module (guix build-system gnu) |
a869565b LC |
26 | #:use-module (guix build-system trivial) |
27 | #:use-module (gnu packages base) | |
a9a8f063 | 28 | #:use-module (gnu packages texinfo) |
274563e1 JD |
29 | #:use-module (gnu packages compression) |
30 | #:use-module (gnu packages tcl)) | |
31 | ||
a869565b LC |
32 | |
33 | (define-public vera | |
34 | (package | |
35 | (name "vera") | |
fdc1b2fd | 36 | (version "1.23") |
a869565b LC |
37 | (source (origin |
38 | (method url-fetch) | |
39 | (uri (string-append "mirror://gnu/vera/vera-" version | |
40 | ".tar.gz")) | |
41 | (sha256 | |
42 | (base32 | |
fdc1b2fd | 43 | "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz")))) |
a869565b LC |
44 | (build-system trivial-build-system) |
45 | (arguments | |
46 | `(#:builder (begin | |
47 | (use-modules (guix build utils)) | |
48 | ||
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) | |
58 | ||
59 | (chdir (string-append "vera-" ,version)) | |
60 | (mkdir-p info) | |
61 | (mkdir-p html) | |
62 | ||
63 | ;; XXX: Use '--force' because the document is unhappy | |
64 | ;; with Texinfo 5 (yes, documents can be unhappy.) | |
65 | (and (zero? | |
66 | (system* (string-append texi "/bin/makeinfo") | |
67 | "vera.texi" "--force" "-o" | |
68 | (string-append info "/vera.info"))) | |
69 | (zero? | |
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) | |
75 | ("tar" ,tar) | |
76 | ("gzip" ,gzip))) | |
77 | (home-page "http://savannah.gnu.org/projects/vera/") | |
78 | (synopsis "List of acronyms") | |
79 | (description | |
80 | "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing | |
81 | acronyms distributed as an info document.") | |
a9a8f063 | 82 | (license fdl1.3+))) |
68e9ee72 SB |
83 | |
84 | (define-public gcide | |
85 | (package | |
86 | (name "gcide") | |
87 | (version "0.51") | |
88 | (source (origin | |
89 | (method url-fetch) | |
90 | (uri (string-append | |
91 | "mirror://gnu/gcide/gcide-" version ".tar.xz")) | |
92 | (sha256 | |
93 | (base32 | |
94 | "1wm0s51ygc6480dq8gwahzr35ls8jgpf34yiwl5yqcaa0i19fdv7")))) | |
95 | (build-system trivial-build-system) | |
96 | (arguments | |
97 | '(#:builder (begin | |
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") | |
105 | (list tar xz)) | |
106 | (mkdir-p datadir) | |
107 | (zero? (system* "tar" "-C" datadir | |
108 | "--strip-components=1" | |
109 | "-xvf" src)))) | |
110 | #:modules ((guix build utils)))) | |
111 | (native-inputs | |
112 | `(("tar" ,tar) | |
113 | ("xz" ,xz))) | |
114 | (synopsis "GNU Collaborative International Dictionary of English") | |
115 | (description | |
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/") | |
120 | (license gpl3+))) | |
af456909 LC |
121 | |
122 | (define-public diction | |
123 | ;; Not quite a dictionary, not quite a spell checker either… | |
124 | (package | |
125 | (name "diction") | |
126 | (version "1.11") | |
127 | (source (origin | |
128 | (method url-fetch) | |
129 | (uri (string-append "mirror://gnu/diction/diction-" | |
130 | version ".tar.gz")) | |
131 | (sha256 | |
132 | (base32 | |
133 | "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him")))) | |
134 | (build-system gnu-build-system) | |
135 | (synopsis "Identifies wordy and commonly misused phrases") | |
136 | (description | |
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/") | |
142 | (license gpl3+))) | |
274563e1 JD |
143 | |
144 | (define-public ding | |
145 | (package | |
146 | (name "ding") | |
147 | (version "1.8") | |
148 | (source (origin | |
149 | (method url-fetch) | |
150 | (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name | |
151 | "/" name "-" version ".tar.gz")) | |
152 | (sha256 | |
153 | (base32 | |
154 | "00z97ndwmzsgig9q6y98y8nbxy76pyi9qyj5qfpbbck24gakpz5l")))) | |
155 | (build-system gnu-build-system) | |
156 | (inputs `(("tk" ,tk))) | |
157 | (arguments | |
158 | `(#:phases | |
159 | (modify-phases %standard-phases | |
160 | (delete 'configure) | |
161 | (delete 'build) | |
162 | (delete 'check) | |
163 | (replace | |
164 | 'install | |
165 | (lambda _ | |
166 | (let ((bindir (string-append | |
167 | (assoc-ref %outputs "out") "/bin")) | |
168 | (wish (string-append | |
169 | (assoc-ref %build-inputs "tk") | |
170 | "/bin/wish8.6")) | |
171 | (sharedir (string-append | |
172 | (assoc-ref %outputs "out") | |
173 | "/share/applications")) | |
174 | (libdir (string-append | |
175 | (assoc-ref %outputs "out") "/lib"))) | |
176 | (mkdir-p bindir) | |
177 | (mkdir-p libdir) | |
178 | (mkdir-p sharedir) | |
179 | ||
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" | |
186 | (("/bin/cp") "cp") | |
187 | (("/bin/mv") "mv") | |
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) | |
196 | (zero? | |
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/") | |
202 | (license gpl2+))) |