1 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, ounit }:
3 stdenv.mkDerivation rec {
5 pname = "ocaml${ocaml.version}-gen";
7 src = fetchFromGitHub {
11 sha256 = "14b8vg914nb0yp1hgxzm29bg692m0gqncjj43b599s98s1cwl92h";
14 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
15 buildInputs = lib.optionals doCheck [ qtest ounit ];
18 configureFlags = lib.optional doCheck "--enable-tests";
20 doCheck = lib.versionAtLeast ocaml.version "4.08";
23 createFindlibDestdir = true;
26 homepage = "https://github.com/c-cube/gen";
27 description = "Simple, efficient iterators for OCaml";
28 license = lib.licenses.bsd3;
29 inherit (ocaml.meta) platforms;