mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
wrapPythonPrograms: preserve quoted strings from makeWrapperArgs
Currently, if a user tries to to set a variable that contains spaces, it will be broken up before being passed to wrapProgram. This commit resolves that by converting makeWrapperArgs to an array that preserves any quoted elements using bash's parser.
This commit is contained in:
parent
b48172ea72
commit
28919e5bfa
@ -44,16 +44,15 @@ wrapPythonProgramsIn() {
|
||||
# wrapProgram creates the executable shell script described
|
||||
# above. The script will set PYTHONPATH and PATH variables.!
|
||||
# (see pkgs/build-support/setup-hooks/make-wrapper.sh)
|
||||
local wrap_args="$f \
|
||||
--prefix PYTHONPATH ':' $program_PYTHONPATH \
|
||||
--prefix PATH ':' $program_PATH:$dir/bin"
|
||||
local -a wrap_args=("$f"
|
||||
--prefix PYTHONPATH ':' "$program_PYTHONPATH"
|
||||
--prefix PATH ':' "$program_PATH:$dir/bin")
|
||||
|
||||
# Add any additional arguments provided by makeWrapperArgs
|
||||
# argument to buildPythonPackage.
|
||||
for arg in $makeWrapperArgs; do
|
||||
wrap_args="$wrap_args $arg"
|
||||
done
|
||||
wrapProgram $wrap_args
|
||||
local -a user_args="($makeWrapperArgs)"
|
||||
local -a wrapProgramArgs=("${wrap_args[@]}" "${user_args[@]}")
|
||||
wrapProgram "${wrapProgramArgs[@]}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user