-
Notifications
You must be signed in to change notification settings - Fork 5
/
mix.exs
73 lines (63 loc) · 1.56 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
defmodule NimbleLz4.MixProject do
use Mix.Project
@version "1.1.0"
@source_url "https://github.com/whatyouhide/nimble_lz4"
def project do
[
app: :nimble_lz4,
version: @version,
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
compilers: Mix.compilers(),
deps: deps(),
# Rustler
rustler_crates: [
nimblelz4: [mode: rustler_mode(Mix.env())]
],
# Hex
package: package(),
description: "NIF-based LZ4 compression and decompression support for Elixir.",
# Docs
name: "NimbleLZ4",
docs: [
main: "NimbleLZ4",
source_ref: "v#{@version}",
source_url: @source_url
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: []
]
end
defp package do
[
files: [
"lib",
"native/nimblelz4/.cargo",
"native/nimblelz4/src",
"native/nimblelz4/Cargo*",
"checksum-*.exs",
"mix.exs"
],
licenses: ["Apache-2.0"],
maintainers: ["Andrea Leopardi"],
links: %{"GitHub" => @source_url}
]
end
defp rustler_mode(:prod), do: :release
defp rustler_mode(_env), do: :debug
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:rustler, "~> 0.34.0"},
{:rustler_precompiled, "~> 0.7.2"},
# Dev and test dependencies
{:benchee, "~> 1.1", only: :dev},
{:ex_doc, "~> 0.28", only: :dev},
{:stream_data, "~> 1.1", only: [:dev, :test]}
]
end
end