1# Version can be selected with the 'version' argument, see generic.nix.
2{
3 lib,
4 buildDunePackage,
5 ocaml,
6 csexp,
7 sexplib0,
8 callPackage,
9 ...
10}@args:
11
12let
13 # for compat with ocaml-lsp
14 version_arg = if lib.versionAtLeast ocaml.version "4.13" then { } else { version = "0.20.0"; };
15
16 inherit (callPackage ./generic.nix (args // version_arg)) src version;
17
18in
19buildDunePackage {
20 pname = "ocamlformat-rpc-lib";
21 inherit src version;
22
23 minimalOCamlVersion = "4.08";
24 duneVersion = "3";
25
26 propagatedBuildInputs = [
27 csexp
28 sexplib0
29 ];
30
31 meta = with lib; {
32 homepage = "https://github.com/ocaml-ppx/ocamlformat";
33 description = "Auto-formatter for OCaml code (RPC mode)";
34 license = licenses.mit;
35 maintainers = with maintainers; [
36 Zimmi48
37 Julow
38 ];
39 };
40}