From 6658ddfa50bc8e6080062734b81de6f947ab3e5c Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Wed, 8 Jan 2025 12:32:19 +0100 Subject: [PATCH] python311: fix mingwW64 cross, mark as broken for other versions --- pkgs/development/interpreters/python/cpython/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 4027cc03da1b..c5bb4b556432 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -434,6 +434,8 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { '' + 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" '' + optionalString stdenv.hostPlatform.isMusl '' export NIX_CFLAGS_COMPILE+=" -DTHREAD_STACK_SIZE=0x100000" '' + @@ -665,5 +667,7 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { platforms = platforms.linux ++ platforms.darwin ++ platforms.windows ++ platforms.freebsd; mainProgram = executable; maintainers = lib.teams.python.members; + # mingw patches only apply to Python 3.11 currently + broken = (lib.versions.minor version) != "11" && stdenv.hostPlatform.isWindows; }; })