From 671d93e263a663915a225372c7638312f04ce1b0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 7 Mar 2026 23:12:04 +0000 Subject: [PATCH 1/5] python3Packages.tesserocr: 2.9.2 -> 2.10.0 Changelog: https://github.com/sirfz/tesserocr/releases/tag/v2.10.0 --- .../python-modules/tesserocr/default.nix | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/pkgs/development/python-modules/tesserocr/default.nix b/pkgs/development/python-modules/tesserocr/default.nix index 0d3cd209f038..7fd889f621c5 100644 --- a/pkgs/development/python-modules/tesserocr/default.nix +++ b/pkgs/development/python-modules/tesserocr/default.nix @@ -1,78 +1,85 @@ { - buildPythonPackage, - fetchPypi, - fetchpatch, lib, + buildPythonPackage, + fetchFromGitHub, # build-system + cysignals, cython, - pkg-config, setuptools, # native dependencies + pkg-config, leptonica, - tesseract4, + tesseract5, # dependencies pillow, # tests - unittestCheckHook, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "tesserocr"; - version = "2.8.0"; - format = "setuptools"; + version = "2.10.0"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-vlGNGxtf9UwRqtoeD9EpQlCepwWB4KizmipHOgstvTY="; + src = fetchFromGitHub { + owner = "sirfz"; + repo = "tesserocr"; + tag = "v${finalAttrs.version}"; + hash = "sha256-y/3MXkocO4hRMjREPT6yvqH87EZm79zerinp5TUHNP4="; }; - patches = [ - # Backport https://github.com/sirfz/tesserocr/pull/364 to fix tests - (fetchpatch { - url = "https://github.com/sirfz/tesserocr/commit/853a885d0154a0345e1ea7db80febe04893a3da8.patch"; - hash = "sha256-s51s9EIV9AZT6UoqwTuQ8lOjToqwIIUkDLjsvCsyYFU="; - }) - ]; - - # https://github.com/sirfz/tesserocr/issues/314 postPatch = '' - sed -i '/allheaders.h/a\ pass\n\ncdef extern from "leptonica/pix_internal.h" nogil:' tesserocr/tesseract.pxd - substituteInPlace setup.py \ - --replace-fail "Cython>=0.23,<3.1.0" Cython + --replace-fail \ + "Cython>=3.0.0,<3.2.0" \ + "Cython" ''; build-system = [ + cysignals cython - pkg-config setuptools ]; + nativeBuildInputs = [ + pkg-config + ]; + buildInputs = [ leptonica - tesseract4 + tesseract5 ]; - dependencies = [ pillow ]; + dependencies = [ + cysignals # also needed at runtime + pillow + ]; pythonImportsCheck = [ "tesserocr" ]; - nativeCheckInputs = [ unittestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + ]; preCheck = '' rm -rf tesserocr ''; + disabledTests = [ + # AssertionError: '.bl' != '.tif' + "test_init_full" + ]; + meta = { - changelog = "https://github.com/sirfz/tesserocr/releases/tag/v${version}"; description = "Simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR)"; homepage = "https://github.com/sirfz/tesserocr"; + changelog = "https://github.com/sirfz/tesserocr/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ mtrsk ]; platforms = lib.platforms.unix; }; -} +}) From d2ed0d3745b62cdcc4e6531df6be643fd66832dd Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 7 Mar 2026 23:42:41 +0000 Subject: [PATCH 2/5] python3Packages.weblate-fonts: init at 2026.1 --- .../python-modules/weblate-fonts/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/weblate-fonts/default.nix diff --git a/pkgs/development/python-modules/weblate-fonts/default.nix b/pkgs/development/python-modules/weblate-fonts/default.nix new file mode 100644 index 000000000000..f2285cde663e --- /dev/null +++ b/pkgs/development/python-modules/weblate-fonts/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + uv-build, +}: + +buildPythonPackage (finalAttrs: { + pname = "weblate-fonts"; + version = "2026.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "WeblateOrg"; + repo = "fonts"; + tag = finalAttrs.version; + hash = "sha256-JFnLi7ezme3yNo8e0Xjmvf/ejSaeTzzaJD5CMK4I9QM="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail \ + "uv_build>=0.9.15,<0.10.0" \ + "uv_build" + ''; + + build-system = [ + uv-build + ]; + + pythonImportsCheck = [ "weblate_fonts" ]; + + meta = { + description = "Weblate fonts collection"; + homepage = "https://github.com/WeblateOrg/fonts"; + changelog = "https://github.com/WeblateOrg/fonts/releases/tag/${finalAttrs.src.tag}"; + license = with lib.licenses; [ + cc0 + ofl + ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7e047fd2d88f..798816cd338f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20877,6 +20877,8 @@ self: super: with self; { webio-api = callPackage ../development/python-modules/webio-api { }; + weblate-fonts = callPackage ../development/python-modules/weblate-fonts { }; + weblate-language-data = callPackage ../development/python-modules/weblate-language-data { }; weblate-schemas = callPackage ../development/python-modules/weblate-schemas { }; From df325c5e26583e8560aab8e42cecc5d70cb63a5c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 7 Mar 2026 23:51:22 +0000 Subject: [PATCH 3/5] python3Packages.translate-toolkit: 3.18.1 -> 3.19.3 Diff: https://github.com/translate/translate/compare/3.18.1...3.19.3 Changelog: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/releases/3.19.3.html --- .../translate-toolkit/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/translate-toolkit/default.nix b/pkgs/development/python-modules/translate-toolkit/default.nix index 031f52ab1385..cfb0f84129e4 100644 --- a/pkgs/development/python-modules/translate-toolkit/default.nix +++ b/pkgs/development/python-modules/translate-toolkit/default.nix @@ -7,10 +7,12 @@ setuptools-scm, # dependencies + lxml, unicode-segmentation-rs, urllib3, + + # optional-dependencies tomlkit, - lxml, # tests aeidon, @@ -28,25 +30,24 @@ vobject, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "translate-toolkit"; - version = "3.18.1"; - + version = "3.19.3"; pyproject = true; src = fetchFromGitHub { owner = "translate"; repo = "translate"; - tag = version; - hash = "sha256-T7Zo2/jx9P+Tz8jwRKRCV1lVv7XIaIoQTIjIVdEj/ZQ="; + tag = finalAttrs.version; + hash = "sha256-k+gCrY2r1ILeSvjdEHT3wE2LF9Qn76ENe9RRVcaHmq4="; }; build-system = [ setuptools-scm ]; dependencies = [ + lxml unicode-segmentation-rs urllib3 - lxml ]; optional-dependencies = { @@ -85,8 +86,8 @@ buildPythonPackage rec { meta = { description = "Useful localization tools for building localization & translation systems"; homepage = "https://toolkit.translatehouse.org/"; - changelog = "https://docs.translatehouse.org/projects/translate-toolkit/en/latest/releases/${src.tag}.html"; + changelog = "https://docs.translatehouse.org/projects/translate-toolkit/en/latest/releases/${finalAttrs.src.tag}.html"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ erictapen ]; }; -} +}) From 310d2b3e33c7cf58289bcd73cb1df5721741779b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 7 Mar 2026 23:54:10 +0000 Subject: [PATCH 4/5] python3Packages.weblate-language-data: 2026.2 -> 2026.3 Changelog: https://github.com/WeblateOrg/language-data/releases/tag/2026.3 --- .../weblate-language-data/default.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/weblate-language-data/default.nix b/pkgs/development/python-modules/weblate-language-data/default.nix index 9f755f64a6f7..840962c48db6 100644 --- a/pkgs/development/python-modules/weblate-language-data/default.nix +++ b/pkgs/development/python-modules/weblate-language-data/default.nix @@ -1,20 +1,21 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, setuptools, translate-toolkit, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "weblate-language-data"; - version = "2026.2"; + version = "2026.3"; pyproject = true; - src = fetchPypi { - pname = "weblate_language_data"; - inherit version; - hash = "sha256-0mGkNbJomRRzS9P3fuUUGl7uipAfZhesoyc7t+Ymyf4="; + src = fetchFromGitHub { + owner = "WeblateOrg"; + repo = "language-data"; + tag = finalAttrs.version; + hash = "sha256-v64YlcgHT94SCTGebR//Cnjj+NeH3TJZsXB8EztJk9s="; }; build-system = [ setuptools ]; @@ -29,9 +30,8 @@ buildPythonPackage rec { meta = { description = "Language definitions used by Weblate"; homepage = "https://github.com/WeblateOrg/language-data"; - changelog = "https://github.com/WeblateOrg/language-data/releases/tag/${version}"; + changelog = "https://github.com/WeblateOrg/language-data/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ erictapen ]; }; - -} +}) From d9276c18df4fd3f07b6f12c24aff2ed19b27e1c9 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 7 Mar 2026 23:32:26 +0000 Subject: [PATCH 5/5] weblate: 5.15.2 -> 5.16.2 Diff: https://github.com/WeblateOrg/weblate/compare/weblate-5.15.2...weblate-5.16.2 Changelog: https://github.com/WeblateOrg/weblate/releases/tag/weblate-5.16.2 --- pkgs/by-name/we/weblate/package.nix | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/we/weblate/package.nix b/pkgs/by-name/we/weblate/package.nix index 213dcf3935c1..ec57bb40499e 100644 --- a/pkgs/by-name/we/weblate/package.nix +++ b/pkgs/by-name/we/weblate/package.nix @@ -35,6 +35,7 @@ let django = prev.django_5; }; }; + python3Packages = python3.pkgs; GI_TYPELIB_PATH = lib.makeSearchPathOutput "out" "lib/girepository-1.0" [ pango @@ -45,10 +46,9 @@ let gobject-introspection ]; in -python.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication (finalAttrs: { pname = "weblate"; - version = "5.15.2"; - + version = "5.16.2"; pyproject = true; outputs = [ @@ -59,15 +59,15 @@ python.pkgs.buildPythonApplication rec { src = fetchFromGitHub { owner = "WeblateOrg"; repo = "weblate"; - tag = "weblate-${version}"; - hash = "sha256-qNv3aaPyQ/bOrPbK7u9vtq8R1MFqXLJzvLUZfVgjMK0="; + tag = "weblate-${finalAttrs.version}"; + hash = "sha256-er3KtCAFtHh3UtM58Kni/PTBfXpWW/GOarRGJeAanL8="; }; postPatch = '' sed -i 's|/bin/true|true|g' weblate/addons/example_pre.py ''; - build-system = with python.pkgs; [ setuptools ]; + build-system = with python3Packages; [ setuptools ]; nativeBuildInputs = [ gettext ]; @@ -93,11 +93,12 @@ python.pkgs.buildPythonApplication rec { pythonRelaxDeps = [ "certifi" + "crispy-bootstrap5" "urllib3" ]; dependencies = - with python.pkgs; + with python3Packages; [ aeidon ahocorasick-rs @@ -168,6 +169,7 @@ python.pkgs.buildPythonApplication rec { unidecode urllib3 user-agents + weblate-fonts weblate-language-data weblate-schemas ] @@ -180,7 +182,7 @@ python.pkgs.buildPythonApplication rec { ++ urllib3.optional-dependencies.zstd; # Commented entries are not packaged yet - optional-dependencies = with python.pkgs; { + optional-dependencies = with python3Packages; { alibaba = [ aliyun-python-sdk-alimt aliyun-python-sdk-core @@ -213,7 +215,7 @@ python.pkgs.buildPythonApplication rec { makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" ]; nativeCheckInputs = - with python.pkgs; + with python3Packages; [ pytestCheckHook postgresqlTestHook @@ -241,7 +243,7 @@ python.pkgs.buildPythonApplication rec { openssh ] ++ social-auth-core.optional-dependencies.saml - ++ (lib.concatLists (builtins.attrValues optional-dependencies)); + ++ (lib.concatLists (builtins.attrValues finalAttrs.passthru.optional-dependencies)); env = { CI_DATABASE = "postgresql"; @@ -287,7 +289,7 @@ python.pkgs.buildPythonApplication rec { meta = { description = "Web based translation tool with tight version control integration"; homepage = "https://weblate.org/"; - changelog = "https://github.com/WeblateOrg/weblate/releases/tag/${src.tag}"; + changelog = "https://github.com/WeblateOrg/weblate/releases/tag/${finalAttrs.src.tag}"; license = with lib.licenses; [ gpl3Plus mit @@ -296,4 +298,4 @@ python.pkgs.buildPythonApplication rec { maintainers = with lib.maintainers; [ erictapen ]; mainProgram = "weblate"; }; -} +})