FStar icon indicating copy to clipboard operation
FStar copied to clipboard

nix: various improvements

Open pnmadelaine opened this issue 1 year ago • 1 comments

This PR improves the Nix code in various ways.

List of changes:

  • centralize the Nix expressions in .nix/
  • use z3 4.8.5 as defined in nixpkgs
  • propagate the fstar-lib dependencies
  • better formatting using nixfmt-rfc-style
  • enable building on macOS and aarch64-linux (not tested)

I want to point out a regression in this PR: the size of the closure of F* basically doubles since propagating the dependencies brings back the OCaml compiler as a dependency. IMO this is a good trade, since compiling generated OCaml will now just work (tm). Currently, fstar-lib dependencies need to be manually imported, wich is not intuitive at all.

Also see https://github.com/NixOS/nixpkgs/pull/275924 which motivated me to do the propagation of fstar-lib dependencies.

cc @W95Psp

pnmadelaine avatar Dec 22 '23 22:12 pnmadelaine

Hi! What about splitting the derivation, with a lib output, a bin one, and the default out output (containing lib and bin)? That'd address the issues without doubling the size of the closure if one don't want to

W95Psp avatar Jul 15 '24 14:07 W95Psp