diff --git a/pkgs/by-name/pa/paperless-ngx/package.nix b/pkgs/by-name/pa/paperless-ngx/package.nix index 1c8ebd1e2174..729714f10ad2 100644 --- a/pkgs/by-name/pa/paperless-ngx/package.nix +++ b/pkgs/by-name/pa/paperless-ngx/package.nix @@ -171,6 +171,7 @@ python.pkgs.buildPythonApplication rec { "django-cors-headers" "drf-spectacular-sidecar" "filelock" + "ocrmypdf" "redis" ]; diff --git a/pkgs/development/python-modules/ocrmypdf/default.nix b/pkgs/development/python-modules/ocrmypdf/default.nix index c984b2213cdb..ad641d3aa43c 100644 --- a/pkgs/development/python-modules/ocrmypdf/default.nix +++ b/pkgs/development/python-modules/ocrmypdf/default.nix @@ -28,20 +28,20 @@ buildPythonPackage rec { pname = "ocrmypdf"; - version = "16.11.1"; + version = "16.12.0"; pyproject = true; src = fetchFromGitHub { owner = "ocrmypdf"; repo = "OCRmyPDF"; - rev = "v${version}"; + tag = "v${version}"; # The content of .git_archival.txt is substituted upon tarball creation, # which creates indeterminism if master no longer points to the tag. # See https://github.com/ocrmypdf/OCRmyPDF/issues/841 postFetch = '' rm "$out/.git_archival.txt" ''; - hash = "sha256-EPGAM7hRmhKTk4NZz529yC0j5uJjB2Q/00tU1sjx1Zw="; + hash = "sha256-1KaSUitQG/c49s7X17+4x29lRM9mvA8F1EX/2I7dE0E="; }; patches = [ @@ -83,33 +83,23 @@ buildPythonPackage rec { pythonImportsCheck = [ "ocrmypdf" ]; - disabledTests = [ - # Broken by Python 3.13.4 change - # https://github.com/python/cpython/commit/8e923f36596370aedfdfb12251447bface41317a - # https://github.com/ocrmypdf/OCRmyPDF/blob/9f6e5a48ada5df7006a8c68b84e2aeae61943d8b/src/ocrmypdf/_exec/ghostscript.py#L66 - "TestDuplicateFilter" - - "test_masks" - "test_content_preservation" - ]; - postInstall = '' installShellCompletion --cmd ocrmypdf \ --bash misc/completion/ocrmypdf.bash \ --fish misc/completion/ocrmypdf.fish ''; - meta = with lib; { + meta = { homepage = "https://github.com/ocrmypdf/OCRmyPDF"; description = "Adds an OCR text layer to scanned PDF files, allowing them to be searched"; - license = with licenses; [ + license = with lib.licenses; [ mpl20 mit ]; - maintainers = with maintainers; [ + maintainers = with lib.maintainers; [ dotlambda ]; - changelog = "https://github.com/ocrmypdf/OCRmyPDF/blob/${src.rev}/docs/release_notes.md"; + changelog = "https://github.com/ocrmypdf/OCRmyPDF/blob/${src.tag}/docs/release_notes.md"; mainProgram = "ocrmypdf"; }; } diff --git a/pkgs/development/python-modules/ocrmypdf/use-pillow-heif.patch b/pkgs/development/python-modules/ocrmypdf/use-pillow-heif.patch index 74701d580404..0137ea02453d 100644 --- a/pkgs/development/python-modules/ocrmypdf/use-pillow-heif.patch +++ b/pkgs/development/python-modules/ocrmypdf/use-pillow-heif.patch @@ -1,14 +1,14 @@ diff --git a/pyproject.toml b/pyproject.toml -index 7d665b6a..55f2f210 100644 +index 2caa0e75..f6fcf60a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ dependencies = [ "img2pdf>=0.5", "packaging>=20", "pdfminer.six>=20220319", -- "pi-heif", # Heif image format - maintainers: if this is removed, it will NOT break -+ "pillow-heif", # Heif image format - maintainers: if this is removed, it will NOT break - "pikepdf>=8.10.1,!=9.8.0", +- "pi-heif", # Heif image format - maintainers: if this is removed, it will NOT break ++ "pillow-heif", # Heif image format - maintainers: if this is removed, it will NOT break + "pikepdf>=10", "Pillow>=10.0.1", "pluggy>=1", diff --git a/src/ocrmypdf/_pipeline.py b/src/ocrmypdf/_pipeline.py