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.nix26
1 files changed, 24 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
index 24527fcf41af..69f26c5b8877 100644
--- a/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
+++ b/nixpkgs/pkgs/development/tools/ocaml/ocamlformat/generic.nix
@@ -20,6 +20,7 @@ let src =
       "0.15.0" = "0190vz59n6ma9ca1m3syl3mc8i1smj1m3d8x1jp21f710y4llfr6";
       "0.15.1" = "1x6fha495sgk4z05g0p0q3zfqm5l6xzmf6vjm9g9g7c820ym2q9a";
       "0.16.0" = "1vwjvvwha0ljc014v8jp8snki5zsqxlwd7x0dl0rg2i9kcmwc4mr";
+      "0.17.0" = "0f1lxp697yq61z8gqxjjaqd2ns8fd1vjfggn55x0gh9dx098p138";
     }."${version}";
   }
 ; in
@@ -36,12 +37,33 @@ buildDunePackage rec {
   pname = "ocamlformat";
   inherit src version;
 
-  minimumOCamlVersion = "4.06";
+  minimumOCamlVersion =
+    if lib.versionAtLeast version "0.17.0"
+    then "4.08"
+    else "4.06";
 
   useDune2 = true;
 
   buildInputs =
-    if lib.versionAtLeast version "0.15.1"
+    if lib.versionAtLeast version "0.17.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"; })
+      ocaml-migrate-parsetree-2-1
+    ]
+    else if lib.versionAtLeast version "0.15.1"
     then [
       base
       cmdliner