forked from mirrors/nixpkgs
using makeWrapperArgs instead of setEnvVars
This commit is contained in:
parent
bf1a16bbea
commit
6bb2e47abf
|
@ -47,9 +47,9 @@
|
|||
# Execute after shell hook
|
||||
, postShellHook ? ""
|
||||
|
||||
# Environment variables to set in wrapper scripts, in addition to
|
||||
# PYTHONPATH and PATH.
|
||||
, setEnvVars ? []
|
||||
# Additional arguments to pass to the makeWrapper function, which wraps
|
||||
# generated binaries.
|
||||
, makeWrapperArgs ? []
|
||||
|
||||
, ... } @ attrs:
|
||||
|
||||
|
|
|
@ -45,11 +45,10 @@ wrapPythonProgramsIn() {
|
|||
--prefix PYTHONPATH ':' $program_PYTHONPATH \
|
||||
--prefix PATH ':' $program_PATH"
|
||||
|
||||
# Add any additional environment variables to propagate.
|
||||
for env_var in $setEnvVars; do
|
||||
# Look up the value of this variable
|
||||
local value=$(eval "echo \$$env_var")
|
||||
wrap_args="$wrap_args --set $env_var $value"
|
||||
# Add any additional arguments provided by makeWrapperArgs
|
||||
# argument to buildPythonPackage.
|
||||
for arg in $makeWrapperArgs; do
|
||||
wrap_args="$wrap_args $arg"
|
||||
done
|
||||
wrapProgram $wrap_args
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue