2021-01-11 12:49:15 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, ounit }:
|
2016-02-17 17:53:48 +00:00
|
|
|
|
2021-09-20 16:14:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.5";
|
|
|
|
pname = "ocaml${ocaml.version}-gen";
|
2016-02-17 17:53:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "c-cube";
|
|
|
|
repo = "gen";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2017-11-12 08:28:24 +00:00
|
|
|
sha256 = "14b8vg914nb0yp1hgxzm29bg692m0gqncjj43b599s98s1cwl92h";
|
2016-02-17 17:53:48 +00:00
|
|
|
};
|
|
|
|
|
2021-08-14 12:00:00 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
2021-09-20 16:14:14 +00:00
|
|
|
buildInputs = lib.optionals doCheck [ qtest ounit ];
|
2021-08-14 12:00:00 +00:00
|
|
|
strictDeps = true;
|
2016-02-17 17:53:48 +00:00
|
|
|
|
2021-09-20 16:14:14 +00:00
|
|
|
configureFlags = lib.optional doCheck "--enable-tests";
|
2017-11-12 08:28:24 +00:00
|
|
|
|
2021-09-20 16:14:14 +00:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2017-11-12 08:28:24 +00:00
|
|
|
checkTarget = "test";
|
|
|
|
|
2016-02-17 17:53:48 +00:00
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/c-cube/gen";
|
2016-02-17 17:53:48 +00:00
|
|
|
description = "Simple, efficient iterators for OCaml";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2021-09-20 16:14:14 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2016-02-17 17:53:48 +00:00
|
|
|
};
|
|
|
|
}
|