-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmix.exs
99 lines (90 loc) · 2.46 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
# Release steps:
# 1. Push tag
# 2. Once CI finishes, run MIX_ENV=prod mix elixir_make.checksum --all
# 3. Publish to Hex
defmodule Adbc.MixProject do
use Mix.Project
@version "0.7.8"
@github_url "https://github.com/elixir-explorer/adbc"
def project do
[
app: :adbc,
version: @version,
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
docs: docs(),
description: "Apache Arrow ADBC bindings for Elixir",
compilers: [:elixir_make] ++ Mix.compilers()
] ++ precompiled()
end
defp precompiled do
if System.get_env("ADBC_BUILD") in ["1", "true"] do
[]
else
[
make_precompiler: {:nif, CCPrecompiler},
make_precompiler_url:
"#{@github_url}/releases/download/v#{@version}/@{artefact_filename}",
make_precompiler_filename: "adbc_nif",
make_precompiler_priv_paths: ["adbc_nif.*", "adbc_dll_loader.dll", "bin", "lib", "include"],
make_precompiler_nif_versions: [versions: ["2.16"]],
cc_precompiler: [
cleanup: "clean",
compilers: %{
{:unix, :linux} => %{
"x86_64-linux-gnu" => {
"x86_64-linux-gnu-gcc",
"x86_64-linux-gnu-g++"
},
"aarch64-linux-gnu" => {
"aarch64-linux-gnu-gcc",
"aarch64-linux-gnu-g++"
}
},
{:unix, :darwin} => %{
:include_default_ones => true
},
{:win32, :nt} => %{
:include_default_ones => true
}
}
]
]
end
end
def application do
[
extra_applications: [:logger, inets: :optional, ssl: :optional]
]
end
defp deps do
[
# compilation
{:cc_precompiler, "~> 0.1.8 or ~> 0.2", runtime: false},
{:elixir_make, "~> 0.8", runtime: false},
# runtime
{:castore, "~> 1.0", optional: true},
{:decimal, "~> 2.1"},
# docs
{:ex_doc, "~> 0.29", only: :docs, runtime: false}
]
end
defp docs do
[
main: "Adbc.Database",
source_ref: "v#{@version}",
source_url: @github_url
]
end
defp package() do
[
name: "adbc",
files:
~w(3rd_party/apache-arrow-adbc c_src lib mix.exs README* LICENSE* CMakeLists.txt Makefile Makefile.win checksum.exs),
licenses: ["Apache-2.0"],
links: %{"GitHub" => @github_url}
]
end
end