Nerves tooling for building embedded Elixir
Please see the getting started guides for using Nerves.
Summary
Functions
Get the current Nerves build plan
Return the ERTS path for the release
Inject Nerves release steps
Returns the Nerves version as a binary
Functions
@spec build_plan() :: Nerves.BuildPlan.t()
Get the current Nerves build plan
If you're writing a custom Nerves.BuildAction, use the build_plan that's passed
to the callbacks. This is handy for situations where the plan isn't easily accessible
and for debug.
@spec erts() :: Path.t() | true
Return the ERTS path for the release
On target builds, returns the path to the cross-compiled ERTS from the
Nerves system artifact. On host, returns true to use the host ERTS.
This call belongs in your project's mix.exs's release/0 function:
def release do
[
...
include_erts: &Nerves.erts/0,
...
]
end
@spec init_release(Mix.Release.t()) :: Mix.Release.t()
Inject Nerves release steps
This makes sure that the Nerves tooling is available to affect the Mix release process.
This call belongs in your project's mix.exs's release/0 function:
def release do
[
...
steps: [&Nerves.init_release/1, :assemble],
...
]
end
@spec version() :: String.t()
Returns the Nerves version as a binary