Specify a remote tarball as dependency

As far as I understand, mix only supports dependencies on hex or git repo.

I would like to know if I could specify a URL to a .tar.gz file and mix will fetch and extract it.

I think the functionality is already there (how else would mix handle hex tarball?). Would it be suitable for addition to the code base though?

As for the use case, I have a library that is provided as tarball, and it is not available on github. The current workaround for me is to put the content of the tarball on a repo and instruct mix to there, but I need to keep that repo up to date.

You can implement your own SCM: https://hexdocs.pm/mix/Mix.SCM.html

This is Hex’s: https://github.com/hexpm/hex/blob/master/lib/hex/scm.ex

2 Likes