python314Packages.rapidocr: fix compatibility with Immich

This commit is contained in:
Sandro Jäckel
2026-05-25 00:31:04 +02:00
parent cb2ed10279
commit 59339c9893
@@ -3,6 +3,7 @@
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
fetchzip,
replaceVars,
@@ -19,7 +20,6 @@
onnxruntime,
tqdm,
pytestCheckHook,
requests,
}:
let
@@ -61,6 +61,12 @@ buildPythonPackage {
(replaceVars ./setup-py-override-version-checking.patch {
inherit version;
})
# Fix type error in Immich which is caused by passing null to Path() when model_root_dir is the default null
(fetchpatch {
url = "https://github.com/RapidAI/RapidOCR/commit/57dfac08d8de63c4c00d21a1ab14a4a3b5c01975.patch";
stripLen = 1;
hash = "sha256-G49mTvBOm20BFOll4Pc0X397ZABT1tWMXd8nlDjBr7E=";
})
];
postPatch = ''