about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/elpi/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/elpi/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/elpi/default.nix20
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/development/ocaml-modules/elpi/default.nix b/pkgs/development/ocaml-modules/elpi/default.nix
index 40d1c3d9b31c6..3b133407c30a5 100644
--- a/pkgs/development/ocaml-modules/elpi/default.nix
+++ b/pkgs/development/ocaml-modules/elpi/default.nix
@@ -1,13 +1,18 @@
 { lib
 , buildDunePackage, camlp5
+, ocaml
+, menhir, menhirLib
+, stdlib-shims
 , re, perl, ncurses
 , ppxlib, ppx_deriving
 , ppxlib_0_15, ppx_deriving_0_15
 , coqPackages
-, version ? "1.14.1"
+, version ? if lib.versionAtLeast ocaml.version "4.07" then "1.15.2" else "1.14.1"
 }:
 with lib;
 let fetched = coqPackages.metaFetch ({
+    release."1.15.2".sha256 = "sha256-XgopNP83POFbMNyl2D+gY1rmqGg03o++Ngv3zJfCn2s=";
+    release."1.15.0".sha256 = "sha256:1ngdc41sgyzyz3i3lkzjhnj66gza5h912virkh077dyv17ysb6ar";
     release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis=";
     release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r";
     release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka";
@@ -23,11 +28,16 @@ buildDunePackage rec {
   pname = "elpi";
   inherit (fetched) version src;
 
-  minimumOCamlVersion = "4.04";
+  minimalOCamlVersion = "4.04";
 
-  buildInputs = [ perl ncurses ];
+  buildInputs = [ perl ncurses ]
+  ++ optional (versionAtLeast version "1.15" || version == "dev") menhir;
 
-  propagatedBuildInputs = [ camlp5 re ]
+  propagatedBuildInputs = [ re stdlib-shims ]
+  ++ (if versionAtLeast version "1.15" || version == "dev"
+     then [ menhirLib ]
+     else [ camlp5 ]
+  )
   ++ (if lib.versionAtLeast version "1.13" || version == "dev"
      then [ ppxlib ppx_deriving ]
      else [ ppxlib_0_15 ppx_deriving_0_15 ]
@@ -43,6 +53,4 @@ buildDunePackage rec {
   postPatch = ''
     substituteInPlace elpi_REPL.ml --replace "tput cols" "${ncurses}/bin/tput cols"
   '';
-
-  useDune2 = true;
 }