From d6601acfabfae1f5d8620b55193153a35ff7e86a Mon Sep 17 00:00:00 2001 From: Celes Renata Date: Fri, 12 Dec 2025 11:00:11 -0800 Subject: [PATCH] Add gcc/g++ to PATH for building Python C++ extensions --- modules/python-environment.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/python-environment.nix b/modules/python-environment.nix index 781dd25..1d6d483 100644 --- a/modules/python-environment.nix +++ b/modules/python-environment.nix @@ -54,9 +54,11 @@ let echo "📦 Installing Python packages with proper library linking..." source "$VENV_PATH/bin/activate" - # Add cmake and pkg-config to PATH for building Python packages - export PATH="${pkgs.cmake}/bin:${pkgs.pkg-config}/bin:$PATH" + # Add build tools to PATH for building Python packages + export PATH="${pkgs.cmake}/bin:${pkgs.pkg-config}/bin:${pkgs.gcc}/bin:$PATH" export CMAKE_GENERATOR="Unix Makefiles" + export CC="${pkgs.gcc}/bin/gcc" + export CXX="${pkgs.gcc}/bin/g++" # Set wayland protocol path for pywayland export PKG_CONFIG_PATH="${pkgs.wayland}/lib/pkgconfig:${pkgs.wayland-protocols}/share/pkgconfig"