Page MenuHomeSoftware Heritage

Hex.pm lister (Erlang package manager)
Open, Needs TriagePublic

Description

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"] where i 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 use pkg["updated_at"]

Sample tar link: https://repo.hex.pm/tarballs/jason-1.4.0.tar

References:

Event Timeline

KShivendu created this object in space S1 Public.

I have a question: The .tar files obtained from this have a contents.tar.gz which contains the real source code. Is there a way to extract this internal .tar file using the current tar loader?

@KShivendu Hi, we had a similar situation with rubygems loader, see its _load_directory method