From fcedfddf00b3f994e4f4e40332ac7fc192c63244 Mon Sep 17 00:00:00 2001 From: polwex Date: Sun, 5 Oct 2025 21:56:51 +0700 Subject: claude is gud --- flake.nix | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..940d5fb --- /dev/null +++ b/flake.nix @@ -0,0 +1,63 @@ +{ + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + ocaml.url = "github:nix-ocaml/nix-overlays"; + ocaml.inputs.nixpkgs.follows = "nixpkgs"; + # it's broken wtf + # lsp.url = "github:ocaml/ocaml-lsp"; + # lsp.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { + self, + nixpkgs, + ocaml, + flake-utils, + }: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = import nixpkgs { + inherit system; + overlays = [ + ocaml.overlays.default + (final: prev: { + # This ensures we consistently use one version of ocaml packages + ocamlPackages = prev.ocaml-ng.ocamlPackages_5_3; + ocaml = prev.ocaml-ng.ocamlPackages_5_3.ocaml; + }) + ]; + }; + in { + devShells.default = pkgs.mkShell rec { + buildInputs = + nativeBuildInputs + ++ (with pkgs.ocamlPackages; [utop]); + nativeBuildInputs = with pkgs.ocamlPackages; [ + pkgs.zig_0_14 + pkgs.sqlite + pkgs.dune_3 + pkgs.ocaml + + pkgs.opam + findlib + ocamlformat + # + zarith + cmdliner + logs + alcotest + qcheck + qcheck-alcotest + landmarks + + ctypes + ctypes-foreign + # + ocaml-lsp + eio_main + # http server + piaf + ]; + }; + }); +} -- cgit v1.2.3