Metadata struct describing an NBPR package.
Returned by the generated __nbpr_package__/0 callback on every module that
does use NBPR.BrPackage. The struct is the canonical introspection surface
for the curated CI, the build runner, and any future tooling.
Summary
Types
The C library a Nerves system's toolchain targets. Nerves systems are
overwhelmingly glibc; x86_64 is the musl one.
Functions
The Buildroot package name, for a mainline package or a vendored one.
The absolute path of a vendored package's Buildroot external tree.
Whether this package brings its own Buildroot tree.
Types
@type libc() :: :gnu | :musl
The C library a Nerves system's toolchain targets. Nerves systems are
overwhelmingly glibc; x86_64 is the musl one.
@type t() :: %NBPR.Package{ artifact_sites: [artifact_site()], br_external_path: String.t() | nil, br_package: String.t() | nil, build_opt_extensions: %{required(atom()) => map()}, build_opts: keyword(), daemons: [NBPR.Package.Daemon.t()], description: String.t(), homepage: String.t() | nil, kernel_modules: [String.t()], module: module(), name: atom(), runtime_env: [{String.t(), String.t()}], unsupported_libc: [libc()], version: pos_integer() }
Functions
The Buildroot package name, for a mainline package or a vendored one.
A mainline package names it, because the name that Buildroot knows and the name
that Hex knows are not always the same: bluez-alsa is nbpr_bluez_alsa here,
and Hex takes no hyphen. A vendored package is named by its own NBPR name,
because the external tree is ours and the two names have no reason to differ.
iex> NBPR.Package.br_name(%NBPR.Package{name: :bluez_alsa, br_package: "bluez-alsa"})
"bluez-alsa"
iex> NBPR.Package.br_name(%NBPR.Package{name: :librespot, br_external_path: "buildroot"})
"librespot"
The absolute path of a vendored package's Buildroot external tree.
br_external_path is relative to the package's priv directory. A Hex
package ships priv, so the tree travels with the package and it is there at
build time whether the package came from Hex or from the workspace.
It returns nil for a mainline package.
Whether this package brings its own Buildroot tree.