Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix flake and dune-project #5606

Open
bobot opened this issue Apr 22, 2022 · 2 comments
Open

Nix flake and dune-project #5606

bobot opened this issue Apr 22, 2022 · 2 comments

Comments

@bobot
Copy link
Collaborator

bobot commented Apr 22, 2022

Would it be interesting to generate nix files (for example a flake) from a dune-project file?

The goal would be for nix users:

  • easily get a build environment
  • easily create a flake that can be a dependency for other project.

We could integrate it in dune like the (generate_opam_files true).

@vbgl, sorry for mentioning you if you are not interested in such topic.
@rgrinberg

@rgrinberg
Copy link
Member

There's the opam-nix project that does this already by going through opam. That seems good enough? Otherwise, we'd need a way to know the URL's of source dependencies which would basically mean re-implementing opam-repository.

Another thing that would really be interesting would be for dune to generate derivations corresponding on dune's rules. That would mean we could piggy back on nix's caching, sandboxing, etc. It wouldn't really be an option for development, but it would be a nice option for distributing OCaml packages.

@Alizter
Copy link
Collaborator

Alizter commented Oct 13, 2022

I believe opam-nix also has support for dune-projects directly already without the need for opam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants