diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 2c754ba43fc7..2f5342efd403 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -208,10 +208,16 @@ let nativeBuildInputs = [ nukeReferences ] - ++ optionals (!stdenv.hostPlatform.isDarwin && !withMinimalDeps) [ - autoconf-archive # needed for AX_CHECK_COMPILE_FLAG - autoreconfHook - ] + ++ + optionals + ( + (!stdenv.hostPlatform.isDarwin && !withMinimalDeps) + || (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isFreeBSD) + ) + [ + autoconf-archive # needed for AX_CHECK_COMPILE_FLAG + autoreconfHook + ] ++ optionals ((!stdenv.hostPlatform.isDarwin || passthru.pythonAtLeast "3.14") && !withMinimalDeps) [ diff --git a/pkgs/development/interpreters/python/cpython/freebsd-cross.patch b/pkgs/development/interpreters/python/cpython/freebsd-cross.patch index 71b45bfead27..9ad1d20899f0 100644 --- a/pkgs/development/interpreters/python/cpython/freebsd-cross.patch +++ b/pkgs/development/interpreters/python/cpython/freebsd-cross.patch @@ -1,6 +1,6 @@ --- a/configure.ac 2024-06-07 09:17:50.608162031 -0700 +++ b/configure.ac 2024-06-07 09:45:59.844518241 -0700 -@@ -554,6 +554,9 @@ +@@ -339,6 +339,9 @@ *-*-wasi) ac_sys_system=WASI ;; @@ -10,7 +10,7 @@ *) # for now, limit cross builds to known configurations MACHDEP="unknown" -@@ -614,6 +617,9 @@ +@@ -780,6 +783,9 @@ wasm32-*-* | wasm64-*-*) _host_cpu=$host_cpu ;;