1 { lib, stdenv, fetchurl, gettext }:
3 stdenv.mkDerivation rec {
8 url = "mirror://gnu/enscript/enscript-${version}.tar.gz";
9 sha256 = "1fy0ymvzrrvs889zanxcaxjfcxarm2d3k43c9frmbl1ld7dblmkd";
13 # fix compile failure on macos. use system getopt like linux
14 # requires that compat/getopt.h is also removed
15 # https://savannah.gnu.org/bugs/?64307
16 ./0001-use-system-getopt.patch
20 # the delete component of 0001-use-system-getopt.patch
22 # Fix building on Darwin with GCC.
23 substituteInPlace compat/regex.c --replace \
24 __private_extern__ '__attribute__ ((visibility ("hidden")))'
27 buildInputs = [ gettext ];
32 description = "Converter from ASCII to PostScript, HTML, or RTF";
35 GNU Enscript converts ASCII files to PostScript, HTML, or RTF and
36 stores generated output to a file or sends it directly to the
37 printer. It includes features for `pretty-printing'
38 (language-sensitive code highlighting) in several programming
41 Enscript can be easily extended to handle different output media and
42 it has many options that can be used to customize printouts.
45 license = lib.licenses.gpl3Plus;
47 homepage = "https://www.gnu.org/software/enscript/";
50 platforms = lib.platforms.all;
51 mainProgram = "enscript";