mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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 New Issue
Block a user