Commit | Line | Data |
---|---|---|
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> |
dd6b54b8 | 4 | ;;; Copyright © 2015 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 | |
55 | a 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 | |
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")) | |
d2eb275a AK |
88 | (bzip2 (assoc-ref %build-inputs "bzip2")) |
89 | (xz (assoc-ref %build-inputs "xz")) | |
90 | (util (assoc-ref %build-inputs "util-linux"))) | |
67ca0a01 DT |
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") | |
d2eb275a | 96 | (string-append "--with-xz=" xz "/bin/xz") |
a37f9722 AK |
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")) | |
67ca0a01 DT |
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) | |
d2eb275a AK |
115 | ("libpipeline" ,libpipeline) |
116 | ("util-linux" ,util-linux))) | |
2b42718b LC |
117 | (native-search-paths |
118 | (list (search-path-specification | |
119 | (variable "MANPATH") | |
af070955 | 120 | (files '("share/man"))))) |
67ca0a01 DT |
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+))) | |
cb3da233 | 128 | |
c5cd288b LC |
129 | (define-public man-pages |
130 | (package | |
131 | (name "man-pages") | |
c635ff83 | 132 | (version "4.06") |
c5cd288b LC |
133 | (source (origin |
134 | (method url-fetch) | |
a916c826 EF |
135 | (uri |
136 | (list | |
137 | (string-append | |
dcd3ed9c | 138 | "mirror://kernel.org/linux/docs/man-pages/man-pages-" |
a916c826 EF |
139 | version ".tar.xz") |
140 | (string-append | |
141 | "mirror://kernel.org/linux/docs/man-pages/Archive/" | |
142 | "man-pages-" version ".tar.xz"))) | |
c5cd288b LC |
143 | (sha256 |
144 | (base32 | |
c635ff83 | 145 | "0vv056k9yyf05dqal9m2pq3pv9c8lnp7i5rjxvcnic6aq7vyrafb")))) |
c5cd288b LC |
146 | (build-system gnu-build-system) |
147 | (arguments | |
148 | '(#:phases (alist-delete 'configure %standard-phases) | |
3b509259 LC |
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 | ||
c5cd288b LC |
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 | ||
cb3da233 DT |
168 | (define-public help2man |
169 | (package | |
170 | (name "help2man") | |
8ac012d0 | 171 | (version "1.47.4") |
cb3da233 DT |
172 | (source |
173 | (origin | |
174 | (method url-fetch) | |
175 | (uri (string-append "mirror://gnu/help2man/help2man-" | |
176 | version ".tar.xz")) | |
177 | (sha256 | |
178 | (base32 | |
8ac012d0 | 179 | "0lvp4306f5nq08f3snffs5pp1zwv8l35z6f5g0dds51zs6bzdv6l")))) |
cb3da233 DT |
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+))) | |
dd6b54b8 RW |
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+))) |