summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/gen/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/gen/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/gen/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/gen/default.nix b/pkgs/development/ocaml-modules/gen/default.nix
new file mode 100644
index 00000000000..1c12f3ac5f8
--- /dev/null
+++ b/pkgs/development/ocaml-modules/gen/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, ounit }:
+
+stdenv.mkDerivation rec {
+  version = "0.5";
+  pname = "ocaml${ocaml.version}-gen";
+
+  src = fetchFromGitHub {
+    owner = "c-cube";
+    repo = "gen";
+    rev = version;
+    sha256 = "14b8vg914nb0yp1hgxzm29bg692m0gqncjj43b599s98s1cwl92h";
+  };
+
+  nativeBuildInputs = [ ocaml findlib ocamlbuild ];
+  buildInputs = lib.optionals doCheck [ qtest ounit ];
+  strictDeps = true;
+
+  configureFlags = lib.optional doCheck "--enable-tests";
+
+  doCheck = lib.versionAtLeast ocaml.version "4.08";
+  checkTarget = "test";
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = "https://github.com/c-cube/gen";
+    description = "Simple, efficient iterators for OCaml";
+    license = lib.licenses.bsd3;
+    inherit (ocaml.meta) platforms;
+  };
+}