2 , buildDunePackage, camlp5
9 , ppxlib_0_15, ppx_deriving_0_15
11 , version ? if lib.versionAtLeast ocaml.version "4.08" then "1.16.5"
12 else if lib.versionAtLeast ocaml.version "4.07" then "1.15.2" else "1.14.1"
15 let fetched = coqPackages.metaFetch ({
16 release."1.16.5".sha256 = "sha256-tKX5/cVPoBeHiUe+qn7c5FIRYCwY0AAukN7vSd/Nz9A=";
17 release."1.15.2".sha256 = "sha256-XgopNP83POFbMNyl2D+gY1rmqGg03o++Ngv3zJfCn2s=";
18 release."1.15.0".sha256 = "sha256:1ngdc41sgyzyz3i3lkzjhnj66gza5h912virkh077dyv17ysb6ar";
19 release."1.14.1".sha256 = "sha256-BZPVL8ymjrE9kVGyf6bpc+GA2spS5JBpkUtZi04nPis=";
20 release."1.13.7".sha256 = "10fnwz30bsvj7ii1vg4l1li5pd7n0qqmwj18snkdr5j9gk0apc1r";
21 release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka";
22 release."1.13.1".sha256 = "12a9nbdvg9gybpw63lx3nw5wnxfznpraprb0wj3l68v1w43xq044";
23 release."1.13.0".sha256 = "0dmzy058m1mkndv90byjaik6lzzfk3aaac7v84mpmkv6my23bygr";
24 release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is";
25 release."1.11.4".sha256 = "1m0jk9swcs3jcrw5yyw5343v8mgax238cjb03s8gc4wipw1fn9f5";
26 releaseRev = v: "v${v}";
27 location = { domain = "github.com"; owner = "LPCIC"; repo = "elpi"; };
30 buildDunePackage rec {
32 inherit (fetched) version src;
34 patches = lib.optional (versionAtLeast version "1.16" || version == "dev")
37 minimalOCamlVersion = "4.04";
39 buildInputs = [ perl ncurses ]
40 ++ optional (versionAtLeast version "1.15" || version == "dev") menhir
41 ++ optional (versionAtLeast version "1.16" || version == "dev") atdgen;
43 propagatedBuildInputs = [ re stdlib-shims ]
44 ++ (if versionAtLeast version "1.15" || version == "dev"
48 ++ (if lib.versionAtLeast version "1.13" || version == "dev"
49 then [ ppxlib ppx_deriving ]
50 else [ ppxlib_0_15 ppx_deriving_0_15 ]
54 description = "Embeddable λProlog Interpreter";
55 license = licenses.lgpl21Plus;
56 maintainers = [ maintainers.vbgl ];
57 homepage = "https://github.com/LPCIC/elpi";
61 substituteInPlace elpi_REPL.ml --replace "tput cols" "${ncurses}/bin/tput cols"