1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoconf,
6 bison,
7 file,
8 perl,
9 pkg-config,
10 boehmgc,
11 gperf,
12 libpaper,
13}:
14
15stdenv.mkDerivation rec {
16 pname = "a2ps";
17 version = "4.15.6";
18
19 src = fetchurl {
20 url = "mirror://gnu/a2ps/a2ps-${version}.tar.gz";
21 hash = "sha256-h/+dgByxGWkYHVuM+LZeZeWyS7DHahuCXoCY8pBvvfQ=";
22 };
23
24 postPatch = ''
25 substituteInPlace afm/make_fonts_map.sh --replace "/bin/rm" "rm"
26 substituteInPlace tests/defs.in --replace "/bin/rm" "rm"
27 '';
28
29 nativeBuildInputs = [
30 autoconf
31 bison
32 file
33 perl
34 pkg-config
35 ];
36 buildInputs = [
37 boehmgc
38 gperf
39 libpaper
40 ];
41
42 strictDeps = true;
43
44 meta = {
45 description = "Anything to PostScript converter and pretty-printer";
46 longDescription = ''
47 GNU a2ps converts files into PostScript for printing or viewing. It uses a nice default format,
48 usually two pages on each physical page, borders surrounding pages, headers with useful information
49 (page number, printing date, file name or supplied header), line numbering, symbol substitution as
50 well as pretty printing for a wide range of programming languages.
51 '';
52 homepage = "https://www.gnu.org/software/a2ps/";
53 license = lib.licenses.gpl3Plus;
54 maintainers = with lib.maintainers; [ bennofs ];
55 platforms = lib.platforms.unix;
56 };
57}