Nerves.Package (nerves v1.11.3)

View Source

Defines a Nerves package struct and helper functions.

A Nerves package is a Mix application that defines the configuration for a Nerves system or Nerves toolchain. For more details, see the Nerves system documentation

Summary

Functions

Get Mix.Project config for an application

Loads the package config and parses it into a %Package{}

Starts an interactive shell with the working directory set to the package path

Types

t()

@type t() :: %Nerves.Package{
  app: atom(),
  build_runner: {module(), Keyword.t()},
  compilers: [atom()],
  config: Keyword.t(),
  dep: :project | :path | :hex | :git,
  dep_opts: Keyword.t(),
  env: %{required(String.t()) => String.t()},
  path: binary(),
  platform: atom(),
  type:
    :system | :package | :toolchain | :system_platform | :toolchain_platform,
  version: Version.t()
}

Functions

config(app, path)

@spec config(Application.app(), Path.t()) :: Keyword.t()

Get Mix.Project config for an application

load_config(arg)

@spec load_config({app :: atom(), path :: String.t()}) :: t()

Loads the package config and parses it into a %Package{}

shell(pkg)

@spec shell(t() | nil) :: :ok

Starts an interactive shell with the working directory set to the package path