Hex.pm lister (Erlang package manager)
I dived into the hex.pm (Erlang package manager) ecosystem and found that we can list it like this:
- Iterate through the package API https://hex.pm/api/packages/ (pass
?page=n
for pagination) - To get a list of released versions for each pkg, extract
pkg["releases"][i]["version"]
wherei
is the ith release. - Now combine these versions with the package name in based on the format:
https://repo.hex.pm/tarballs/{pkg_name}-{pkg_version}.tar
- Send these urls to the tar loader along with extra metadata.
- For the
last_update
value, we can usepkg["updated_at"]
Sample tar link: https://repo.hex.pm/tarballs/jason-1.4.0.tar
References:
Migrated from T4687 (view on Phabricator)
Edited by Phabricator Migration user