1{ stdenv, fetchzip, ocaml, findlib, gen, ppx_tools_versioned }:
2
3if !stdenv.lib.versionAtLeast ocaml.version "4.02"
4then throw "sedlex is not available for OCaml ${ocaml.version}"
5else
6
7stdenv.mkDerivation rec {
8 name = "ocaml${ocaml.version}-sedlex-${version}";
9 version = "1.99.4";
10
11 src = fetchzip {
12 url = "http://github.com/alainfrisch/sedlex/archive/v${version}.tar.gz";
13 sha256 = "1b7nqxyfcz8i7m4b8zil2rn6ygh2czy26f9v64xnxn8r0hy9sh1m";
14 };
15
16 buildInputs = [ ocaml findlib ppx_tools_versioned ];
17
18 propagatedBuildInputs = [ gen ];
19
20 buildFlags = [ "all" "opt" ];
21
22 createFindlibDestdir = true;
23
24 dontStrip = true;
25
26 meta = {
27 homepage = https://github.com/alainfrisch/sedlex;
28 description = "An OCaml lexer generator for Unicode";
29 license = stdenv.lib.licenses.mit;
30 inherit (ocaml.meta) platforms;
31 maintainers = [ stdenv.lib.maintainers.vbgl ];
32 };
33}