about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorvbgl <vbgl@users.noreply.github.com>2016-02-19 18:14:47 +0100
committervbgl <vbgl@users.noreply.github.com>2016-02-19 18:14:47 +0100
commit5ed9176c52e4ceed2755a19b3e8357a0772de8ff (patch)
tree23fa9aaac8eac80f87b45d232904771c9667a53a /pkgs/development
parentd3482be0e5dc9fdc6a8d1983747d0b102bac8f10 (diff)
parent26415f963aec8dee29f8dab6ca1b36124f8b0abc (diff)
downloadnixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.tar
nixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.tar.gz
nixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.tar.bz2
nixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.tar.lz
nixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.tar.xz
nixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.tar.zst
nixlib-5ed9176c52e4ceed2755a19b3e8357a0772de8ff.zip
Merge pull request #13077 from wizeman/u/ocaml-packages
Add ocamlPackages.{gen,sequence,containers}
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/ocaml-modules/containers/default.nix47
-rw-r--r--pkgs/development/ocaml-modules/gen/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/sequence/default.nix38
3 files changed, 110 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/containers/default.nix b/pkgs/development/ocaml-modules/containers/default.nix
new file mode 100644
index 000000000000..5c2447614ada
--- /dev/null
+++ b/pkgs/development/ocaml-modules/containers/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, cppo, gen, sequence, qtest, ounit }:
+
+let version = "0.15"; in
+
+stdenv.mkDerivation {
+  name = "ocaml-containers-${version}";
+
+  src = fetchFromGitHub {
+    owner = "c-cube";
+    repo = "ocaml-containers";
+    rev = "${version}";
+    sha256 = "13mdl8jp4ymg1wip7lqmh4224x4jnji3frm1ik55vvm3ac8caqng";
+  };
+
+  buildInputs = [ ocaml findlib cppo gen sequence qtest ounit ];
+
+  configureFlags = [
+    "--enable-unix"
+    "--enable-thread"
+    "--enable-bigarray"
+    "--enable-advanced"
+    "--enable-tests"
+    "--disable-bench"
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = https://github.com/c-cube/ocaml-containers;
+    description = "A modular standard library focused on data structures";
+    longDescription = ''
+      Containers is a standard library (BSD license) focused on data structures,
+      combinators and iterators, without dependencies on unix. Every module is
+      independent and is prefixed with 'CC' in the global namespace. Some modules
+      extend the stdlib (e.g. CCList provides safe map/fold_right/append, and
+      additional functions on lists).
+
+      It also features optional libraries for dealing with strings, and
+      helpers for unix and threads.
+    '';
+    license = stdenv.lib.licenses.bsd2;
+    platforms = ocaml.meta.platforms;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/gen/default.nix b/pkgs/development/ocaml-modules/gen/default.nix
new file mode 100644
index 000000000000..0b8f4253e76c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/gen/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, qtest, ounit }:
+
+let version = "0.3"; in
+
+stdenv.mkDerivation {
+  name = "ocaml-gen-${version}";
+
+  src = fetchFromGitHub {
+    owner = "c-cube";
+    repo = "gen";
+    rev = "${version}";
+    sha256 = "0xrnkcfa5q86ammf49j5hynw5563x5sa2mk7vqf7g097j1szif72";
+  };
+
+  buildInputs = [ ocaml findlib qtest ounit ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = https://github.com/c-cube/gen;
+    description = "Simple, efficient iterators for OCaml";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = ocaml.meta.platforms;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/sequence/default.nix b/pkgs/development/ocaml-modules/sequence/default.nix
new file mode 100644
index 000000000000..d9c49ece60d7
--- /dev/null
+++ b/pkgs/development/ocaml-modules/sequence/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, qtest, ounit }:
+
+let version = "0.6"; in
+
+stdenv.mkDerivation {
+  name = "ocaml-sequence-${version}";
+
+  src = fetchFromGitHub {
+    owner = "c-cube";
+    repo = "sequence";
+    rev = "${version}";
+    sha256 = "0mky5qas3br2x4y14dzcky212z624ydqnx8mw8w00x0c1xjpafkb";
+  };
+
+  buildInputs = [ ocaml findlib qtest ounit ];
+
+  configureFlags = [
+    "--enable-tests"
+  ];
+
+  doCheck = true;
+  checkTarget = "test";
+
+  createFindlibDestdir = true;
+
+  meta = {
+    homepage = https://github.com/c-cube/sequence;
+    description = "Simple sequence (iterator) datatype and combinators";
+    longDescription = ''
+      Simple sequence datatype, intended to transfer a finite number of
+      elements from one data structure to another. Some transformations on sequences,
+      like `filter`, `map`, `take`, `drop` and `append` can be performed before the
+      sequence is iterated/folded on.
+    '';
+    license = stdenv.lib.licenses.bsd2;
+    platforms = ocaml.meta.platforms;
+  };
+}