Skip to content

Commit

Permalink
Forking original library with fixes (#2)
Browse files Browse the repository at this point in the history
* Forking to libsalty2 as original is no longer maintained

* Updating mix and README

* Update README.md

* Updating exdoc

* Changing some stuff

* Change nif loading

* Starting teh application so that the nif loads automatically
  • Loading branch information
Ianleeclark authored Sep 28, 2020
1 parent 0090582 commit 68cab20
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Salty
# libsalty2

Libsalty2 provides bindings to [libsodium](https://github.com/jedisct1/libsodium)

NOTICE: This is a fork of the original, which is no longer maintained. Hence the `2` appended.

Libsalty provides bindings to [libsodium](https://github.com/jedisct1/libsodium)
for Elixir, based on [Erlang nif](http://erlang.org/doc/man/erl_nif.html).

credits to [**Libsodium**](https://github.com/jedisct1/libsodium): author [Frank Denis](https://github.com/jedisct1)
Expand All @@ -9,11 +12,11 @@ Libsodium is licensed under [ISC License](https://github.com/jedisct1/libsodium/

## Hex

This package is available through [Hex](https://hex.pm/packages/libsalty).
This package is available through [Hex](https://hex.pm/packages/libsalty2).

## Requirements

Libsalty requires that libsodium 1.0.12 or later is already installed on your
Libsalty2 requires that libsodium 1.0.12 or later is already installed on your
system. If you receive compiler warnings or a missing symbol error when trying
to use libsalty, it's likely that you're running on a system with an old version
of libsodium.
Expand Down
2 changes: 1 addition & 1 deletion lib/salty/nif.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Salty.Nif do
binds the Elixir module methods to erl_nif calls.
"""
def load_nif do
path = :filename.join([:code.priv_dir(:salty), "salty_nif"])
path = :filename.join([:code.priv_dir(:libsalty2), "salty_nif"])
case :erlang.load_nif(path, 0) do
:ok -> :ok
error -> {:error, error}
Expand Down
12 changes: 6 additions & 6 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
defmodule Salty.Mixfile do
use Mix.Project

@github "https://github.com/ArteMisc/libsalty"
@github "https://github.com/ianleeclark/libsalty2"

def project do
[
app: :salty,
version: "0.1.3",
app: :libsalty2,
version: "0.2.1",
elixir: "~> 1.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
Expand All @@ -27,7 +27,7 @@ defmodule Salty.Mixfile do

defp deps do
[
{:ex_doc, "~> 0.14", only: :dev},
{:ex_doc, "~> 0.18", only: :dev},
{:elixir_make, "~> 0.4", runtime: false}
]
end
Expand All @@ -41,9 +41,9 @@ defmodule Salty.Mixfile do

defp package do
[
name: "libsalty",
name: "libsalty2",
files: ["config", "src", "lib", "mix.exs", "Makefile", "LICENSE*", "README*"],
maintainers: ["[email protected]"],
maintainers: ["[email protected]"],
licenses: ["Apacha License, Version 2.0"],
links: %{"Github" => @github}
]
Expand Down
6 changes: 5 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
%{
"earmark": {:hex, :earmark, "1.2.2", "f718159d6b65068e8daeef709ccddae5f7fdc770707d82e7d126f584cd925b74", [:mix], [], "hexpm", "59514c4a207f9f25c5252e09974367718554b6a0f41fe39f7dc232168f9cb309"},
"earmark_parser": {:hex, :earmark_parser, "1.4.10", "6603d7a603b9c18d3d20db69921527f82ef09990885ed7525003c7fe7dc86c56", [:mix], [], "hexpm", "8e2d5370b732385db2c9b22215c3f59c84ac7dda7ed7e544d7c459496ae519c0"},
"elixir_make": {:hex, :elixir_make, "0.4.1", "6628b86053190a80b9072382bb9756a6c78624f208ec0ff22cb94c8977d80060", [:mix], [], "hexpm", "d1f7e3df73e3beaf8784d6f6027230af524cf78c9860623a55d84fe85fae5ee4"},
"ex_doc": {:hex, :ex_doc, "0.16.2", "3b3e210ebcd85a7c76b4e73f85c5640c011d2a0b2f06dcdf5acdb2ae904e5084", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm", "b6fb4aef8125c62e6b6a7d7507eff70f376a7050c7745af11f08333ea9beebd3"},
"ex_doc": {:hex, :ex_doc, "0.22.5", "d2312c99f52cb1f98371e28f68259b4e0cee13d0122baedaf74a8e44e299a35b", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "d6ac685fd0b226805db96f7fbb384cbf8e01903ddb902ff66c9b189104705cae"},
"makeup": {:hex, :makeup, "1.0.3", "e339e2f766d12e7260e6672dd4047405963c5ec99661abdc432e6ec67d29ef95", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2e9b4996d11832947731f7608fed7ad2f9443011b3b479ae288011265cdd3dad"},
"makeup_elixir": {:hex, :makeup_elixir, "0.14.1", "4f0e96847c63c17841d42c08107405a005a2680eb9c7ccadfd757bd31dabccfb", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f2438b1a80eaec9ede832b5c41cd4f373b38fd7aa33e3b22d9db79e640cbde11"},
"nimble_parsec": {:hex, :nimble_parsec, "0.6.0", "32111b3bf39137144abd7ba1cce0914533b2d16ef35e8abc5ec8be6122944263", [:mix], [], "hexpm", "27eac315a94909d4dc68bc07a4a83e06c8379237c5ea528a9acff4ca1c873c52"},
}

0 comments on commit 68cab20

Please sign in to comment.