You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

172 lines
6.6 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2014 Ludovic Courtès <>
;;; Copyright © 2014 David Thompson <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages man)
#:use-module (guix licenses)
#:use-module (guix download)
#:use-module (guix packages)
#: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 perl)
#:use-module (gnu packages pkg-config))
(define-public libpipeline
(name "libpipeline")
(version "1.3.0")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.gz"))
(build-system gnu-build-system)
(home-page "")
(synopsis "C library for manipulating pipelines of subprocesses")
"libpipeline is a C library for manipulating pipelines of subprocesses in
a flexible and convenient way.")
(license gpl3+)))
(define-public man-db
(name "man-db")
(version "2.6.6")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/man-db/man-db-"
version ".tar.xz"))
(build-system gnu-build-system)
'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" ".*")))))
(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))))
`(("pkg-config" ,pkg-config)))
`(("flex" ,flex)
("gdbm" ,gdbm)
("groff" ,groff)
("less" ,less)
("libpipeline" ,libpipeline)))
(list (search-path-specification
(variable "MANPATH")
(directories '("share/man")))))
(home-page "")
(synopsis "Standard Unix documentation system")
"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+)))
(define-public man-pages
(name "man-pages")
(version "3.69")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.xz"))
(build-system gnu-build-system)
'(#:phases (alist-delete 'configure %standard-phases)
#:tests? #f
#:make-flags (list (string-append "MANDIR="
(assoc-ref %outputs "out")
(home-page "")
(synopsis "Development manual pages from the Linux project")
"This package provides traditional Unix \"man pages\" documenting the
Linux kernel and C library interfaces employed by user-space programs.")
;; Each man page has its own license; some are GPLv2+, some are MIT/X11.
(license gpl2+)))
(define-public help2man
(name "help2man")
(version "1.46.3")
(method url-fetch)
(uri (string-append "mirror://gnu/help2man/help2man-"
version ".tar.xz"))
(build-system gnu-build-system)
(arguments `(;; There's no `check' target.
#:tests? #f))
`(("perl" ,perl)
;; TODO: Add these optional dependencies.
;; ("perl-LocaleGettext" ,perl-LocaleGettext)
;; ("gettext" ,gnu-gettext)
(home-page "")
(synopsis "Automatically generate man pages from program --help")
"GNU help2man is a program that converts the output of standard
\"--help\" and \"--version\" command-line arguments into a manual page
(license gpl3+)))