diff options
author | David Thompson <dthompson@member.fsf.org> | 2014-04-06 20:25:01 -0400 |
---|---|---|
committer | David Thompson <dthompson@member.fsf.org> | 2014-04-09 00:40:09 +0000 |
commit | 67ca0a01bb3ffb425f9f6e278ac013987fe304c4 (patch) | |
tree | 830670269df1a38ff1c94938706ffd999bd0e0da /gnu | |
parent | cd2e0b64f2e5a83c4f041de03aca432249c56f75 (diff) |
gnu: Add man-db.
* gnu/packages.man.scm (man-db): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/man.scm | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm index e68b1f29a0..db13fc14a7 100644 --- a/gnu/packages/man.scm +++ b/gnu/packages/man.scm @@ -20,7 +20,13 @@ #:use-module (guix licenses) #:use-module (guix download) #:use-module (guix packages) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (gnu packages flex) + #:use-module (gnu packages gdbm) + #:use-module (gnu packages groff) + #:use-module (gnu packages less) + #:use-module (gnu packages lynx) + #:use-module (gnu packages pkg-config)) (define-public libpipeline (package @@ -41,3 +47,63 @@ "libpipeline is a C library for manipulating pipelines of subprocesses in a flexible and convenient way.") (license gpl3+))) + +(define-public man-db + (package + (name "man-db") + (version "2.6.6") + (source (origin + (method url-fetch) + (uri (string-append "mirror://savannah/man-db/man-db-" + version ".tar.xz")) + (sha256 + (base32 + "1hv6byj6sg6cp3jyf08gbmdm4pwhvd5hzmb94xl0w7prin6hzabx")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (alist-cons-after + 'patch-source-shebangs 'patch-test-shebangs + (lambda* (#:key outputs #:allow-other-keys) + ;; Patch shebangs in test scripts. + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) + (substitute* file + (("#! /bin/sh") + (string-append "#!" (which "sh"))))) + (remove file-is-directory? + (find-files "src/tests" ".*"))))) + %standard-phases) + #:configure-flags + (let ((groff (assoc-ref %build-inputs "groff")) + (less (assoc-ref %build-inputs "less")) + (gzip (assoc-ref %build-inputs "gzip")) + (bzip2 (assoc-ref %build-inputs "bzip2")) + (xz (assoc-ref %build-inputs "xz"))) + ;; Invoke groff, less, gzip, bzip2, and xz directly from the store. + (append (list "--disable-setuid" ;; Disable setuid man user. + (string-append "--with-pager=" less "/bin/less") + (string-append "--with-gzip=" gzip "/bin/gzip") + (string-append "--with-bzip2=" bzip2 "/bin/gzip") + (string-append "--with-xz=" xz "/bin/xz")) + (map (lambda (prog) + (string-append "--with-" prog "=" groff "/bin/" prog)) + '("nroff" "eqn" "neqn" "tbl" "refer" "pic")))) + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("flex" ,flex) + ("gdbm" ,gdbm) + ("groff" ,groff) + ("less" ,less) + ("libpipeline" ,libpipeline))) + (home-page "http://man-db.nongnu.org/") + (synopsis "Standard Unix documentation system") + (description + "Man-db is an implementation of the standard Unix documentation system +accessed using the man command. It uses a Berkeley DB database in place of +the traditional flat-text whatis databases.") + (license gpl2+))) |