Commit | Line | Data |
---|---|---|
cd2e0b64 | 1 | ;;; GNU Guix --- Functional package management for GNU |
c5cd288b | 2 | ;;; Copyright © 2012, 2014 Ludovic Courtès <ludo@gnu.org> |
cd2e0b64 DT |
3 | ;;; Copyright © 2014 David Thompson <dthompson2@worcester.edu> |
4 | ;;; | |
5 | ;;; This file is part of GNU Guix. | |
6 | ;;; | |
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. | |
11 | ;;; | |
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. | |
16 | ;;; | |
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/>. | |
19 | ||
20 | (define-module (gnu packages man) | |
21 | #:use-module (guix licenses) | |
22 | #:use-module (guix download) | |
23 | #:use-module (guix packages) | |
67ca0a01 DT |
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) | |
cb3da233 | 30 | #:use-module (gnu packages perl) |
67ca0a01 | 31 | #:use-module (gnu packages pkg-config)) |
cd2e0b64 DT |
32 | |
33 | (define-public libpipeline | |
34 | (package | |
35 | (name "libpipeline") | |
36 | (version "1.3.0") | |
37 | (source (origin | |
38 | (method url-fetch) | |
39 | (uri (string-append | |
40 | "mirror://savannah/libpipeline/libpipeline-" | |
41 | version ".tar.gz")) | |
42 | (sha256 | |
43 | (base32 | |
44 | "12d6ldcj7kv2nv832b23v97g7035d0ybq0ig7h0yr7xk9czd3z7i")))) | |
45 | (build-system gnu-build-system) | |
46 | (home-page "http://libpipeline.nongnu.org/") | |
47 | (synopsis "C library for manipulating pipelines of subprocesses") | |
48 | (description | |
49 | "libpipeline is a C library for manipulating pipelines of subprocesses in | |
50 | a flexible and convenient way.") | |
51 | (license gpl3+))) | |
67ca0a01 DT |
52 | |
53 | (define-public man-db | |
54 | (package | |
55 | (name "man-db") | |
56 | (version "2.6.6") | |
57 | (source (origin | |
58 | (method url-fetch) | |
59 | (uri (string-append "mirror://savannah/man-db/man-db-" | |
60 | version ".tar.xz")) | |
61 | (sha256 | |
62 | (base32 | |
63 | "1hv6byj6sg6cp3jyf08gbmdm4pwhvd5hzmb94xl0w7prin6hzabx")))) | |
64 | (build-system gnu-build-system) | |
65 | (arguments | |
66 | '(#:phases | |
67 | (alist-cons-after | |
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) | |
73 | (substitute* file | |
74 | (("#! /bin/sh") | |
75 | (string-append "#!" (which "sh"))))) | |
76 | (remove file-is-directory? | |
77 | (find-files "src/tests" ".*"))))) | |
78 | %standard-phases) | |
79 | #:configure-flags | |
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")) | |
91 | (map (lambda (prog) | |
92 | (string-append "--with-" prog "=" groff "/bin/" prog)) | |
93 | '("nroff" "eqn" "neqn" "tbl" "refer" "pic")))) | |
94 | #:modules ((guix build gnu-build-system) | |
95 | (guix build utils) | |
96 | (srfi srfi-1)))) | |
97 | (native-inputs | |
98 | `(("pkg-config" ,pkg-config))) | |
99 | (inputs | |
100 | `(("flex" ,flex) | |
101 | ("gdbm" ,gdbm) | |
102 | ("groff" ,groff) | |
103 | ("less" ,less) | |
104 | ("libpipeline" ,libpipeline))) | |
105 | (home-page "http://man-db.nongnu.org/") | |
106 | (synopsis "Standard Unix documentation system") | |
107 | (description | |
108 | "Man-db is an implementation of the standard Unix documentation system | |
109 | accessed using the man command. It uses a Berkeley DB database in place of | |
110 | the traditional flat-text whatis databases.") | |
111 | (license gpl2+))) | |
cb3da233 | 112 | |
c5cd288b LC |
113 | (define-public man-pages |
114 | (package | |
115 | (name "man-pages") | |
116 | (version "3.64") | |
117 | (source (origin | |
118 | (method url-fetch) | |
119 | (uri (string-append | |
dcd3ed9c | 120 | "mirror://kernel.org/linux/docs/man-pages/man-pages-" |
c5cd288b LC |
121 | version ".tar.xz")) |
122 | (sha256 | |
123 | (base32 | |
124 | "1p9zk130c852gqci6dyw57yaqx4v871n8n82kkccdpj7y63xr4bl")))) | |
125 | (build-system gnu-build-system) | |
126 | (arguments | |
127 | '(#:phases (alist-delete 'configure %standard-phases) | |
128 | #:tests? #f | |
129 | #:make-flags (list (string-append "MANDIR=" | |
130 | (assoc-ref %outputs "out") | |
131 | "/share/man")))) | |
132 | (home-page "http://www.kernel.org/doc/man-pages/") | |
133 | (synopsis "Development manual pages from the Linux project") | |
134 | (description | |
135 | "This package provides traditional Unix \"man pages\" documenting the | |
136 | Linux kernel and C library interfaces employed by user-space programs.") | |
137 | ||
138 | ;; Each man page has its own license; some are GPLv2+, some are MIT/X11. | |
139 | (license gpl2+))) | |
140 | ||
cb3da233 DT |
141 | (define-public help2man |
142 | (package | |
143 | (name "help2man") | |
144 | (version "1.45.1") | |
145 | (source | |
146 | (origin | |
147 | (method url-fetch) | |
148 | (uri (string-append "mirror://gnu/help2man/help2man-" | |
149 | version ".tar.xz")) | |
150 | (sha256 | |
151 | (base32 | |
152 | "1hk7ciqinq7djdb7s94y3jxh06rp8i93bpjmg4r40cniws8wf3y7")))) | |
153 | (build-system gnu-build-system) | |
154 | (arguments `(;; There's no `check' target. | |
155 | #:tests? #f)) | |
156 | (inputs | |
157 | `(("perl" ,perl) | |
158 | ;; TODO: Add these optional dependencies. | |
159 | ;; ("perl-LocaleGettext" ,perl-LocaleGettext) | |
160 | ;; ("gettext" ,gnu-gettext) | |
161 | )) | |
162 | (home-page "http://www.gnu.org/software/help2man/") | |
163 | (synopsis "Automatically generate man pages from program --help") | |
164 | (description | |
165 | "GNU help2man is a program that converts the output of standard | |
166 | \"--help\" and \"--version\" command-line arguments into a manual page | |
167 | automatically.") | |
168 | (license gpl3+))) |