3
0
Fork 0
forked from mirrors/nixpkgs

using makeWrapperArgs instead of setEnvVars

This commit is contained in:
Allen Nelson 2015-05-24 10:19:13 -05:00
parent bf1a16bbea
commit 6bb2e47abf
2 changed files with 7 additions and 8 deletions

View file

@ -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:

View file

@ -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