1{
2 fetchurl,
3 lib,
4 stdenv,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "mpage";
9 version = "2.5.8";
10
11 src = fetchurl {
12 url = "https://www.mesa.nl/pub/mpage/mpage-${version}.tgz";
13 sha256 = "sha256-I1HpHSV5SzWN9mGPF6cBOijTUOwgQI/gb4Ej3EZz/pM=";
14 };
15
16 postPatch = ''
17 sed -i "Makefile" -e "s|^ *PREFIX *=.*$|PREFIX = $out|g"
18 substituteInPlace Makefile --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
19 '';
20
21 meta = {
22 description = "Many-to-one page printing utility";
23 mainProgram = "mpage";
24
25 longDescription = ''
26 Mpage reads plain text files or PostScript documents and prints
27 them on a PostScript printer with the text reduced in size so
28 that several pages appear on one sheet of paper. This is useful
29 for viewing large printouts on a small amount of paper. It uses
30 ISO 8859.1 to print 8-bit characters.
31 '';
32
33 license = "liberal"; # a non-copyleft license, see `Copyright' file
34 homepage = "http://www.mesa.nl/pub/mpage/";
35 platforms = lib.platforms.all;
36 };
37}