summaryrefslogtreecommitdiff
path: root/2025/ocaml/flake.nix
blob: 9f27e56fcdc050ddf79e4fbc5c2cee881dc53d97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
  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 = with pkgs.ocaml-ng.ocamlPackages_5_2; [
            ocaml

            dune_3 # build system

            pkgs.opam # package manager
            findlib # library manager

            ocaml-lsp # language server
            earlybird # debug adapter
            ocamlformat # formatter

            utop # REPL

            alcotest # unit test framework
            bisect_ppx # test coverage

            odoc # documentation generator

            menhir # parser generator library
            janeStreet.re2 # regular expression library
            fmt # pretty printing library
            cmdliner # command line library
          ];
          sysTools = with pkgs; [
            go-task
            gh
          ];
        in
        pkgs.mkShell {
          buildInputs = ocamlPackages ++ sysTools;
        };
    };
}