From a76e11a8c509f2db5871aced41b46077b66206a2 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 5 Mar 2019 20:25:38 +0100 Subject: [PATCH] python: make it possible to disable the python setup-hook Without this it's impossible to use a python binary that depends on a different python version than what's used during the current build. --- pkgs/development/interpreters/python/setup-hook.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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.