From a9349934d2f581c60de5018b20bdaa33a9f65788 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 12 May 2026 17:33:58 +0200 Subject: [PATCH] python3Packages.charset-normaler: expose withMypyc flag This is necessary to break the fetch-cargo-vendor -> ast-serialize -> mypy -> charset-normalizer -> requests -> fetch-cargo-vendor infinite recursion --- .../python-modules/charset-normalizer/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/charset-normalizer/default.nix b/pkgs/development/python-modules/charset-normalizer/default.nix index 5137ceb0e83f..da6efe28e397 100644 --- a/pkgs/development/python-modules/charset-normalizer/default.nix +++ b/pkgs/development/python-modules/charset-normalizer/default.nix @@ -8,6 +8,7 @@ pytestCheckHook, requests, setuptools, + withMypyc ? !isPyPy, }: buildPythonPackage rec { @@ -30,9 +31,9 @@ buildPythonPackage rec { build-system = [ setuptools ] - ++ lib.optional (!isPyPy) mypy; + ++ lib.optional (withMypyc) mypy; - env.CHARSET_NORMALIZER_USE_MYPYC = lib.optionalString (!isPyPy) "1"; + env.CHARSET_NORMALIZER_USE_MYPYC = lib.optionalString withMypyc "1"; nativeCheckInputs = [ pytestCheckHook ];