summary refs log tree commit diff
path: root/pkgs/tools/typesetting/pdftk/default.nix
blob: c71bc3ba77c6b1a5d66e9d68e6844b089dc6d806 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ fetchurl, stdenv, gcj }:

stdenv.mkDerivation {
  name = "pdftk-1.41";

  src = fetchurl {
    url = http://www.pdfhacks.com/pdftk/pdftk-1.41.tar.bz2;
    sha256 = "1vdrc3179slix6lz3gdiy53z7sh2yf9026r3xi6wdarwrcpawfrf";
  };

  patches = [ ./gcc-4.3.patch ./gcc-4.4.patch ];

  buildInputs = [ gcj ];

  makeFlags = [ "-f" "Makefile.Generic" ];

  preBuild = "cd pdftk";

  installPhase = ''
    mkdir -p $out/bin $out/share/man/man1
    cp pdftk $out/bin
    cp ../debian/pdftk.1 $out/share/man/man1
  '';

  meta = {
    description = "Simple tool for doing everyday things with PDF documents";
    homepage = http://www.accesspdf.com/pdftk/;
    license = stdenv.lib.licenses.gpl2;
    maintainers = with stdenv.lib.maintainers; [viric];
    platforms = with stdenv.lib.platforms; linux;
  };
}