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