gnu: nginx: Update to 1.12.1 [fixes CVE-2017-7529].
[jackhill/guix/guix.git] / gnu / packages / man.scm
CommitLineData
cd2e0b64 1;;; GNU Guix --- Functional package management for GNU
99af4996 2;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
cd2e0b64 3;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
e79b3c37 4;;; Copyright © 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
d2eb275a 5;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
a916c826 6;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
cd2e0b64
DT
7;;;
8;;; This file is part of GNU Guix.
9;;;
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.
14;;;
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.
19;;;
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/>.
22
23(define-module (gnu packages man)
24 #:use-module (guix licenses)
25 #:use-module (guix download)
26 #:use-module (guix packages)
67ca0a01 27 #:use-module (guix build-system gnu)
b416aadf 28 #:use-module (gnu packages databases)
67ca0a01 29 #:use-module (gnu packages flex)
dd6b54b8 30 #:use-module (gnu packages gawk)
67ca0a01
DT
31 #:use-module (gnu packages groff)
32 #:use-module (gnu packages less)
cb3da233 33 #:use-module (gnu packages perl)
d2eb275a
AK
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages linux))
cd2e0b64
DT
36
37(define-public libpipeline
38 (package
39 (name "libpipeline")
b4806353 40 (version "1.4.2")
cd2e0b64
DT
41 (source (origin
42 (method url-fetch)
43 (uri (string-append
44 "mirror://savannah/libpipeline/libpipeline-"
45 version ".tar.gz"))
46 (sha256
47 (base32
b4806353 48 "1gkrfqkphdc6gk8gic68asallj59i3cfq6nd31ppks0cljdgrwgy"))))
cd2e0b64
DT
49 (build-system gnu-build-system)
50 (home-page "http://libpipeline.nongnu.org/")
51 (synopsis "C library for manipulating pipelines of subprocesses")
52 (description
53 "libpipeline is a C library for manipulating pipelines of subprocesses in
54a flexible and convenient way.")
55 (license gpl3+)))
67ca0a01
DT
56
57(define-public man-db
58 (package
59 (name "man-db")
dfce3899 60 (version "2.7.5")
67ca0a01
DT
61 (source (origin
62 (method url-fetch)
63 (uri (string-append "mirror://savannah/man-db/man-db-"
64 version ".tar.xz"))
65 (sha256
66 (base32
dfce3899 67 "056a3il7agfazac12yggcg4gf412yq34k065im0cpfxbcw6xskaw"))))
67ca0a01
DT
68 (build-system gnu-build-system)
69 (arguments
70 '(#:phases
e79b3c37
RW
71 (modify-phases %standard-phases
72 (add-after 'patch-source-shebangs 'patch-test-shebangs
73 (lambda* (#:key outputs #:allow-other-keys)
74 ;; Patch shebangs in test scripts.
75 (let ((out (assoc-ref outputs "out")))
76 (for-each (lambda (file)
77 (substitute* file
78 (("#! /bin/sh")
79 (string-append "#!" (which "sh")))))
80 (remove file-is-directory?
ea55a395
RW
81 (find-files "src/tests" ".*"))))))
82 (add-after 'unpack 'patch-iconv-path
83 (lambda* (#:key inputs #:allow-other-keys)
84 (substitute* "src/man.c"
85 (("\"iconv\"")
86 (string-append "\"" (which "iconv") "\"")))
87 #t)))
67ca0a01
DT
88 #:configure-flags
89 (let ((groff (assoc-ref %build-inputs "groff"))
90 (less (assoc-ref %build-inputs "less"))
91 (gzip (assoc-ref %build-inputs "gzip"))
d2eb275a
AK
92 (bzip2 (assoc-ref %build-inputs "bzip2"))
93 (xz (assoc-ref %build-inputs "xz"))
94 (util (assoc-ref %build-inputs "util-linux")))
67ca0a01
DT
95 ;; Invoke groff, less, gzip, bzip2, and xz directly from the store.
96 (append (list "--disable-setuid" ;; Disable setuid man user.
97 (string-append "--with-pager=" less "/bin/less")
98 (string-append "--with-gzip=" gzip "/bin/gzip")
99 (string-append "--with-bzip2=" bzip2 "/bin/gzip")
d2eb275a 100 (string-append "--with-xz=" xz "/bin/xz")
a37f9722
AK
101 (string-append "--with-col=" util "/bin/col")
102 ;; Default value is "/usr/lib/tmpfiles.d" (not
103 ;; prefix-sensitive).
104 (string-append "--with-systemdtmpfilesdir="
105 %output "/lib/tmpfiles.d"))
67ca0a01
DT
106 (map (lambda (prog)
107 (string-append "--with-" prog "=" groff "/bin/" prog))
108 '("nroff" "eqn" "neqn" "tbl" "refer" "pic"))))
109 #:modules ((guix build gnu-build-system)
110 (guix build utils)
111 (srfi srfi-1))))
112 (native-inputs
113 `(("pkg-config" ,pkg-config)))
114 (inputs
115 `(("flex" ,flex)
116 ("gdbm" ,gdbm)
117 ("groff" ,groff)
118 ("less" ,less)
d2eb275a
AK
119 ("libpipeline" ,libpipeline)
120 ("util-linux" ,util-linux)))
2b42718b
LC
121 (native-search-paths
122 (list (search-path-specification
123 (variable "MANPATH")
af070955 124 (files '("share/man")))))
67ca0a01
DT
125 (home-page "http://man-db.nongnu.org/")
126 (synopsis "Standard Unix documentation system")
127 (description
128 "Man-db is an implementation of the standard Unix documentation system
129accessed using the man command. It uses a Berkeley DB database in place of
130the traditional flat-text whatis databases.")
131 (license gpl2+)))
cb3da233 132
c5cd288b
LC
133(define-public man-pages
134 (package
135 (name "man-pages")
f4129cdd 136 (version "4.11")
c5cd288b
LC
137 (source (origin
138 (method url-fetch)
a916c826
EF
139 (uri
140 (list
141 (string-append
dcd3ed9c 142 "mirror://kernel.org/linux/docs/man-pages/man-pages-"
a916c826
EF
143 version ".tar.xz")
144 (string-append
145 "mirror://kernel.org/linux/docs/man-pages/Archive/"
146 "man-pages-" version ".tar.xz")))
c5cd288b
LC
147 (sha256
148 (base32
f4129cdd 149 "097m0gsbaz0gf9ir4lmph3h5jj6wmydk1rglfz82dysybx4q1pmd"))))
c5cd288b
LC
150 (build-system gnu-build-system)
151 (arguments
152 '(#:phases (alist-delete 'configure %standard-phases)
3b509259
LC
153
154 ;; The 'all' target depends on three targets that directly populate
155 ;; $(MANDIR) based on its current contents. Doing that in parallel
156 ;; leads to undefined behavior (see <http://bugs.gnu.org/18701>.)
157 #:parallel-build? #f
158
c5cd288b
LC
159 #:tests? #f
160 #:make-flags (list (string-append "MANDIR="
161 (assoc-ref %outputs "out")
162 "/share/man"))))
4e128dd5 163 (home-page "https://www.kernel.org/doc/man-pages/")
c5cd288b
LC
164 (synopsis "Development manual pages from the Linux project")
165 (description
166 "This package provides traditional Unix \"man pages\" documenting the
167Linux kernel and C library interfaces employed by user-space programs.")
168
169 ;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
170 (license gpl2+)))
171
cb3da233
DT
172(define-public help2man
173 (package
174 (name "help2man")
8ac012d0 175 (version "1.47.4")
cb3da233
DT
176 (source
177 (origin
178 (method url-fetch)
179 (uri (string-append "mirror://gnu/help2man/help2man-"
180 version ".tar.xz"))
181 (sha256
182 (base32
8ac012d0 183 "0lvp4306f5nq08f3snffs5pp1zwv8l35z6f5g0dds51zs6bzdv6l"))))
cb3da233
DT
184 (build-system gnu-build-system)
185 (arguments `(;; There's no `check' target.
186 #:tests? #f))
187 (inputs
188 `(("perl" ,perl)
189 ;; TODO: Add these optional dependencies.
190 ;; ("perl-LocaleGettext" ,perl-LocaleGettext)
b94a6ca0 191 ;; ("gettext" ,gettext-minimal)
cb3da233 192 ))
6fd52309 193 (home-page "https://www.gnu.org/software/help2man/")
cb3da233
DT
194 (synopsis "Automatically generate man pages from program --help")
195 (description
196 "GNU help2man is a program that converts the output of standard
197\"--help\" and \"--version\" command-line arguments into a manual page
198automatically.")
199 (license gpl3+)))
dd6b54b8
RW
200
201(define-public txt2man
202 (package
203 (name "txt2man")
53c36279 204 (version "1.6.0")
dd6b54b8
RW
205 (source
206 (origin
207 (method url-fetch)
208 (uri (string-append
209 "https://github.com/mvertes/txt2man/archive/txt2man-"
210 version ".tar.gz"))
211 (sha256
212 (base32
53c36279 213 "168cj96974n2z0igin6j1ic1m45zyic7nm5ark7frq8j78rrx4zn"))))
dd6b54b8
RW
214 (build-system gnu-build-system)
215 (arguments
216 `(#:tests? #f ; no "check" target
217 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
218 #:phases (alist-delete 'configure %standard-phases)))
219 (inputs
220 `(("gawk" ,gawk)))
221 (home-page "https://github.com/mvertes/txt2man")
222 (synopsis "Convert text to man page")
223 (description "Txt2man converts flat ASCII text to man page format.")
224 (license gpl2+)))