From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: [PATCH 2/3] gnu: Add man-db Date: Tue, 08 Apr 2014 18:02:06 -0400 Message-ID: <87bnwbfpk1.fsf@labrys.i-did-not-set--mail-host-address--so-tickle-me> References: <877g72ezqb.fsf@labrys.i-did-not-set--mail-host-address--so-tickle-me> <874n26ezp0.fsf@labrys.i-did-not-set--mail-host-address--so-tickle-me> <871txaeznu.fsf@labrys.i-did-not-set--mail-host-address--so-tickle-me> <87vbulsox9.fsf@yeeloong.lan> <87txa59xvw.fsf@labrys.i-did-not-set--mail-host-address--so-tickle-me> <87d2gssi4h.fsf@yeeloong.lan> <87fvlo82nj.fsf@labrys.i-did-not-set--mail-host-address--so-tickle-me> <878urgm34n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXe5y-0000Xk-6N for guix-devel@gnu.org; Tue, 08 Apr 2014 18:02:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXe5s-0002il-Jc for guix-devel@gnu.org; Tue, 08 Apr 2014 18:02:18 -0400 Received: from na6sys009bog034.obsmtp.com ([74.125.150.108]:40786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXe5s-0002ig-Dq for guix-devel@gnu.org; Tue, 08 Apr 2014 18:02:12 -0400 Received: by mail-qa0-f43.google.com with SMTP id j15so1646315qaq.30 for ; Tue, 08 Apr 2014 15:02:09 -0700 (PDT) In-Reply-To: <878urgm34n.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > David Thompson skribis: > >> + (source (origin >> + (method url-fetch) >> + (uri (string-append >> + "http://download.savannah.gnu.org/releases/man-db/m= an-db-" >> + version ".tar.xz")) > > Please use mirror://savannah. > > Other than that, fine with me; Mark? > > Ludo=E2=80=99. For some reason I'm having trouble pushing to the git repo. Here's the final version of this patch, if someone else wants to try. - Dave --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0002-gnu-Add-man-db.patch >From eb3c76452337462f9ca8805decf74e9f3f75d1f1 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 6 Apr 2014 20:25:01 -0400 Subject: [PATCH 2/3] gnu: Add man-db. * gnu/packages.man.scm (man-db): New variable. --- gnu/packages/man.scm | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/gnu/packages/man.scm b/gnu/packages/man.scm index e68b1f2..db13fc1 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+))) -- 1.8.4 --=-=-=--