1 # Version can be selected with the 'version' argument, see generic.nix.
12 let inherit (callPackage ./generic.nix args) src version library_deps;
15 lib.throwIf (lib.versionAtLeast ocaml.version "5.0" && !lib.versionAtLeast version "0.23")
16 "ocamlformat ${version} is not available for OCaml ${ocaml.version}"
19 pname = "ocamlformat";
22 minimalOCamlVersion = "4.08";
25 if lib.versionAtLeast version "0.25.1" then [ ] else [ menhir ];
27 buildInputs = [ re ] ++ library_deps
28 ++ lib.optionals (lib.versionAtLeast version "0.25.1")
29 [ (ocamlformat-lib.override { inherit version; }) ];
32 homepage = "https://github.com/ocaml-ppx/ocamlformat";
33 description = "Auto-formatter for OCaml code";
34 maintainers = with lib.maintainers; [ Zimmi48 marsam Julow ];
35 license = lib.licenses.mit;
36 mainProgram = "ocamlformat";