about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/typesetting/pdfsandwich
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/typesetting/pdfsandwich')
-rw-r--r--nixpkgs/pkgs/tools/typesetting/pdfsandwich/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/typesetting/pdfsandwich/default.nix b/nixpkgs/pkgs/tools/typesetting/pdfsandwich/default.nix
new file mode 100644
index 000000000000..26037b05664d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/typesetting/pdfsandwich/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, ocaml, makeWrapper, fetchsvn, ghostscript, imagemagick, perl, poppler_utils, tesseract, unpaper }:
+
+stdenv.mkDerivation {
+  version = "0.1.7";
+  pname = "pdfsandwich";
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/pdfsandwich/code/trunk/src";
+    rev = "75";
+    sha256 = "1420c33divch087xrr61lvyf975bapqkgjqaighl581i69nlzsm6";
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ makeWrapper ocaml perl ];
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -p pdfsandwich $out/bin
+    wrapProgram $out/bin/pdfsandwich --prefix PATH : ${lib.makeBinPath [ imagemagick ghostscript poppler_utils unpaper tesseract ]}
+
+    mkdir -p $out/man/man1
+    cp -p pdfsandwich.1.gz $out/man/man1
+  '';
+
+meta = with lib; {
+    description = "OCR tool for scanned PDFs";
+    homepage = "http://www.tobias-elze.de/pdfsandwich/";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.rps ];
+    platforms = platforms.linux;
+  };
+}