-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
58 lines (48 loc) · 1.45 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
defmodule Mix.Tasks.Compile.Isaac do
@shortdoc "Compiles Isaac"
def run(_) do
if match? {:win32, _}, :os.type do
{result, _error_code} = System.cmd("nmake", ["/F", "Makefile.win", "priv\\markdown.dll"], stderr_to_stdout: true)
Mix.shell.info result
else
{result, _error_code} = System.cmd("make", ["priv/isaac.so"], stderr_to_stdout: true)
Mix.shell.info result
end
:ok
end
end
defmodule Isaac.Mixfile do
use Mix.Project
def project do
[app: :isaac,
version: "0.0.1",
elixir: "~> 1.0",
compilers: [:isaac, :elixir, :app],
description: description,
package: package,
deps: deps]
end
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
[applications: [:logger]]
end
defp deps do
[{:isaac_c, github: "arianvp/isaac", tag: "0.0.4", app: false}]
end
defp description do
"""
Isaac is an elixir module for the [ISAAC Stream Cipher](http://burtleburtle.net/bob/rand/isaacafa.html)
It wraps around https://github.com/arianvp/ISAAC which is a port of the ISAAC stream cipher to platforms which have words bigger than 32 bits.
"""
end
defp package do
[
files: ["src", "lib", "priv", "mix.exs", "README*", "LICENSE*"],
contributors: ["Arian van Putten"],
licenses: ["Public Domain"],
links: %{"Github" => "https://github.com/arianvp/elixir-isaac"}
]
end
end