-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
93 lines (81 loc) · 2.32 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
defmodule Secp256k1.MixProject do
use Mix.Project
@version "0.6.0"
def project do
[
# Library
app: :lib_secp256k1,
version: @version,
# Elixir
elixir: "~> 1.14",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
# Elixir make
compilers: [:elixir_make] ++ Mix.compilers(),
make_clean: ["clean"],
# Docs
name: "secp256k1",
source_url: "https://github.com/Sgiath/secp256k1",
homepage_url: "https://sgiath.dev/libraries#secp256k1",
description: """
Library wrapping around secp256k1 Bitcoin library
""",
package: package(),
docs: docs()
]
end
def application do
[
extra_applications: [:logger, :crypto]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
# C compilation
{:elixir_make, "~> 0.8", runtime: false},
# Development
{:ex_check, "~> 0.16", only: [:dev], runtime: false},
{:credo, "~> 1.7", only: [:dev], runtime: false},
{:ex_doc, "~> 0.34", only: [:dev], runtime: false},
{:mix_audit, "~> 2.1", only: [:dev], runtime: false},
{:mix_test_watch, "~> 1.2", only: [:dev], runtime: false}
]
end
defp package do
[
name: "lib_secp256k1",
maintainers: ["Sgiath <[email protected]>"],
files: ~w(lib LICENSE mix.exs README* CHANGELOG* c_src/*.[ch] Makefile),
licenses: ["WTFPL"],
links: %{
"C library" => "https://github.com/bitcoin-core/secp256k1",
"GitHub" => "https://github.com/Sgiath/secp256k1"
}
]
end
defp docs do
[
authors: ["sgiath <[email protected]>"],
main: "readme",
api_reference: false,
extras: [
"README.md": [filename: "readme", title: "Overview"],
"CHANGELOG.md": [filename: "changelog", title: "Changelog"]
],
formatters: ["html"],
source_ref: "v#{@version}",
source_url: "https://github.com/Sgiath/secp256k1",
groups_for_modules: groups_for_modules()
]
end
defp groups_for_modules do
[
"Private API": [Secp256k1.ECDSA, Secp256k1.Extrakeys, Secp256k1.Schnorr]
]
end
end