From f4917d2893765f95e8e0e14656bb907a93b5db0a Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Tue, 20 Aug 2024 06:14:37 +0200 Subject: [PATCH] pkgsStatic.python312: fix build --- 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 dd569db15358..828f729a735a 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -455,6 +455,10 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { "ac_cv_func_lchmod=no" ] ++ optionals static [ "LDFLAGS=-static" + "MODULE_BUILDTYPE=static" + ] ++ optionals (stdenv.hostPlatform.isStatic && stdenv.hostPlatform.isMusl) [ + # dlopen is a no-op in static musl builds, and since we build everything without -fPIC it's better not to pretend. + "ac_cv_func_dlopen=no" ]; preConfigure = ''