2021-01-15 22:18:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, ounit }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.5";
|
|
|
|
pname = "ocaml${ocaml.version}-gen";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "c-cube";
|
|
|
|
repo = "gen";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "14b8vg914nb0yp1hgxzm29bg692m0gqncjj43b599s98s1cwl92h";
|
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
2021-09-28 08:13:01 +00:00
|
|
|
buildInputs = lib.optionals doCheck [ qtest ounit ];
|
2021-09-18 10:52:07 +00:00
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
configureFlags = lib.optional doCheck "--enable-tests";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2020-04-24 23:36:52 +00:00
|
|
|
checkTarget = "test";
|
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/c-cube/gen";
|
|
|
|
description = "Simple, efficient iterators for OCaml";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2021-09-28 08:13:01 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|