From 8076db33e9c636c1d0b92fdaafe1a78ba3240149 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Thu, 9 Jul 2020 14:39:31 +0200 Subject: [PATCH] ocrmypdf: 9.8.2 -> 10.2.0 --- pkgs/tools/text/ocrmypdf/default.nix | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/text/ocrmypdf/default.nix b/pkgs/tools/text/ocrmypdf/default.nix index 874dc59c7fd7..84e0bfb78d17 100644 --- a/pkgs/tools/text/ocrmypdf/default.nix +++ b/pkgs/tools/text/ocrmypdf/default.nix @@ -29,14 +29,14 @@ let in buildPythonApplication rec { pname = "ocrmypdf"; - version = "9.8.2"; + version = "10.2.0"; disabled = ! python3Packages.isPy3k; src = fetchFromGitHub { owner = "jbarlow83"; repo = "OCRmyPDF"; rev = "v${version}"; - sha256 = "0zff9gsbfaf72p8zbjamn6513czpr7papyh1jy0fz1z2a9h7ya0g"; + sha256 = "1dkxhy3bjl48948jj2k6d684sd76xw1q427qc4hmxncr0wxj0ljp"; }; nativeBuildInputs = with python3Packages; [ @@ -49,8 +49,10 @@ buildPythonApplication rec { propagatedBuildInputs = with python3Packages; [ cffi chardet + coloredlogs img2pdf pdfminer + pluggy pikepdf pillow reportlab @@ -66,7 +68,7 @@ buildPythonApplication rec { pytestcov pytestrunner python-xmp-toolkit - setuptools + pytestCheckHook ] ++ runtimeDeps; patches = [ @@ -76,25 +78,6 @@ 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; {