diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/text/ocrmypdf/default.nix')
-rw-r--r-- | nixpkgs/pkgs/tools/text/ocrmypdf/default.nix | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/nixpkgs/pkgs/tools/text/ocrmypdf/default.nix b/nixpkgs/pkgs/tools/text/ocrmypdf/default.nix index 19690e270af..bfa22a4fd18 100644 --- a/nixpkgs/pkgs/tools/text/ocrmypdf/default.nix +++ b/nixpkgs/pkgs/tools/text/ocrmypdf/default.nix @@ -12,7 +12,6 @@ , unpaper , substituteAll }: - let inherit (python3Packages) buildPythonApplication; @@ -27,16 +26,17 @@ let pillow ]; -in buildPythonApplication rec { +in +buildPythonApplication rec { pname = "ocrmypdf"; - version = "9.8.0"; + version = "11.0.1"; disabled = ! python3Packages.isPy3k; src = fetchFromGitHub { owner = "jbarlow83"; repo = "OCRmyPDF"; rev = "v${version}"; - sha256 = "1l4bwnbd3g0wmdx8yv8hi5wm2z2q67y9mwrvrc4xxmkdrb5y8jcd"; + sha256 = "194ds9i1zd80ynzwgv7kprax0crh7bbchayawdcvg2lyr64a82xn"; }; nativeBuildInputs = with python3Packages; [ @@ -49,8 +49,10 @@ in buildPythonApplication rec { propagatedBuildInputs = with python3Packages; [ cffi chardet + coloredlogs img2pdf pdfminer + pluggy pikepdf pillow reportlab @@ -66,7 +68,7 @@ in buildPythonApplication rec { pytestcov pytestrunner python-xmp-toolkit - setuptools + pytestCheckHook ] ++ runtimeDeps; patches = [ @@ -76,25 +78,6 @@ in buildPythonApplication rec { }) ]; - # The tests take potentially 20+ minutes, depending on machine - doCheck = false; - - # These tests fail and it might be upstream problem... or packaging. :) - # development is happening on macos and the pinned test versions are - # significantly newer than nixpkgs has. Program still works... - # (to the extent I've used it) -- Kiwi - checkPhase = '' - export HOME=$TMPDIR - pytest -k 'not test_force_ocr_on_pdf_with_no_images \ - and not test_tesseract_crash \ - and not test_tesseract_crash_autorotate \ - and not test_ghostscript_pdfa_failure \ - and not test_gs_render_failure \ - and not test_gs_raster_failure \ - and not test_bad_utf8 \ - and not test_old_unpaper' - ''; - makeWrapperArgs = [ "--prefix PATH : ${stdenv.lib.makeBinPath [ ghostscript jbig2enc pngquant qpdf tesseract4 unpaper ]}" ]; meta = with stdenv.lib; { |