mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
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 = {
|
|
description = "OCR tool for scanned PDFs";
|
|
homepage = "http://www.tobias-elze.de/pdfsandwich/";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ lib.maintainers.rps ];
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "pdfsandwich";
|
|
};
|
|
}
|