diff options
| author | DJ O'Leary <dijitol@proton.me> | 2025-03-06 02:10:32 +0100 |
|---|---|---|
| committer | DJ O'Leary <dijitol@proton.me> | 2025-03-06 02:10:32 +0100 |
| commit | 0db069e6f6992a544f9dda7657cb6367113a8fcf (patch) | |
| tree | 21b4163ced89e6ed4bfb43744d351086ff801d2f /2024/OCaml/flake.nix | |
| parent | 2996ab249a6ae29b2644061c366f88c2157652f2 (diff) | |
feat: Replace OCaml shell with flake
Diffstat (limited to '2024/OCaml/flake.nix')
| -rw-r--r-- | 2024/OCaml/flake.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/2024/OCaml/flake.nix b/2024/OCaml/flake.nix new file mode 100644 index 0000000..74a5dc6 --- /dev/null +++ b/2024/OCaml/flake.nix @@ -0,0 +1,44 @@ +{ + description = "Advent of Code 2024: OCaml"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = + { nixpkgs, ... }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + devShells.x86_64-linux.default = + let + ocamlPackages = pkgs.ocaml-ng.ocamlPackages_5_2; + in + pkgs.mkShell { + # build tools + nativeBuildInputs = with ocamlPackages; [ + pkgs.opam + ocaml + findlib + dune_3 + ]; + # dependencies + buildInputs = with ocamlPackages; [ + bisect_ppx + findlib + menhir + ocaml-lsp + earlybird + ocamlformat + ocamlgraph + odoc + ounit2 + re2 + utop + + pkgs.gh # GitHub CLI + ]; + }; + }; +} |
