From 59339c9893e05280239fd678dbf95aef7ed3ae29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 21 May 2026 01:36:30 +0200 Subject: [PATCH] python314Packages.rapidocr: fix compatibility with Immich --- pkgs/development/python-modules/rapidocr/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/rapidocr/default.nix b/pkgs/development/python-modules/rapidocr/default.nix index 13839417e7e2..5a937713c908 100644 --- a/pkgs/development/python-modules/rapidocr/default.nix +++ b/pkgs/development/python-modules/rapidocr/default.nix @@ -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 = ''