1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 11:02:05 +00:00
nixpkgs/pkgs/tools/misc/man/default.nix
Eelco Dolstra 1dbe3d5b87 * man: use UTF-8 instead of latin1 by default. Fixes broken special
characters in man output.

svn path=/nixpkgs/trunk/; revision=16244
2009-07-08 11:49:09 +00:00

36 lines
921 B
Nix

{stdenv, fetchurl, groff, less}:
stdenv.mkDerivation {
name = "man-1.6f";
src = fetchurl {
url = http://primates.ximian.com/~flucifredi/man/man-1.6f.tar.gz;
sha256 = "0v2z6ywhy8kd2fa3ywkqayhjdivbaqn6qvhx93a1ldw135z8q84z";
};
buildInputs = [groff less];
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
];
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"
'';
meta = {
homepage = http://primates.ximian.com/~flucifredi/man/;
description = "Tool to read online Unix documentation";
};
}