title: building the hex registry file offline
body: <p>Adapting Elixir and all the tools in its ecosystem to work with a different build system.  </p>
  
  <p>In this system, the packages and their dependencies are managed separately and Hex is made to work in offline mode. (grab the tarballs)</p>
  
  <p>It's working with one caveat: every time I import a new package I need to also import the latest registry file from hexpm and I cannot use packages that are not published through hex unless they are at the top level in the deps chain.</p>
  
  <p>Given a bunch of tarballs (and assuming that the dependencies between them are satisfied, how would one go about building a hex registry file that works with them. </p>
  
  <p>What I have so far:  </p>
  
  <ul>
  <li>looked at the registry file format and seen it's an ets file. Can load and inspect it; now I need to generated</li>
  <li>looked at how the website builds the registry file, but it's super complicated for my needs</li>
  <li>I struggle a bit to understand why there is a need for a registry file (and if there is, why can't each package contain the needed info in the metadata, making the need for a central registry obsolete)</li>
  </ul>
  
  <p>Anyway, if anyone played with Hex and can provide some guidance on how to do this I would appreciate it.</p>