From 8a4dad5b702587042978fa159394f5c18480b4e1 Mon Sep 17 00:00:00 2001 From: Andrew Marshall Date: Sun, 12 Jul 2026 17:45:24 -0400 Subject: [PATCH] python3Package.albucore: fix build pkg_resources is removed in setuptools 82 ([src][1]) [1]: https://github.com/pypa/setuptools/blob/v82.0.0/NEWS.rst --- pkgs/development/python-modules/albucore/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/albucore/default.nix b/pkgs/development/python-modules/albucore/default.nix index f1b98394fb77..8000174085d1 100644 --- a/pkgs/development/python-modules/albucore/default.nix +++ b/pkgs/development/python-modules/albucore/default.nix @@ -22,6 +22,13 @@ buildPythonPackage rec { hash = "sha256-frVMPW3au/6vPRY89GIt7chCPkUMl13DpPqCPqIjz/o="; }; + postPatch = '' + substituteInPlace setup.py \ + --replace-fail \ + 'from pkg_resources import DistributionNotFound, get_distribution' \ + 'from importlib.metadata import PackageNotFoundError as DistributionNotFound, distribution as get_distribution' + ''; + pythonRelaxDeps = [ "opencv-python" ]; build-system = [ setuptools ];