From f36d0db5e3b6a5c5a817b4ce6f9e50af99e2e49e Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 5 Oct 2025 16:04:57 +0200 Subject: [PATCH 1/3] python3Packages.pyocr: disable cuneiform support Signed-off-by: Marcin Serwin --- doc/release-notes/rl-2511.section.md | 2 ++ pkgs/development/python-modules/pyocr/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index 081daf8cbdb7..21019846c89b 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -172,6 +172,8 @@ - `neovimUtils.makeNeovimConfig` now uses `customLuaRC` parameter instead of accepting `luaRcContent`. The old usage is deprecated but still works with a warning. +- `python3Packages.pyocr` no longer supports `cuneiform` on Linux by default. It is still possible to enable it using `withCuneiformSupport` override. + - `telegram-desktop` packages now uses `Telegram` for its binary. The previous name was `telegram-desktop`. This is due to [an upstream decision](https://github.com/telegramdesktop/tdesktop/commit/56ff5808a3d766f892bc3c3305afb106b629ef6f) to make the name consistent with other platforms. - `hsd` has been upgraded to version 8. See [their changelog](https://github.com/handshake-org/hsd/blob/v8.0.0/docs/release-notes/release-notes-8.x.md) for important instructions before upgrading. diff --git a/pkgs/development/python-modules/pyocr/default.nix b/pkgs/development/python-modules/pyocr/default.nix index 8305e308918e..4065747bbd18 100644 --- a/pkgs/development/python-modules/pyocr/default.nix +++ b/pkgs/development/python-modules/pyocr/default.nix @@ -12,7 +12,7 @@ setuptools, setuptools-scm, withTesseractSupport ? true, - withCuneiformSupport ? stdenv.hostPlatform.isLinux, + withCuneiformSupport ? false, }: buildPythonPackage rec { @@ -39,7 +39,7 @@ buildPythonPackage rec { tesseractLibraryLocation = "${tesseract}/lib/libtesseract${stdenv.hostPlatform.extensions.sharedLibrary}"; } )) - ++ (lib.optional stdenv.hostPlatform.isLinux ( + ++ (lib.optional withCuneiformSupport ( replaceVars ./paths-cuneiform.patch { inherit cuneiform; } From d5ace73b50a87b14d7de4e48727a43e96241a0a3 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 5 Oct 2025 16:11:32 +0200 Subject: [PATCH 2/3] cuneiform: fix building with CMake 4 Signed-off-by: Marcin Serwin --- pkgs/by-name/cu/cuneiform/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/cu/cuneiform/package.nix b/pkgs/by-name/cu/cuneiform/package.nix index 2a677a51923b..17c9648982ba 100644 --- a/pkgs/by-name/cu/cuneiform/package.nix +++ b/pkgs/by-name/cu/cuneiform/package.nix @@ -36,6 +36,9 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' rm cuneiform_src/Kern/hhh/tigerh/h/strings.h + substituteInPlace CMakeLists.txt --replace-fail \ + 'cmake_minimum_required(VERSION 2.6.2)' \ + 'cmake_minimum_required(VERSION 3.10)' ''; # make the install path match the rpath From e58353399bcbc966379f4e59f87f191ed65d7d7c Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 5 Oct 2025 16:15:11 +0200 Subject: [PATCH 3/3] cuneiform: soft-deprecate Signed-off-by: Marcin Serwin --- pkgs/by-name/cu/cuneiform/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/cu/cuneiform/package.nix b/pkgs/by-name/cu/cuneiform/package.nix index 17c9648982ba..01ede4ac0d3b 100644 --- a/pkgs/by-name/cu/cuneiform/package.nix +++ b/pkgs/by-name/cu/cuneiform/package.nix @@ -7,6 +7,7 @@ testers, }: +# Deprecated: unmaintained, no consumers in nixpkgs as of 2025-10-05, and doesn't compile with gcc 15. stdenv.mkDerivation (finalAttrs: { pname = "cuneiform"; version = "1.1.0";