guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] gnu: Add man-db


From: Mark H Weaver
Subject: Re: [PATCH 2/3] gnu: Add man-db
Date: Mon, 07 Apr 2014 21:51:58 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

David Thompson <address@hidden> writes:

>> Why is 'lynx' an input?  I remember you mentioning on IRC that if PAGER
>> is not set, it launched a web browser by default.  I wonder: if you
>> included 'less' and not 'lynx', would it use 'less' by default
>> instead?
>
> My system seems to be doing weird things and insisting on w3m for some
> reason.

That might be because the '.bash_profile' file I showed you set PAGER to
w3m.  I found that if I unset PAGER, this man-db uses 'less' by default,
which I think is sensible.

> +    (propagated-inputs
> +     `(("groff" ,groff)
> +       ("less" ,less)))

Instead of making these propagated inputs, how about arranging for
man-db to invoke the programs directly from the store?  There are a
number of ./configure options that should probably be specified with
absolute pathnames:

  --with-pager
  --with-nroff
  --with-eqn
  --with-neqn
  --with-tbl
  --with-refer
  --with-pic
  --with-gzip
  --with-bzip2
  --with-xz

You could pass add these to the #:configure-flags.  The goal should be
for 'man' to work properly without having to look up any of its
dependent programs from $PATH and with PAGER unset.

>From the #:configure-flags code, %build-inputs can be looked up for the
input paths.  So you could do something like (untested):

--8<---------------cut here---------------start------------->8---
  `(#:configure-flags
    (let ((groff (assoc-ref %build-inputs "groff"))
          (less  (assoc-ref %build-inputs "less"))
          (gzip  (assoc-ref %build-inputs "gzip"))
          ...)
      (append (list (string-append "--with-pager=" less "/bin/less")
                    (string-append "--with-gzip=" gzip "/bin/gzip")
                    ...)
              (map (lambda (prog)
                     (string-append "--with-" prog "=" groff "/bin/" prog))
                   '("nroff" "eqn" "neqn" "tbl" "refer" "pic")))))
--8<---------------cut here---------------end--------------->8---

     Thanks!
       Mark




reply via email to

[Prev in Thread] Current Thread [Next in Thread]