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

Add build / develop environment in Nix #219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nymphium
Copy link

@Nymphium Nymphium commented Jan 24, 2022

This PR adds Nix for easy-to-setup and reproducable build and develop environment.
test

@Nymphium Nymphium force-pushed the nix branch 4 times, most recently from 47bd5e3 to 860514a Compare January 25, 2022 14:53
@dpatti
Copy link
Collaborator

dpatti commented Feb 1, 2022

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?

@Nymphium
Copy link
Author

Nymphium commented Feb 7, 2022

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.

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

Successfully merging this pull request may close these issues.

2 participants