Yes, this is very reasonable. Please send a PR? Also keep in mind we will need to support env variables on all packages, so even if it is an Elixir package, we will likely need to set the env and then clean it up!
*José Valim* www.plataformatec.com.br Skype: jv.ptec Founder and Director of R&D On Thu, Jul 27, 2017 at 1:38 AM, Dimitrios Zorbas < [email protected]> wrote: > Hello fellow alchemists, > > There are Erlang hex packages which depend on env variables either in > Makefiles or in rebar.config.script. > A very popular example package is elixometer > <https://github.com/pinterest/elixometer>, which depends on exometer > <https://github.com/Feuerlabs/exometer>, which requires setting the > EXOMETER_PACKAGES variable > 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 > Mix.Shell.cmd/2 cannot be altered from within mix.exs (see: > https://github.com/elixir-lang/elixir/blob/master/lib/ > mix/lib/mix/tasks/deps.compile.ex#L162). > > 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, > Dimitris > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/elixir-lang-core/8ef2ba77-8752-4fb2-9005- > 9b51ef434258%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/8ef2ba77-8752-4fb2-9005-9b51ef434258%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BgCfqPWmeDhUqH%3D8v2e8FOAxvbMbdnsx-pxFrmVhvbxg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
