diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 9a0a18488aa7..9c7cd10e2eda 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -506,6 +506,7 @@ stdenv.mkDerivation (finalAttrs: { "ac_cv_func_lchmod=no" ] ++ optionals static [ + "--disable-test-modules" "LDFLAGS=-static" "MODULE_BUILDTYPE=static" ] @@ -597,7 +598,11 @@ stdenv.mkDerivation (finalAttrs: { echo $item fi done + '' + + lib.optionalString (!static) '' touch $out/lib/${libPrefix}/test/__init__.py + '' + + '' # Determinism: Windows installers were not deterministic. # We're also not interested in building Windows installers.