HomeFreeBSD

In elixir.mk, add MIX_REWRITE and ELIXIR_LIB_ROOT.

Description

In elixir.mk, add MIX_REWRITE and ELIXIR_LIB_ROOT.

ELIXIR_LIB_ROOT is the default Elixir library path in LOCALBASE.

If MIX_REWRITE is defined, all optional dependencies will be stripped
out (test, doc, etc.), while all required libs will be converted to
actual code paths in ELIXIR_LIB_ROOT.

For example, it will turn the following dependency definitions:

defp deps do

  [
    { :inflex, "~> 1.0" },
    { :estree, "~> 2.0" },
    { :shouldi, only: :test },
    { :earmark, "~> 0.1", only: :dev },
    { :ex_doc, "~> 0.7", only: :dev }
  ]
end

into these:

defp deps do
  [
    { :inflex, path: "/usr/local/lib/elixir/lib/inflex", compile: false },
    { :estree, path: "/usr/local/lib/elixir/lib/estree", compile: false },
  ]
end

Setting MIX_REWRITE allows escriptize to bundle all dependencies in the
script, else it will not be able to pull them from the usual code path.

It already works for all Elixir ports and should make patches to mix.exs
unnecessary, but for now the default is off.

Sneak in a whitespace fix while I'm here.

Details

Provenance
olgeniAuthored on
Parents
rP392108: Upgrade to version 0.4.2.
Branches
Unknown
Tags
Unknown