2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchzip, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:
|
2016-11-04 18:06:45 +00:00
|
|
|
|
2021-01-11 12:49:15 +00:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.02"
|
2017-07-15 12:13:14 +00:00
|
|
|
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 08:43:28 +00:00
|
|
|
name = "ocaml${ocaml.version}-sedlex-${version}";
|
2019-08-16 12:58:46 +00:00
|
|
|
version = "1.99.5";
|
2016-11-04 18:06:45 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2019-08-16 12:58:46 +00:00
|
|
|
url = "https://github.com/ocaml-community/sedlex/archive/fb84e1766fc4b29e79ec40029ffee5cdb37b392f.tar.gz";
|
|
|
|
sha256 = "0phnqyn6mpv5byr1kkphl24y9q9fb2k3xg9yb457h5816q6ya72n";
|
2016-11-04 18:06:45 +00:00
|
|
|
};
|
|
|
|
|
2020-04-06 14:48:42 +00:00
|
|
|
buildInputs = [ ocaml findlib ];
|
2016-11-04 18:06:45 +00:00
|
|
|
|
2020-04-06 14:48:42 +00:00
|
|
|
propagatedBuildInputs = [ gen ocaml-migrate-parsetree ppx_tools_versioned ];
|
2016-11-04 18:06:45 +00:00
|
|
|
|
|
|
|
buildFlags = [ "all" "opt" ];
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-04-01 07:06:14 +00:00
|
|
|
dontStrip = true;
|
|
|
|
|
2016-11-04 18:06:45 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/ocaml-community/sedlex";
|
2016-11-04 18:06:45 +00:00
|
|
|
description = "An OCaml lexer generator for Unicode";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.mit;
|
2016-11-04 18:06:45 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2021-01-11 12:49:15 +00:00
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2016-11-04 18:06:45 +00:00
|
|
|
};
|
|
|
|
}
|