There are Erlang hex packages which depend on env variables either in Makefiles or in rebar.config.script.
to configure its dependencies (see:
https://github.com/Feuerlabs/exometer#dependency-management).
For both Mix.Tasks.Deps.Compile.do_rebar/2 and Mix.Tasks.Deps.Compile.do_rebar3/2 the env for
I propose allowing a dependency declaration like the following in mix.exs:
def deps do
{:exometer, "~> 1.2.1", env: [{"EXOMETER_PACKAGES", "(basic), +afunix"}]}
end
That env can be passed to do_compile/2, do_make/2, do_rebar/2, do_rebar3/2.
I have intent to prepare a PR for this change.
Please let me know your thought about this,