diff --git a/pkgs/development/python-modules/generic/default.nix b/pkgs/development/python-modules/generic/default.nix index 9856682ba89b..378f047939f2 100644 --- a/pkgs/development/python-modules/generic/default.nix +++ b/pkgs/development/python-modules/generic/default.nix @@ -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: diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index f9a65c6a33f3..33b9a06f6080 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -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