-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
66 lines (59 loc) · 1.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
defmodule Ed25519Blake2b.MixProject do
use Mix.Project
def project do
[
app: :ed25519_blake2b,
package: package(),
version: "0.2.0",
elixir: "~> 1.8",
docs: docs(),
start_permanent: Mix.env() == :prod,
compilers: [:rustler] ++ Mix.compilers(),
rustler_crates: rustler_crates(),
deps: deps()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:rustler, "~> 0.21.0"},
{:benchee, "~> 1.0", only: [:dev]},
{:ex_doc, "~> 0.19", only: [:dev], runtime: false}
]
end
defp docs do
[
name: "Ed25519Blake2b",
extras: ["README.md"],
main: "readme",
source_url: "https://github.com/orhanhenrik/ed25519_blake2b"
]
end
defp package do
[
name: :ed25519_blake2b,
description:
"Ed25519Blake2b is a NIF library to work with ed25519 signatures with blake2b hashing",
files: ["lib", "native", ".formatter.exs", "README*", "LICENSE*", "mix.exs"],
maintainers: ["Orhan Henrik Hirsch"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/orhanhenrik/ed25519_blake2b"
}
]
end
defp rustler_crates do
[
ed25519blake2b: [
mode: rustc_mode(Mix.env(), System.get_env("OPTIMIZE_NIF") == "true")
]
]
end
defp rustc_mode(_, true), do: :release
defp rustc_mode(:prod, _), do: :release
defp rustc_mode(_, _), do: :debug
end