about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix28
1 files changed, 22 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
index 69f26c5b8877..223ac39c6aa2 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
@@ -21,11 +21,10 @@ let src =
       "0.15.1" = "1x6fha495sgk4z05g0p0q3zfqm5l6xzmf6vjm9g9g7c820ym2q9a";
       "0.16.0" = "1vwjvvwha0ljc014v8jp8snki5zsqxlwd7x0dl0rg2i9kcmwc4mr";
       "0.17.0" = "0f1lxp697yq61z8gqxjjaqd2ns8fd1vjfggn55x0gh9dx098p138";
+      "0.18.0" = "0571kzmb1h03qj74090n3mg8wfbh29qqrkdjkai6rnl5chll86lq";
     }."${version}";
-  }
-; in
-
-let ocamlPackages =
+  };
+  ocamlPackages =
   if lib.versionAtLeast version "0.14.3"
   then ocaml-ng.ocamlPackages
   else ocaml-ng.ocamlPackages_4_07
@@ -33,7 +32,7 @@ let ocamlPackages =
 
 with ocamlPackages;
 
-buildDunePackage rec {
+buildDunePackage {
   pname = "ocamlformat";
   inherit src version;
 
@@ -45,7 +44,24 @@ buildDunePackage rec {
   useDune2 = true;
 
   buildInputs =
-    if lib.versionAtLeast version "0.17.0"
+    if lib.versionAtLeast version "0.18.0"
+    then [
+      base
+      cmdliner
+      fpath
+      odoc
+      re
+      stdio
+      uuseg
+      uutf
+      fix
+      menhir
+      dune-build-info
+      ocaml-version
+      # Changed since 0.16.0:
+      (ppxlib.override { version = "0.22.0"; })
+    ]
+    else if lib.versionAtLeast version "0.17.0"
     then [
       base
       cmdliner