forked from nerves-hub/nerves_key
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
75 lines (66 loc) · 1.63 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
defmodule NervesKey.MixProject do
use Mix.Project
@version "0.5.4"
@source_url "https://github.com/nerves-hub/nerves_key"
def project do
[
app: :nerves_key,
version: @version,
description: description(),
package: package(),
source_url: @source_url,
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
docs: docs(),
aliases: [docs: ["docs", ©_images/1]],
deps: deps(),
dialyzer: [
plt_add_apps: [:public_key, :asn1, :mix],
ignore_warnings: ".dialyzer_ignore.exs"
],
preferred_cli_env: %{
docs: :docs,
"hex.publish": :docs,
"hex.build": :docs
}
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:crypto]
]
end
defp description do
"Elixir support for the NervesKey"
end
defp package do
[
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
defp deps do
[
{:atecc508a, "~> 0.2.1"},
{:nerves_key_pkcs11, "~> 0.2"},
{:ex_doc, "~> 0.20", only: :docs, runtime: false},
{:dialyxir, "~> 1.1", only: :dev, runtime: false}
]
end
defp docs do
[
extras: ["README.md", "hw/hw.md"],
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url
]
end
# Copy the images referenced by docs, since ex_doc doesn't do this.
defp copy_images(_) do
File.cp_r("hw/assets", "doc/assets")
end
end