Skip to content

Commit

Permalink
python312Packages.ocrmypdf: 16.5.0 -> 16.6.2 (#352270)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda authored Nov 25, 2024
2 parents d328c0c + 8b81bdd commit d225878
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions pkgs/by-name/pa/paperless-ngx/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch2
, buildNpmPackage
, nixosTests
, gettext
Expand Down Expand Up @@ -141,6 +142,14 @@ python.pkgs.buildPythonApplication rec {

inherit version src;

patches = [
(fetchpatch2 {
name = "ocrmypdf-16.6-compat.patch";
url = "https://github.com/paperless-ngx/paperless-ngx/commit/d1f255a22ea53712cb9101277ec57ea1976f9c02.patch?full_index=1";
hash = "sha256-V2nnNeNCcfSrjOttQ5rgDj7gnxpfpBPVeDDnMea0C3U=";
})
];

postPatch = ''
# pytest-xdist makes the tests flaky
substituteInPlace src/setup.cfg \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/ocrmypdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

buildPythonPackage rec {
pname = "ocrmypdf";
version = "16.5.0";
version = "16.6.2";

disabled = pythonOlder "3.10";

Expand All @@ -45,7 +45,7 @@ buildPythonPackage rec {
postFetch = ''
rm "$out/.git_archival.txt"
'';
hash = "sha256-jqe4BRW0U7gqcf+FtDWjDDvRStAqaEPTuU+B+BrFR5Y=";
hash = "sha256-065PeCsNfAvZTLyWz3toTrE/e944mzfuwRQvKXxdnd0=";
};

patches = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/python-modules/ocrmypdf/paths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ index 102bdab8..bfef4400 100644
args.extend(['-l', '+'.join(langs)])
if engine_mode is not None:
diff --git a/src/ocrmypdf/_exec/unpaper.py b/src/ocrmypdf/_exec/unpaper.py
index d1165c46..7c732b15 100644
index a5a92f4c..6cf56eb3 100644
--- a/src/ocrmypdf/_exec/unpaper.py
+++ b/src/ocrmypdf/_exec/unpaper.py
@@ -48,7 +48,7 @@ class UnpaperImageTooLargeError(Exception):


def version() -> Version:
- return Version(get_version('unpaper'))
+ return Version(get_version('@unpaper@'))
- return Version(get_version('unpaper', regex=r'(?m).*?(\d+(\.\d+)(\.\d+)?)'))
+ return Version(get_version('@unpaper@', regex=r'(?m).*?(\d+(\.\d+)(\.\d+)?)'))


@contextmanager
Expand Down

0 comments on commit d225878

Please sign in to comment.