gnu: slepc: Set origin file-name.
[jackhill/guix/guix.git] / gnu / packages / man.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
4 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
6 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
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)
27 #:use-module (guix build-system gnu)
28 #:use-module (gnu packages databases)
29 #:use-module (gnu packages flex)
30 #:use-module (gnu packages gawk)
31 #:use-module (gnu packages groff)
32 #:use-module (gnu packages less)
33 #:use-module (gnu packages lynx)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages linux))
37
38 (define-public libpipeline
39 (package
40 (name "libpipeline")
41 (version "1.4.0")
42 (source (origin
43 (method url-fetch)
44 (uri (string-append
45 "mirror://savannah/libpipeline/libpipeline-"
46 version ".tar.gz"))
47 (sha256
48 (base32
49 "1dlvp2mxlhg5zbj509kc60h7g39hpgwkzkpdf855cyzizgkmkivr"))))
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
55 a flexible and convenient way.")
56 (license gpl3+)))
57
58 (define-public man-db
59 (package
60 (name "man-db")
61 (version "2.7.1")
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
68 "03ly0hbpgjnag576rgccanaisn7f6422q5qxrj64vyzslc2651y4"))))
69 (build-system gnu-build-system)
70 (arguments
71 '(#:phases
72 (alist-cons-after
73 '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?
82 (find-files "src/tests" ".*")))))
83 %standard-phases)
84 #:configure-flags
85 (let ((groff (assoc-ref %build-inputs "groff"))
86 (less (assoc-ref %build-inputs "less"))
87 (gzip (assoc-ref %build-inputs "gzip"))
88 (bzip2 (assoc-ref %build-inputs "bzip2"))
89 (xz (assoc-ref %build-inputs "xz"))
90 (util (assoc-ref %build-inputs "util-linux")))
91 ;; Invoke groff, less, gzip, bzip2, and xz directly from the store.
92 (append (list "--disable-setuid" ;; Disable setuid man user.
93 (string-append "--with-pager=" less "/bin/less")
94 (string-append "--with-gzip=" gzip "/bin/gzip")
95 (string-append "--with-bzip2=" bzip2 "/bin/gzip")
96 (string-append "--with-xz=" xz "/bin/xz")
97 (string-append "--with-col=" util "/bin/col")
98 ;; Default value is "/usr/lib/tmpfiles.d" (not
99 ;; prefix-sensitive).
100 (string-append "--with-systemdtmpfilesdir="
101 %output "/lib/tmpfiles.d"))
102 (map (lambda (prog)
103 (string-append "--with-" prog "=" groff "/bin/" prog))
104 '("nroff" "eqn" "neqn" "tbl" "refer" "pic"))))
105 #:modules ((guix build gnu-build-system)
106 (guix build utils)
107 (srfi srfi-1))))
108 (native-inputs
109 `(("pkg-config" ,pkg-config)))
110 (inputs
111 `(("flex" ,flex)
112 ("gdbm" ,gdbm)
113 ("groff" ,groff)
114 ("less" ,less)
115 ("libpipeline" ,libpipeline)
116 ("util-linux" ,util-linux)))
117 (native-search-paths
118 (list (search-path-specification
119 (variable "MANPATH")
120 (files '("share/man")))))
121 (home-page "http://man-db.nongnu.org/")
122 (synopsis "Standard Unix documentation system")
123 (description
124 "Man-db is an implementation of the standard Unix documentation system
125 accessed using the man command. It uses a Berkeley DB database in place of
126 the traditional flat-text whatis databases.")
127 (license gpl2+)))
128
129 (define-public man-pages
130 (package
131 (name "man-pages")
132 (version "4.04")
133 (source (origin
134 (method url-fetch)
135 (uri
136 (list
137 (string-append
138 "mirror://kernel.org/linux/docs/man-pages/man-pages-"
139 version ".tar.xz")
140 (string-append
141 "mirror://kernel.org/linux/docs/man-pages/Archive/"
142 "man-pages-" version ".tar.xz")))
143 (sha256
144 (base32
145 "0v8zxq4scfixy3pjpw9ankvv5v8frv62khv4xm1jpkswyq6rbqcg"))))
146 (build-system gnu-build-system)
147 (arguments
148 '(#:phases (alist-delete 'configure %standard-phases)
149
150 ;; The 'all' target depends on three targets that directly populate
151 ;; $(MANDIR) based on its current contents. Doing that in parallel
152 ;; leads to undefined behavior (see <http://bugs.gnu.org/18701>.)
153 #:parallel-build? #f
154
155 #:tests? #f
156 #:make-flags (list (string-append "MANDIR="
157 (assoc-ref %outputs "out")
158 "/share/man"))))
159 (home-page "http://www.kernel.org/doc/man-pages/")
160 (synopsis "Development manual pages from the Linux project")
161 (description
162 "This package provides traditional Unix \"man pages\" documenting the
163 Linux kernel and C library interfaces employed by user-space programs.")
164
165 ;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
166 (license gpl2+)))
167
168 (define-public help2man
169 (package
170 (name "help2man")
171 (version "1.47.3")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (string-append "mirror://gnu/help2man/help2man-"
176 version ".tar.xz"))
177 (sha256
178 (base32
179 "0miqq77ssk5rgsc9xlv7k5n2wk2c5wv2m1kh4zhbwrggfmjaycn2"))))
180 (build-system gnu-build-system)
181 (arguments `(;; There's no `check' target.
182 #:tests? #f))
183 (inputs
184 `(("perl" ,perl)
185 ;; TODO: Add these optional dependencies.
186 ;; ("perl-LocaleGettext" ,perl-LocaleGettext)
187 ;; ("gettext" ,gnu-gettext)
188 ))
189 (home-page "http://www.gnu.org/software/help2man/")
190 (synopsis "Automatically generate man pages from program --help")
191 (description
192 "GNU help2man is a program that converts the output of standard
193 \"--help\" and \"--version\" command-line arguments into a manual page
194 automatically.")
195 (license gpl3+)))
196
197 (define-public txt2man
198 (package
199 (name "txt2man")
200 (version "1.5.6")
201 (source
202 (origin
203 (method url-fetch)
204 (uri (string-append
205 "https://github.com/mvertes/txt2man/archive/txt2man-"
206 version ".tar.gz"))
207 (sha256
208 (base32
209 "0sjq687jknq65wbnjh2siq8hc09ydpnlmrkrnwl66mrhd4n9g7fz"))))
210 (build-system gnu-build-system)
211 (arguments
212 `(#:tests? #f ; no "check" target
213 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
214 #:phases (alist-delete 'configure %standard-phases)))
215 (inputs
216 `(("gawk" ,gawk)))
217 (home-page "https://github.com/mvertes/txt2man")
218 (synopsis "Convert text to man page")
219 (description "Txt2man converts flat ASCII text to man page format.")
220 (license gpl2+)))