cpython: remove x11support

This is required for tkinter, which we now build standalone as tkinter
in the python package set.
This commit is contained in:
Martin Weinelt
2025-08-30 14:28:10 +02:00
parent 39df3445b6
commit bba34e2f19
2 changed files with 0 additions and 29 deletions
@@ -47,12 +47,6 @@
gdbm,
withReadline ? !withMinimalDeps && !stdenv.hostPlatform.isWindows,
readline,
x11Support ? false,
tcl,
tk,
tclPackages,
libX11,
xorgproto,
# splicing/cross
pythonAttr ? "python${sourceVersion.major}${sourceVersion.minor}",
@@ -114,8 +108,6 @@
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
assert x11Support -> tcl != null && tk != null && xorgproto != null && libX11 != null;
assert bluezSupport -> bluez != null;
assert lib.assertMsg (
@@ -280,12 +272,6 @@ let
++ optionals withReadline [
readline
]
++ optionals x11Support [
libX11
tcl
tk
xorgproto
]
);
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false);
@@ -446,11 +432,6 @@ stdenv.mkDerivation (finalAttrs: {
+ optionalString mimetypesSupport ''
substituteInPlace Lib/mimetypes.py \
--replace-fail "@mime-types@" "${mailcap}"
''
+ optionalString (pythonOlder "3.13" && x11Support && ((tclPackages.tix or null) != null)) ''
substituteInPlace "Lib/tkinter/tix.py" --replace-fail \
"os.environ.get('TIX_LIBRARY')" \
"os.environ.get('TIX_LIBRARY') or '${tclPackages.tix}/lib'"
'';
env = {
@@ -581,10 +562,6 @@ stdenv.mkDerivation (finalAttrs: {
if stdenv.hostPlatform.isAarch64 then "uint128" else "x64"
}'
''
+ optionalString (stdenv.hostPlatform.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 stdenv.hostPlatform.isWindows ''
export NIX_CFLAGS_COMPILE+=" -Wno-error=incompatible-pointer-types"
''