wrapPythonPrograms: do not propagate disabling user site-packages to child-processes

The `PYTHONNOUSERSITE` was exported to prevent impurities during
runtime. The downside of exporting environment variables is that they
always propagate all the way down the process tree, unless they are
explicitly unset at some point. Using the `-s` argument applies it only
to the process executed in the wrapper. That way, subprocesses are free
to do impure things.
This commit is contained in:
Frederik Rietdijk 2017-12-21 17:53:25 +01:00
parent a0aeb2381e
commit 310203565c

View File

@ -67,7 +67,7 @@ wrapPythonProgramsIn() {
# (see pkgs/build-support/setup-hooks/make-wrapper.sh)
local -a wrap_args=("$f"
--prefix PATH ':' "$program_PATH"
--set PYTHONNOUSERSITE "true"
--add-flags '-s'
)
# Add any additional arguments provided by makeWrapperArgs