nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 ocaml,
5 makeWrapper,
6 fetchsvn,
7 ghostscript,
8 imagemagick,
9 perl,
10 poppler-utils,
11 tesseract,
12 unpaper,
13}:
14
15stdenv.mkDerivation {
16 version = "0.1.7";
17 pname = "pdfsandwich";
18
19 src = fetchsvn {
20 url = "svn://svn.code.sf.net/p/pdfsandwich/code/trunk/src";
21 rev = "75";
22 sha256 = "1420c33divch087xrr61lvyf975bapqkgjqaighl581i69nlzsm6";
23 };
24
25 strictDeps = true;
26
27 nativeBuildInputs = [
28 makeWrapper
29 ocaml
30 perl
31 ];
32 installPhase = ''
33 mkdir -p $out/bin
34 cp -p pdfsandwich $out/bin
35 wrapProgram $out/bin/pdfsandwich --prefix PATH : ${
36 lib.makeBinPath [
37 imagemagick
38 ghostscript
39 poppler-utils
40 unpaper
41 tesseract
42 ]
43 }
44
45 mkdir -p $out/man/man1
46 cp -p pdfsandwich.1.gz $out/man/man1
47 '';
48
49 meta = with lib; {
50 description = "OCR tool for scanned PDFs";
51 homepage = "http://www.tobias-elze.de/pdfsandwich/";
52 license = licenses.gpl2Plus;
53 maintainers = [ maintainers.rps ];
54 platforms = platforms.linux;
55 mainProgram = "pdfsandwich";
56 };
57}