-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
59 lines (49 loc) · 1.21 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
defmodule Mix.Tasks.Compile.Nif do
use Mix.Task
@shortdoc "compile C source"
def run(_) do
if match? {:win32, _}, :os.type do
raise RuntimeError, message: "Windows is not currently supported"
else
{result, _error_code} = System.cmd("make", ["priv/yomel.so"], stderr_to_stdout: true)
IO.binwrite result
end
:ok
end
end
defmodule Yomel.Mixfile do
use Mix.Project
def project do
[app: :yomel,
version: "0.5.0",
elixir: "~> 1.2",
description: description,
package: package,
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
compilers: [:nif | Mix.compilers],
deps: deps,
docs: docs]
end
def application do
[applications: [:logger]]
end
defp deps do
[{:earmark, "~> 0.2", only: :dev},
{:ex_doc, "~> 0.11", only: :dev}]
end
defp description do
"Decodes yaml into elixir terms"
end
defp package do
[files: ["lib", "c_src", "mix.exs", "Makefile", "README*", "LICENSE*"],
maintainers: ["Joe Honzawa"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/Joe-noh/yomel"
}]
end
defp docs do
[readme: "README.md", main: "README"]
end
end