2012-03-06 11:10:56 +01:00
|
|
|
{ stdenv, fetchurl, groff, less }:
|
2008-02-07 15:39:07 +01:00
|
|
|
|
2012-03-06 11:10:56 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "man-1.6g";
|
|
|
|
|
2008-02-07 15:39:07 +01:00
|
|
|
src = fetchurl {
|
2012-03-06 11:10:56 +01:00
|
|
|
url = "http://primates.ximian.com/~flucifredi/man/${name}.tar.gz";
|
|
|
|
sha256 = "17wmp2ahkhl72cvfzshmck22dnq2lbjg0678swihj270yk1vip6c";
|
2008-02-07 15:39:07 +01:00
|
|
|
};
|
|
|
|
|
2012-03-06 11:10:56 +01:00
|
|
|
buildInputs = [ groff less ];
|
2008-02-07 15:39:07 +01:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(bindir=$out/bin sbindir=$out/sbin libdir=$out/lib mandir=$out/share/man)
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Search in "share/man" relative to each path in $PATH (in addition to "man").
|
|
|
|
./share.patch
|
2012-03-06 11:14:00 +01:00
|
|
|
|
|
|
|
# Prefer /etc/man.conf over $out/lib/man.conf. Man only reads the
|
|
|
|
# first file that exists, so this is necessary to allow the
|
|
|
|
# builtin config to be overriden.
|
|
|
|
./conf.patch
|
2008-02-07 15:39:07 +01:00
|
|
|
];
|
|
|
|
|
2009-09-25 00:18:59 +02:00
|
|
|
preConfigure = ''
|
|
|
|
sed 's/^PREPATH=.*/PREPATH=$PATH/' -i configure
|
|
|
|
'';
|
|
|
|
|
2009-07-08 13:49:09 +02:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# Use UTF-8 by default. Otherwise man won't know how to deal
|
|
|
|
# with certain characters.
|
|
|
|
substituteInPlace $out/lib/man.conf \
|
|
|
|
--replace "nroff -Tlatin1" "nroff" \
|
|
|
|
--replace "eqn -Tlatin1" "eqn -Tutf8"
|
2012-03-06 11:10:56 +01:00
|
|
|
|
|
|
|
# Work around a bug in substituteInPlace. It loses the final
|
|
|
|
# newline, and man requires every line in man.conf to be
|
|
|
|
# terminated by a newline.
|
|
|
|
echo >> $out/lib/man.conf
|
2009-07-08 13:49:09 +02:00
|
|
|
'';
|
|
|
|
|
2008-02-07 15:39:07 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://primates.ximian.com/~flucifredi/man/;
|
|
|
|
description = "Tool to read online Unix documentation";
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2008-02-07 15:39:07 +01:00
|
|
|
};
|
|
|
|
}
|