1 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4 }:
6 if lib.versionAtLeast ocaml.version "4.02" then {
8 sha256 = "08yf2x9a52l2y4savjqfjd2xy4pjd1rpla2ylrr9qrz1drpfw4ic";
11 sha256 = "0cmscxcmcxhlshh4jd0lzw5ffzns12x3bj7h27smbc8waxkwffhl";
15 stdenv.mkDerivation rec {
16 name = "ocaml${ocaml.version}-${pname}-${version}";
17 inherit (param) version;
19 src = fetchFromGitHub {
23 inherit (param) sha256;
26 createFindlibDestdir = true;
28 nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ];
29 propagatedBuildInputs = [ camlp4 ];
33 buildFlags = [ "all" "all.opt" ];
36 inherit (src.meta) homepage;
37 description = "A lexer generator for Unicode and OCaml";
38 license = lib.licenses.mit;
39 inherit (ocaml.meta) platforms;
40 maintainers = [ lib.maintainers.roconnor ];