From 82e6dcefb978a70a9fd12ed8cd882d71cacd4468 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 22 Jun 2023 17:52:12 +0300 Subject: [PATCH] python311Packages.tkinter: fix runtime error on darwin --- pkgs/development/interpreters/python/cpython/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 07f8a7d3c1b7..d469032e13b2 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -377,6 +377,9 @@ in with passthru; stdenv.mkDerivation { '' + optionalString stdenv.isDarwin '' # Override the auto-detection in setup.py, which assumes a universal build export PYTHON_DECIMAL_WITH_MACHINE=${if stdenv.isAarch64 then "uint128" else "x64"} + '' + optionalString (stdenv.isDarwin && x11Support && pythonAtLeast "3.11") '' + export TCLTK_LIBS="-L${tcl}/lib -L${tk}/lib -l${tcl.libPrefix} -l${tk.libPrefix}" + export TCLTK_CFLAGS="-I${tcl}/include -I${tk}/include" '' + optionalString (isPy3k && pythonOlder "3.7") '' # Determinism: The interpreter is patched to write null timestamps when compiling Python files # so Python doesn't try to update the bytecode when seeing frozen timestamps in Nix's store.