lol
at v192 62 lines 2.2 kB view raw
1{ stdenv, fetchurl, ghostscript, perl, groff }: 2 3stdenv.mkDerivation rec { 4 name = "groff-1.22.3"; 5 6 src = fetchurl { 7 url = "mirror://gnu/groff/${name}.tar.gz"; 8 sha256 = "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s"; 9 }; 10 11 outputs = [ "out" "doc" ]; 12 13 enableParallelBuilding = false; 14 15 buildInputs = [ ghostscript ]; 16 nativeBuildInputs = [ perl ]; 17 18 # Builds running without a chroot environment may detect the presence 19 # of /usr/X11 in the host system, leading to an impure build of the 20 # package. To avoid this issue, X11 support is explicitly disabled. 21 # Note: If we ever want to *enable* X11 support, then we'll probably 22 # have to pass "--with-appresdir", too. 23 configureFlags = "--without-x"; 24 25 doCheck = true; 26 27 crossAttrs = { 28 # Trick to get the build system find the proper 'native' groff 29 # http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html 30 preBuild = '' 31 makeFlags="GROFF_BIN_PATH=${groff}/bin GROFFBIN=${groff}/bin/groff" 32 ''; 33 }; 34 35 postInstall = '' 36 # Remove example output with (random?) colors to 37 # avoid non-determinism in the output 38 rm $out/share/doc/${name}/examples/hdtbl/*color*ps 39 # Remove creation date 40 find $out/share/doc/${name} -type f -print0 | xargs -0 sed -i -e 's/%%CreationDate: .*//' 41 ''; 42 43 meta = with stdenv.lib; { 44 homepage = http://www.gnu.org/software/groff/; 45 description = "GNU Troff, a typesetting package that reads plain text and produces formatted output"; 46 license = licenses.gpl3Plus; 47 platforms = platforms.all; 48 maintainers = with maintainers; [ pSub ]; 49 50 longDescription = '' 51 groff is the GNU implementation of troff, a document formatting 52 system. Included in this release are implementations of troff, 53 pic, eqn, tbl, grn, refer, -man, -mdoc, -mom, and -ms macros, 54 and drivers for PostScript, TeX dvi format, HP LaserJet 4 55 printers, Canon CAPSL printers, HTML and XHTML format (beta 56 status), and typewriter-like devices. Also included is a 57 modified version of the Berkeley -me macros, the enhanced 58 version gxditview of the X11 xditview previewer, and an 59 implementation of the -mm macros. 60 ''; 61 }; 62}