Package version: source vs. binary

Thanks very much for looking into this @ivg and @bobot! Just one clarification: rather than wrapping existing packages in nix (which is complex and adds multiple layers of indirection), I was thinking about this scheme:

  • build a duniverse of the set of opam packages you want to publish in nix.
  • Check that it all builds using dune build from the toplevel directory.
  • Now we add a build target to dune that will generate <name>.nix packages based on the fine-grained build information available to dune. These should not require opam to install at all, since nix replaces opam here as the coordination mechanism for ensuring that they are compiled and installed into the system.

Dune 1.10 has support for package metadata in dune-project, so the only missing metadata that nix would need here is the depext information, which I would also like to add into dune to aid configurator probing.

We primarily just need the runes to know how to drive Nix in order to generate the Dockerfiles:

I know nothing about Nix, so even an issue on there with instructions would be a good start towards getting Nix/OCaml containers being built regularly. It definitely seems like the next best target we should aim for in our CI.

1 Like