gnu: Add GNU Diction.
[jackhill/guix/guix.git] / gnu / packages / dictionaries.scm
CommitLineData
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)
793bcc19 29 #:use-module (gnu packages compression))
a869565b
LC
30
31(define-public vera
32 (package
33 (name "vera")
fdc1b2fd 34 (version "1.23")
a869565b
LC
35 (source (origin
36 (method url-fetch)
37 (uri (string-append "mirror://gnu/vera/vera-" version
38 ".tar.gz"))
39 (sha256
40 (base32
fdc1b2fd 41 "1az0v563jja8xb4896jyr8yv7jd9zacqyfkjd7psb73v7clg1mzz"))))
a869565b
LC
42 (build-system trivial-build-system)
43 (arguments
44 `(#:builder (begin
45 (use-modules (guix build utils))
46
47 (let* ((out (assoc-ref %outputs "out"))
48 (info (string-append out "/share/info"))
49 (html (string-append out "/share/html"))
50 (source (assoc-ref %build-inputs "source"))
51 (tar (assoc-ref %build-inputs "tar"))
52 (gz (assoc-ref %build-inputs "gzip"))
53 (texi (assoc-ref %build-inputs "texinfo")))
54 (setenv "PATH" (string-append gz "/bin"))
55 (system* (string-append tar "/bin/tar") "xvf" source)
56
57 (chdir (string-append "vera-" ,version))
58 (mkdir-p info)
59 (mkdir-p html)
60
61 ;; XXX: Use '--force' because the document is unhappy
62 ;; with Texinfo 5 (yes, documents can be unhappy.)
63 (and (zero?
64 (system* (string-append texi "/bin/makeinfo")
65 "vera.texi" "--force" "-o"
66 (string-append info "/vera.info")))
67 (zero?
68 (system* (string-append texi "/bin/makeinfo")
69 "vera.texi" "--force" "--html" "-o"
70 (string-append html "/vera.html"))))))
71 #:modules ((guix build utils))))
72 (native-inputs `(("texinfo" ,texinfo)
73 ("tar" ,tar)
74 ("gzip" ,gzip)))
75 (home-page "http://savannah.gnu.org/projects/vera/")
76 (synopsis "List of acronyms")
77 (description
78 "V.E.R.A. (Virtual Entity of Relevant Acronyms) is a list of computing
79acronyms distributed as an info document.")
a9a8f063 80 (license fdl1.3+)))
68e9ee72
SB
81
82(define-public gcide
83 (package
84 (name "gcide")
85 (version "0.51")
86 (source (origin
87 (method url-fetch)
88 (uri (string-append
89 "mirror://gnu/gcide/gcide-" version ".tar.xz"))
90 (sha256
91 (base32
92 "1wm0s51ygc6480dq8gwahzr35ls8jgpf34yiwl5yqcaa0i19fdv7"))))
93 (build-system trivial-build-system)
94 (arguments
95 '(#:builder (begin
96 (use-modules (guix build utils))
97 (let* ((src (assoc-ref %build-inputs "source"))
98 (tar (assoc-ref %build-inputs "tar"))
99 (xz (assoc-ref %build-inputs "xz"))
100 (out (assoc-ref %outputs "out"))
101 (datadir (string-append out "/share/gcide")))
102 (set-path-environment-variable "PATH" '("bin")
103 (list tar xz))
104 (mkdir-p datadir)
105 (zero? (system* "tar" "-C" datadir
106 "--strip-components=1"
107 "-xvf" src))))
108 #:modules ((guix build utils))))
109 (native-inputs
110 `(("tar" ,tar)
111 ("xz" ,xz)))
112 (synopsis "GNU Collaborative International Dictionary of English")
113 (description
114 "GCIDE is a free dictionary based on a combination of sources. It can
115be used via the GNU Dico program or accessed online at
116http://gcide.gnu.org.ua/")
117 (home-page "http://gcide.gnu.org.ua/")
118 (license gpl3+)))
af456909
LC
119
120(define-public diction
121 ;; Not quite a dictionary, not quite a spell checker either…
122 (package
123 (name "diction")
124 (version "1.11")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append "mirror://gnu/diction/diction-"
128 version ".tar.gz"))
129 (sha256
130 (base32
131 "1xi4l1x1vvzmzmbhpx0ghmfnwwrhabjwizrpyylmy3fzinzz3him"))))
132 (build-system gnu-build-system)
133 (synopsis "Identifies wordy and commonly misused phrases")
134 (description
135 "A package providing two classic Unix commands, style and diction.
136Diction is used to identify wordy and commonly misused phrases in a
137body of text. Style instead analyzes surface aspects of a written
138work, such as sentence length and other readability measures.")
139 (home-page "https://www.gnu.org/software/diction/")
140 (license gpl3+)))