Setting overrides from mix/elixir to rebar3


I need to change the output of a particular NIF i do not own from Elixir somehow. The NIF is compiled by rebar3 + the port_compiler plugin.

Long version

With the introduction of to Elixir 1.8, and elixir_make 1.5, Nerves applications can now better compile and manage cross compilation of C/CPP code. So instead of having a mix.lock, _build and deps directory for every mix target, (rpi, rpi3, rpi0, host, etc), We’ve unified all those into shared directories. A caveat of this is that C code and Makefiles for said code now needs to be recompiled based on the changing.

This is fine with the addition of a change i helped add to elixir_make. Now the issue is that C code built by rebar3 needs to somehow incorporate the same change somehow.

The port_compiler rebar3 plugin has this section saying that deps can be overwrote with a rebar.config, but i’m not sure if Elixir has access to this functionality.

I can’t seem to find many docs on rebar3/mix configuration other than closed GH issues. Any help would be appreciated.