2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, autoconf, bison, libpaper, gperf, file, perl }:
|
2016-01-01 19:11:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "a2ps-4.14";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/a2ps/${name}.tar.gz";
|
|
|
|
sha256 = "195k78m1h03m961qn7jr120z815iyb93gwi159p1p9348lyqvbpk";
|
|
|
|
};
|
|
|
|
|
2016-09-24 05:50:43 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.net/data/main/a/a2ps/1:4.14-1.3/debian/patches/09_CVE-2001-1593.diff";
|
|
|
|
sha256 = "1hrfmvb21zlklmg2fqikgywhqgc4qnvbhx517w87faafrhzhlnh0";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://sources.debian.net/data/main/a/a2ps/1:4.14-1.3/debian/patches/CVE-2014-0466.diff";
|
|
|
|
sha256 = "0grqqsc3m45niac56m19m5gx7gc0m8zvia5iman1l4rlq31shf8s";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
2020-05-06 23:18:09 +02:00
|
|
|
name = "CVE-2015-8107.patch";
|
2016-09-24 05:50:43 +02:00
|
|
|
url = "https://sources.debian.net/data/main/a/a2ps/1:4.14-1.3/debian/patches/fix-format-security.diff";
|
|
|
|
sha256 = "0pq7zl41gf2kc6ahwyjnzn93vbxb4jc2c5g8j20isp4vw6dqrnwv";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-01-01 19:11:42 +01:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace afm/make_fonts_map.sh --replace "/bin/rm" "rm"
|
|
|
|
substituteInPlace tests/defs.in --replace "/bin/rm" "rm"
|
|
|
|
'';
|
|
|
|
|
2016-10-12 13:13:24 +02:00
|
|
|
nativeBuildInputs = [ autoconf file bison perl ];
|
2016-09-24 05:50:43 +02:00
|
|
|
buildInputs = [ libpaper gperf ];
|
2016-02-09 03:14:32 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-08-28 22:32:32 +02:00
|
|
|
description = "An Anything to PostScript converter and pretty-printer";
|
2016-01-01 19:11:42 +01:00
|
|
|
longDescription = ''
|
|
|
|
GNU a2ps converts files into PostScript for printing or viewing. It uses a nice default format,
|
|
|
|
usually two pages on each physical page, borders surrounding pages, headers with useful information
|
|
|
|
(page number, printing date, file name or supplied header), line numbering, symbol substitution as
|
|
|
|
well as pretty printing for a wide range of programming languages.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.gnu.org/software/a2ps/";
|
2016-01-01 22:03:21 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2016-01-01 19:11:42 +01:00
|
|
|
maintainers = [ maintainers.bennofs ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|