Walks the user's loaded applications for nbpr packages, fetches each one's
artefact tarball for the active Nerves system (if not already cached), and
copies the artefact's target/ contents into the package's priv/ so it
ships as part of the OTP release.
mix nbpr.fetchIntended to run before mix firmware. Recommended wiring:
aliases: ["firmware": ["nbpr.fetch", "firmware"]]Discovery
An nbpr package is detected by:
- Its application name starts with
nbpr_. - The corresponding
NBPR.<Camel>module exports__nbpr_package__/0.
Required environment
Must be run with MIX_TARGET set to a real Nerves target — there's no
work to do for :host. The active Nerves system and version are read
from Nerves.Env.system/0.
See also
The wider rationale for staging into priv/ (rather than a rootfs overlay)
and the runtime PATH/LD_LIBRARY_PATH setup is in the
Packaging model explanation.