about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/seq/default.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/seq/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix b/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix
new file mode 100644
index 000000000000..7a50d1517db8
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/seq/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
+
+stdenv.mkDerivation ({
+  version = "0.1";
+  name = "ocaml${ocaml.version}-seq-0.1";
+
+  meta = {
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    homepage = "https://github.com/c-cube/seq";
+    inherit (ocaml.meta) platforms;
+  };
+
+} // (if stdenv.lib.versionOlder ocaml.version "4.07" then {
+
+  src = fetchFromGitHub {
+    owner = "c-cube";
+    repo = "seq";
+    rev = "0.1";
+    sha256 = "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv";
+  };
+
+  buildInputs = [ ocaml findlib ocamlbuild ];
+
+  createFindlibDestdir = true;
+
+  meta.description = "Compatibility package for OCaml’s standard iterator type starting from 4.07";
+
+} else {
+
+  src = ./src-base;
+
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/seq
+    cp META $out/lib/ocaml/${ocaml.version}/site-lib/seq
+  '';
+
+  meta.description = "dummy backward-compatibility package for iterators";
+
+}))