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

Use the correct version of ocamlformat in nix shell #124

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
inputs = {
karamel.url = "github:FStarLang/karamel";
flake-utils.follows = "karamel/flake-utils";
# Need to use same-ish nixpkgs version as karamel to gt a compatible ocaml
# toolchain
nixpkgs.follows = "karamel/nixpkgs";
# Need a recent nixpkgs to get ocamlformat 0.26.2
recent_nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";

charon.url = "github:AeneasVerif/charon";
charon.inputs.nixpkgs.follows = "nixpkgs";
Expand All @@ -11,11 +15,13 @@
{ self
, flake-utils
, nixpkgs
, recent_nixpkgs
, ...
} @ inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
recent_pkgs = import recent_nixpkgs { inherit system; };

karamel = inputs.karamel.packages.${system}.default;
fstar = inputs.karamel.inputs.fstar.packages.${system}.default;
Expand Down Expand Up @@ -87,7 +93,7 @@
packages = [
pkgs.clang-tools # For clang-format
pkgs.ocamlPackages.ocaml
pkgs.ocamlPackages.ocamlformat
recent_pkgs.ocamlPackages.ocamlformat_0_26_2
pkgs.ocamlPackages.menhir
# ocaml-lsp's version must match the ocaml version used. Pinning
# this here to save me a headache.
Expand Down