Add build / develop environment in Nix
I'm not sure I understand why we want to test 3 different versions of OCaml in nix in the actions as opposed to just testing the latest. Also, it looks like those giant nix files are generated, but I'm not sure how to regenerate them or if we really need to check them in. Can you shed some light on that process?
I'm not sure I understand why we want to test 3 different versions of OCaml in nix in the actions as opposed to just testing the latest.
Httpaf accepts OCaml >= 4.0.3 and opam2nix, which generates nix expression from opam file, can be used with OCaml >= 4.11.0, so the action tests the three latest versions. Is it preferred to test only the latest version same as current?
Also, it looks like those giant nix files are generated, but I'm not sure how to regenerate them or if we really need to check them in. Can you shed some light on that process?
nix/opam-selection_VERSION.nix can be generated as following:
$ nix-shell default.nix -A resolve --argstr ocamlVersion 4_12 # for OCaml 4.12.x
ocamlVersion refers nix/ocamlDefaultVersion.nix by default.
These file preserves reproducability like ".opam.lock", but its saves dependent packave version based on opam commit hash and also depexts without version. Versions of epexts can be managed via commid hash ov nixpkgs.