waf: make PYTHONPATH extensible (#408825)

Wrapping waf with "--set" prevents other python packages in
nativeBuildInputs to be used in a wscript. Wrapping with "--prefix"
allows us to overcome this limitation.

(cherry picked from commit 662ade6aeb)
This commit is contained in:
panicgh 2025-06-01 18:41:04 +00:00 committed by github-actions[bot]
parent d2adc08687
commit e845e7404f

View file

@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
runHook preInstall
install -D waf "$out"/bin/waf
wrapProgram "$out"/bin/waf --set PYTHONPATH "$out"/${python3.sitePackages}
wrapProgram "$out"/bin/waf --prefix PYTHONPATH : "$out"/${python3.sitePackages}
mkdir -p "$out"/${python3.sitePackages}/
cp -r waflib "$out"/${python3.sitePackages}/
runHook postInstall