Is it possible to have a github dep point to a path within the repo?

I have a github repository that contains multiple elixir applications within it. Can I use it as a dependency but not point to the root of the repository and instead point to a sub-directory within that repository? I’m not seeing any relevant options in https://hexdocs.pm/mix/Mix.Tasks.Deps.html

Has anyone tried this?

1 Like

Yes it is:

  • :sparse - checkout a single directory inside the Git repository and use it as your Mix dependency. Search “sparse git checkouts” for more information.
4 Likes

Hmmm, that’s similar to what I want, but I just want the “use a single directory as your Mix dependency” part without the sparse part. Since that git repository has an internal path dependency. If I manually change the sparse checkout to a full checkout it works. Seems like I may need to file this as a bug/feature request.

1 Like