1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages man)
21 #:use-module (guix licenses)
22 #:use-module (guix download)
23 #:use-module (guix packages)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages flex)
26 #:use-module (gnu packages gdbm)
27 #:use-module (gnu packages groff)
28 #:use-module (gnu packages less)
29 #:use-module (gnu packages lynx)
30 #:use-module (gnu packages perl)
31 #:use-module (gnu packages pkg-config))
33 (define-public libpipeline
40 "mirror://savannah/libpipeline/libpipeline-"
44 "12d6ldcj7kv2nv832b23v97g7035d0ybq0ig7h0yr7xk9czd3z7i"))))
45 (build-system gnu-build-system)
46 (home-page "http://libpipeline.nongnu.org/")
47 (synopsis "C library for manipulating pipelines of subprocesses")
49 "libpipeline is a C library for manipulating pipelines of subprocesses in
50 a flexible and convenient way.")
59 (uri (string-append "mirror://savannah/man-db/man-db-"
63 "1hv6byj6sg6cp3jyf08gbmdm4pwhvd5hzmb94xl0w7prin6hzabx"))))
64 (build-system gnu-build-system)
68 'patch-source-shebangs 'patch-test-shebangs
69 (lambda* (#:key outputs #:allow-other-keys)
70 ;; Patch shebangs in test scripts.
71 (let ((out (assoc-ref outputs "out")))
72 (for-each (lambda (file)
75 (string-append "#!" (which "sh")))))
76 (remove file-is-directory?
77 (find-files "src/tests" ".*")))))
80 (let ((groff (assoc-ref %build-inputs "groff"))
81 (less (assoc-ref %build-inputs "less"))
82 (gzip (assoc-ref %build-inputs "gzip"))
83 (bzip2 (assoc-ref %build-inputs "bzip2"))
84 (xz (assoc-ref %build-inputs "xz")))
85 ;; Invoke groff, less, gzip, bzip2, and xz directly from the store.
86 (append (list "--disable-setuid" ;; Disable setuid man user.
87 (string-append "--with-pager=" less "/bin/less")
88 (string-append "--with-gzip=" gzip "/bin/gzip")
89 (string-append "--with-bzip2=" bzip2 "/bin/gzip")
90 (string-append "--with-xz=" xz "/bin/xz"))
92 (string-append "--with-" prog "=" groff "/bin/" prog))
93 '("nroff" "eqn" "neqn" "tbl" "refer" "pic"))))
94 #:modules ((guix build gnu-build-system)
98 `(("pkg-config" ,pkg-config)))
104 ("libpipeline" ,libpipeline)))
106 (list (search-path-specification
108 (directories '("share/man")))))
109 (home-page "http://man-db.nongnu.org/")
110 (synopsis "Standard Unix documentation system")
112 "Man-db is an implementation of the standard Unix documentation system
113 accessed using the man command. It uses a Berkeley DB database in place of
114 the traditional flat-text whatis databases.")
117 (define-public man-pages
124 "mirror://kernel.org/linux/docs/man-pages/man-pages-"
128 "18zzmdzjihdnyg4vamk0jp6v6826vrsgal3kqqxvfq9bzyrh8xm2"))))
129 (build-system gnu-build-system)
131 '(#:phases (alist-delete 'configure %standard-phases)
133 ;; The 'all' target depends on three targets that directly populate
134 ;; $(MANDIR) based on its current contents. Doing that in parallel
135 ;; leads to undefined behavior (see <http://bugs.gnu.org/18701>.)
139 #:make-flags (list (string-append "MANDIR="
140 (assoc-ref %outputs "out")
142 (home-page "http://www.kernel.org/doc/man-pages/")
143 (synopsis "Development manual pages from the Linux project")
145 "This package provides traditional Unix \"man pages\" documenting the
146 Linux kernel and C library interfaces employed by user-space programs.")
148 ;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
151 (define-public help2man
158 (uri (string-append "mirror://gnu/help2man/help2man-"
162 "0hi94a6ai96yw0v8xgjzpp5c6jr33ifmbn2mkp7wz7rgmwxxqsd6"))))
163 (build-system gnu-build-system)
164 (arguments `(;; There's no `check' target.
168 ;; TODO: Add these optional dependencies.
169 ;; ("perl-LocaleGettext" ,perl-LocaleGettext)
170 ;; ("gettext" ,gnu-gettext)
172 (home-page "http://www.gnu.org/software/help2man/")
173 (synopsis "Automatically generate man pages from program --help")
175 "GNU help2man is a program that converts the output of standard
176 \"--help\" and \"--version\" command-line arguments into a manual page