about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/earley_ocaml/default.nix
blob: 92a1eb1e5c8e16df68c1edc96c05033e3af70002 (plain) (blame)
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
{ stdenv, fetchFromGitHub, which, ocaml, findlib, ocamlbuild, earley }:

stdenv.mkDerivation rec {
  version = "1.0.2";
  name = "ocaml${ocaml.version}-earley_ocaml-${version}";
  src = fetchFromGitHub {
    owner = "rlepigre";
    repo = "ocaml-earley-ocaml";
    rev = "ocaml-earley-ocaml_${version}";
    sha256 = "0f8kr49r2xfs7cbzps4r9i92ckhwssaiydam846jrky3z5djn2jc";
  };

  buildInputs = [ which ocaml findlib ocamlbuild ];

  propagatedBuildInputs = [ earley ];

  preBuild = "make";

  createFindlibDestdir = true;

  installFlags = [ "BINDIR=$(out)/bin" ];

  meta = {
    description = "Extensible OCaml parser to be used with Earley";
    license = stdenv.lib.licenses.cecill-b;
    maintainers = [ stdenv.lib.maintainers.vbgl ];
    inherit (ocaml.meta) platforms;
    inherit (src.meta) homepage;
  };
}