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
This commit is contained in:
Martin Weinelt 2026-05-12 17:33:58 +02:00
commit a9349934d2

View file

@ -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 ];