diff --git a/pkgs/development/interpreters/python/setup-hook.sh b/pkgs/development/interpreters/python/setup-hook.sh index 77ec9e9ac0bf..523df5762fad 100644 --- a/pkgs/development/interpreters/python/setup-hook.sh +++ b/pkgs/development/interpreters/python/setup-hook.sh @@ -12,7 +12,9 @@ toPythonPath() { echo $result } -addEnvHooks "$hostOffset" addPythonPath +if [ -z "${dontAddPythonPath:-}" ]; then + addEnvHooks "$hostOffset" addPythonPath +fi # Determinism: The interpreter is patched to write null timestamps when compiling python files. # This way python doesn't try to update them when we freeze timestamps in nix store.