2010-08-21 16:54:24 +00:00
|
|
|
{ stdenv, fetchurl, ghostscript, perl, groff }:
|
2009-01-10 23:35:15 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-02-09 19:39:04 +00:00
|
|
|
name = "groff-1.22.2";
|
2005-08-21 13:59:04 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-01-10 23:35:15 +00:00
|
|
|
url = "mirror://gnu/groff/${name}.tar.gz";
|
2013-02-09 19:39:04 +00:00
|
|
|
sha256 = "0xi07nhj5vdgax37rj25mwxzdmsz1ifx50hjgc6hqbkpqkd6821q";
|
2009-01-10 23:35:15 +00:00
|
|
|
};
|
|
|
|
|
2010-08-21 16:54:24 +00:00
|
|
|
buildInputs = [ ghostscript ];
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ perl ];
|
2009-01-10 23:35:15 +00:00
|
|
|
|
2013-06-11 09:55:52 +00:00
|
|
|
# Builds running without a chroot environment may detect the presence
|
|
|
|
# of /usr/X11 in the host system, leading to an impure build of the
|
|
|
|
# package. To avoid this issue, X11 support is explicitly disabled.
|
|
|
|
# Note: If we ever want to *enable* X11 support, then we'll probably
|
|
|
|
# have to pass "--with-appresdir", too.
|
|
|
|
configureFlags = "--without-x";
|
|
|
|
|
2009-01-10 23:35:15 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2010-08-21 16:54:24 +00:00
|
|
|
crossAttrs = {
|
|
|
|
# Trick to get the build system find the proper 'native' groff
|
|
|
|
# http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html
|
|
|
|
preBuild = ''
|
|
|
|
makeFlags="GROFF_BIN_PATH=${groff}/bin GROFFBIN=${groff}/bin/groff"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2014-04-09 13:09:06 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Remove example output with (random?) colors to
|
|
|
|
# avoid non-determinism in the output
|
|
|
|
rm $out/share/doc/${name}/examples/hdtbl/*color*ps
|
|
|
|
# Remove creation date
|
|
|
|
find $out/share/doc/${name} -type f -print0 | xargs -0 sed -i -e 's/%%CreationDate: .*//'
|
|
|
|
'';
|
|
|
|
|
2009-01-10 23:35:15 +00:00
|
|
|
meta = {
|
2013-02-09 19:39:04 +00:00
|
|
|
homepage = "http://www.gnu.org/software/groff/";
|
2009-01-10 23:35:15 +00:00
|
|
|
description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
2013-06-07 07:35:20 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
2009-01-10 23:35:15 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
groff is the GNU implementation of troff, a document formatting
|
|
|
|
system. Included in this release are implementations of troff,
|
|
|
|
pic, eqn, tbl, grn, refer, -man, -mdoc, -mom, and -ms macros,
|
|
|
|
and drivers for PostScript, TeX dvi format, HP LaserJet 4
|
|
|
|
printers, Canon CAPSL printers, HTML and XHTML format (beta
|
|
|
|
status), and typewriter-like devices. Also included is a
|
|
|
|
modified version of the Berkeley -me macros, the enhanced
|
|
|
|
version gxditview of the X11 xditview previewer, and an
|
|
|
|
implementation of the -mm macros.
|
|
|
|
'';
|
2005-08-21 13:59:04 +00:00
|
|
|
};
|
|
|
|
}
|