From 12b46122bccc5de9440a3fc60cc16d67667f50d2 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Thu, 22 May 2025 22:18:56 -0300 Subject: [PATCH] cpython: add `enableDebug` argument to enable `"--with-pydebug"` during build (#409943) --- 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 ba93166c2b66..9a0a18488aa7 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -71,6 +71,7 @@ enableFramework ? false, noldconfigPatch ? ./. + "/${sourceVersion.major}.${sourceVersion.minor}/no-ldconfig.patch", enableGIL ? true, + enableDebug ? false, # pgo (not reproducible) + -fno-semantic-interposition # https://docs.python.org/3/using/configure.html#cmdoption-enable-optimizations @@ -463,6 +464,9 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals enableOptimizations [ "--enable-optimizations" ] + ++ optionals enableDebug [ + "--with-pydebug" + ] ++ optionals (sqlite != null) [ "--enable-loadable-sqlite-extensions" ]