-
Notifications
You must be signed in to change notification settings - Fork 13
/
mix.exs
118 lines (103 loc) · 2.49 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
defmodule Scenic.Driver.Local.MixProject do
use Mix.Project
@app_name :scenic_driver_local
@version "0.12.0-rc.0"
@github "https://github.com/ScenicFramework/scenic_driver_local"
def project do
[
app: @app_name,
version: @version,
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
description: description(),
build_embedded: true,
compilers: compilers(),
make_clean: ["clean"],
make_targets: ["all"],
make_env: make_env(),
deps: deps(),
package: package(),
xref: [exclude: [Mix.Nerves.Utils]],
docs: [
extras: doc_guides(),
main: "overview",
source_ref: "v#{@version}",
source_url: @github
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: extra_applications()
]
end
def extra_applications do
apps = [:logger]
case Mix.env() do
:dev -> apps ++ [:mix]
_ -> apps
end
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:input_event, "~> 1.4"},
{:scenic, "~> 0.12.0-rc.0"},
# Tools
{:credo, ">= 1.7.7", only: [:dev, :test], runtime: false},
{:elixir_make, "~> 0.8", runtime: false},
{:ex_doc, ">= 0.34.1", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false}
]
end
defp description() do
"""
Scenic.Driver.Local - Scenic driver for locally rendered devices
"""
end
defp make_env() do
case System.get_env("ERL_EI_INCLUDE_DIR") do
nil ->
%{
"ERL_EI_INCLUDE_DIR" => "#{:code.root_dir()}/usr/include",
"ERL_EI_LIBDIR" => "#{:code.root_dir()}/usr/lib"
}
_ ->
%{}
end
end
defp compilers() do
compilers(System.get_env("PUBLISH"))
end
defp compilers(nil) do
Mix.compilers() ++ [:scenic_driver_local, :elixir_make]
end
defp compilers(_publish) do
Mix.compilers()
end
defp package do
[
name: @app_name,
contributors: ["Boyd Multerer", "Jon Ringle"],
maintainers: ["Boyd Multerer"],
licenses: ["Apache-2.0"],
links: %{Github: @github},
files: [
"Makefile",
"LICENSE",
# only include *.c and *.h files
"c_src/**/*.[ch]",
"c_src/**/LICENSE*",
# only include *.ex files
"lib/**/*.ex",
"mix.exs"
]
]
end
defp doc_guides do
[
"guides/overview.md"
]
end
end