From 2c574b9c4c6f97074c24d4019cf1279a5613134b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Oct 2025 20:21:34 -0700 Subject: [PATCH 1/2] python311Packages.tkinter: mark broken It fails to build with fatal error: tommath.h: No such file or directory --- pkgs/development/python-modules/tkinter/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/tkinter/default.nix b/pkgs/development/python-modules/tkinter/default.nix index afc6d765a498..7933c994356a 100644 --- a/pkgs/development/python-modules/tkinter/default.nix +++ b/pkgs/development/python-modules/tkinter/default.nix @@ -86,6 +86,7 @@ buildPythonPackage { pythonImportsCheck = [ "tkinter" ]; meta = { + broken = pythonOlder "3.12"; # tommath.h: No such file or directory # Based on first sentence from https://docs.python.org/3/library/tkinter.html description = "Standard Python interface to the Tcl/Tk GUI toolkit"; longDescription = '' From 22412a6ab0448c78663d60277cc0a47a3f1987f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 10 Oct 2025 20:31:00 -0700 Subject: [PATCH 2/2] python311Packages.matplotlib: disable Tk on Python 3.11 The tkinter package fails to build on Python 3.11. --- pkgs/development/python-modules/matplotlib/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index 4c23466b9880..926dd2467971 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -4,6 +4,7 @@ fetchPypi, buildPythonPackage, isPyPy, + pythonAtLeast, pythonOlder, # build-system @@ -52,7 +53,8 @@ # Tk # Darwin has its own "MacOSX" backend, PyPy has tkagg backend and does not support tkinter - enableTk ? (!stdenv.hostPlatform.isDarwin && !isPyPy), + # tkinter fails to build on Python 3.11 + enableTk ? (!stdenv.hostPlatform.isDarwin && !isPyPy && pythonAtLeast "3.12"), tkinter, # Qt