We support this in some ways today, but we are working on workflow improvements.
You can change the default repository Hex uses from
hex.pm to something internal by changing the `HEX_CDN` environment variable, this wont pass-through or default back to
hex.pm. I am currently working on multiple repository support so a project can use packages from an internal repository and
hex.pm at the same time and internal packages can depend on packages from
hex.pm. This features requires rebuilding large parts of the current application so it's a longer task and I work on it between my other open source work, so it's still quite a bit away. As always, contributions to Hex are very welcome to help off-load me :).
To run a Hex repository you can use the application we use for
hex.pm:
https://github.com/hexpm/hex_web. This might be overkill for something internal and may require some changes (AFAIK it is only used by
hex.pm so far). A Hex repository can also be ran by a simple HTTP server, you just need to serve files as specified under CDN here:
https://github.com/hexpm/hex_web/blob/master/specifications/endpoints.md#cdn. To make this even easier in the future we will be adding an alternative, simpler, but less optimized registry format that can be easily built by some task you can run. We will also add the ability to build a package without publishing it to
hex.pm.
As Jason said you can of course host your private dependencies on git.
We have also outlined the requirements for vendoring dependencies in this issue:
https://github.com/hexpm/hex/issues/119. As it turned it just requires some small changes and it's a great task if someone wants to jump into the Hex codebase.