I found early this morning a solution here:
https://github.com/alco/erlang-mix-project
Why this link answer the question is essentially:
1.- we have an elixir main project under rssutil/
2.- we have a myerlib.erl erlang library that we need to use from the elixir code we have under rssutil/lib/
3.- one solution is to create rssutil/src/ and copy myerlib.erl and compile, like first answer tell us before.
4.- But we want to manage our erlang libraries like deps of elixir proyects. For this we need that elixir see the myerlib erlang library like a elixir proyect.
5.- then add myerlib like a dep in rssutil/mix.exs
defp deps do
[..........
{:myerlib, path:deps/myerlib"}
]
end
6.- We need to create rssutil/deps/myliberl/ with the next mix.exs file:
defmodule Myerlib.Mixfile do
use Mix.Project
def project do
[app: :myerlib,
version: "0.0.1",
language: :erlang,
deps: deps]
end
def application do
[applications: [], mod: {:myerlib, []}]
end
defp deps do
[
{:mix_erlang_tasks, "0.1.0"},
]
end
end
Observe that the language is now erlang, and that we need like myerlib 's dep/
mix_erlang_tasks
7.- also create rssutil/deps/myerlib/src/myerlib.erl with your "old" erlang code
8.- In rssutil/deps/myerlib/ directory where you have the last mix.exs file, write
$ mix deps.get
$ mix compile
9.- Go up to rssutil/ directory and also
$ mix deps.get
$ iex -S mix
10.- And at end, you can call erlang s functions in myerlib.erl with:
iex> :myerlib.any_function_you_know_to_have_here(...)
that's all.
Anyway thank you very much.