diff --git a/pkgs/development/python-modules/mypy/default.nix b/pkgs/development/python-modules/mypy/default.nix index 8d55e3009416a..f0bdc7b36f310 100644 --- a/pkgs/development/python-modules/mypy/default.nix +++ b/pkgs/development/python-modules/mypy/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch2, pythonAtLeast, pythonOlder, @@ -42,6 +43,15 @@ buildPythonPackage rec { hash = "sha256-uOOZX8bKRunTOgYVbmetu2m0B7kijxBgWdNiLCAhiQ4="; }; + patches = [ + (fetchpatch2 { + name = "python3.12.7-compat.patch"; + url = "https://github.com/python/mypy/commit/1a2c8e2a4df21532e4952191cad74ae50083f4ad.patch"; + hash = "sha256-GBQPTkdoLeErjbRUjZBFEwvCcN/WzC3OYVvou6M+f80="; + }) + ]; + + build-system = [ mypy-extensions setuptools