2017-07-15 13:13:14 +01:00
|
|
|
{ stdenv, fetchzip, ocaml, findlib, gen, ppx_tools_versioned }:
|
2016-11-04 18:06:45 +00:00
|
|
|
|
2017-07-15 13:13:14 +01:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
then throw "sedlex is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2016-11-04 18:06:45 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-07-08 09:43:28 +01:00
|
|
|
name = "ocaml${ocaml.version}-sedlex-${version}";
|
2017-07-15 13:13:14 +01:00
|
|
|
version = "1.99.4";
|
2016-11-04 18:06:45 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "http://github.com/alainfrisch/sedlex/archive/v${version}.tar.gz";
|
2017-07-15 13:13:14 +01:00
|
|
|
sha256 = "1b7nqxyfcz8i7m4b8zil2rn6ygh2czy26f9v64xnxn8r0hy9sh1m";
|
2016-11-04 18:06:45 +00:00
|
|
|
};
|
|
|
|
|
2017-07-15 13:13:14 +01:00
|
|
|
buildInputs = [ ocaml findlib ppx_tools_versioned ];
|
2016-11-04 18:06:45 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ gen ];
|
|
|
|
|
|
|
|
buildFlags = [ "all" "opt" ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-04-01 08:06:14 +01:00
|
|
|
dontStrip = true;
|
|
|
|
|
2016-11-04 18:06:45 +00:00
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/alainfrisch/sedlex;
|
|
|
|
description = "An OCaml lexer generator for Unicode";
|
|
|
|
license = stdenv.lib.licenses.mit;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|