# `mix precompiled.install`
[🔗](https://github.com/TomHoenderdos/elixir_precompiled/blob/v0.2.1/lib/mix/tasks/precompiled.install.ex#L6)

Run through `mix igniter.install precompiled`. Makes the
`precompiled` dependency `runtime: false`, adds
`config :precompiled, source: ...` to `config/config.exs`
(`--source URL`, default the public Nerves compatibility portal) and puts
`"deps.compile precompiled", "precompiled.deps"` at the front of
the project's `deps.loadpaths` alias, before any steps already there.
Running it again changes nothing. Not for umbrellas: add the alias to
the umbrella root by hand (see `mix help precompiled.deps`).

`--device` is for a Nerves firmware that should be able to install on
the device itself (`Precompiled.install/1`, see the "On a device"
guide). It does three things:

  * removes `runtime: false` from the dependency, so the library ships
    in the firmware;
  * adds `{:castore, "~> 1.0"}` unless the project already depends on
    `castore`. The check looks at the dependencies only: a firmware
    that sets `cacerts_path:` under `config :precompiled,
    :device` still gets `castore` added, and can drop it again;
  * adds `:inets`, `:ssl` and `:public_key` to `extra_applications`:
    they are optional applications of this library, and an online
    install needs them.

Nothing else is written for the device: it is on by default and uses
the official signed source.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
