summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/readline/default.nix
blob: b16aa5cff7f067d00d7d3d6dd158877b08332348 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  lib,
  buildDunePackage,
  fetchFromGitLab,
  readline,
}:

buildDunePackage {
  pname = "readline";
  version = "0.2";

  minimalOCamlVersion = "4.14";

  src = fetchFromGitLab {
    domain = "gitlab.inria.fr";
    owner = "acg";
    repo = "dev/readline-ocaml";
    tag = "v0.2";
    hash = "sha256-qWxciodgINCFCxAVLdoU4z+ypWPYjrUwq8pU80saclw=";
  };

  patches = [ ./dune.patch ];

  preConfigure = ''
    echo "(${lib.getOutput "dev" readline}/include)" > src/iflags.sexp
    echo "(-L${lib.getOutput "lib" readline}/lib -lreadline)" > src/lflags.sexp
  '';

  propagatedBuildInputs = [ readline ];

  meta = {
    description = "OCaml bindings for GNU Readline";
    homepage = "https://acg.gitlabpages.inria.fr/dev/readline-ocaml/readline/index.html";
    license = lib.licenses.cecill20;
    maintainers = [ lib.maintainers.tournev ];
  };
}