Mark H Weaver writes: > David Thompson 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. Can't believe I didn't notice the PAGER variable there. I was staring right at it. > >> + (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 Wow, this worked perfectly. Now man uses less by default even when I have no PAGER variable set and less is uninstalled. The same thing goes for groff, gzip, etc. I've attached the updated patch. Thanks for your help. This is the most complicated package I've tried to write so far. - Dave