Add dependency to application not yet deployed to hex?

I have an application called mozart that is not yet published to hex.

Now, I want to create a Phoenix/LiveView app that uses mozart as a dependency. I don’t think I can specify it as a dependency in my mix.exs file. How do I achieve this? Thanks

You can reference it by git in your mix.exs file,

defp deps do
  [
    ...
    {:mozart, git: "https://github.com/CharlesIrvineKC/mozart.git", ref: "98e4de6"},
    ...
  ]
end

You can checkout Mix Deps

3 Likes

There are several methods for specifying dependencies… From the docs (mix deps — Mix v1.16.2):

{:plug, ">= 0.4.0"}
{:gettext, git: "https://github.com/elixirlang/gettext.git", tag: "0.1"}
{:local_dependency, path: "path/to/local_dependency"}

I use a lot of path dependencies since I have many modules which will never go to hex.pm and are part of the master project mono-repo.

Thanks @tomkonidas, @sbuttgereit. I chose the local dependency route for now, but the GitHub option will come in handy down the road.