1{
2 lib,
3 buildDunePackage,
4 fetchFromGitLab,
5 readline,
6}:
7
8buildDunePackage {
9 pname = "readline";
10 version = "0.2";
11
12 minimalOCamlVersion = "4.14";
13
14 src = fetchFromGitLab {
15 domain = "gitlab.inria.fr";
16 owner = "acg";
17 repo = "dev/readline-ocaml";
18 tag = "v0.2";
19 hash = "sha256-qWxciodgINCFCxAVLdoU4z+ypWPYjrUwq8pU80saclw=";
20 };
21
22 patches = [ ./dune.patch ];
23
24 preConfigure = ''
25 echo "(${lib.getOutput "dev" readline}/include)" > src/iflags.sexp
26 echo "(-L${lib.getOutput "lib" readline}/lib -lreadline)" > src/lflags.sexp
27 '';
28
29 propagatedBuildInputs = [ readline ];
30
31 meta = {
32 description = "OCaml bindings for GNU Readline";
33 homepage = "https://acg.gitlabpages.inria.fr/dev/readline-ocaml/readline/index.html";
34 license = lib.licenses.cecill20;
35 maintainers = [ lib.maintainers.tournev ];
36 };
37}