-
Notifications
You must be signed in to change notification settings - Fork 12
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 #30
base: master
Are you sure you want to change the base?
Nix flake #30
Conversation
What version of OCaml will the nix build use? I can't find an indication of that in the files except for the dune saying that it requires ">= 5.2.0". Actually, I don't see any indication in the files of what version of any of the opam dependencies (asai, fmlib, ...) will be used. It makes sense for it to be whatever version is currently available in opam for the chosen ocaml switch (where I guess "currently" means whenever the lock file was generated?), but where is that information stored? |
The flake takes the ocaml build constraint from the dune file. Basically, the flake "resolves" the dependencies using the version of ocaml-repository that is pinned in the lock file, which comes from the input:
If you want to add version bounds, you can do so in the dune file, and that will inform the resolution algorithm. But as long as the dune file and the git sha256 of |
So it will use 5.2.0? It would be nice if the dune file could say that 5.2.0 is allowed, but if the distributed development builds could nevertheless use a more recent version like 5.2.1 to take advantage of bugfixes. |
Yes, it currently uses 5.2.0. Version 5.2.1 has not been added to nixpkgs yet, see NixOS/nixpkgs#359654. In general, I believe that the (>= 5.2.0) line will have your intended behavior; it will default to newer versions as they become available. |
How much of a delay is there usually for an ocaml release making it into nixpkgs? |
Empirically, it seems like around two weeks, as the 5.2.1 release just got merged. |
It would be nice to document somewhere (e.g. for the benefit of future-me) the command that has to be run to update the lock file and when that should be done. The README doesn't seem like quite the right place, but I suppose it would be okay for now. Or maybe the CONTRIBUTING file (which I just made for the first time, now that we're starting to get contributions from more than just me). Thoughts? |
This is ok to merge, right? |
This adds a flake file (simplified from #25), which supports a development environment as well as a static binary. Merge this after #29.