summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/ocaml-modules/irmin/default.nix31
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/irmin/default.nix b/pkgs/development/ocaml-modules/irmin/default.nix
new file mode 100644
index 00000000000..2db57671177
--- /dev/null
+++ b/pkgs/development/ocaml-modules/irmin/default.nix
@@ -0,0 +1,31 @@
+{ lib, fetchurl, buildDunePackage
+, astring, base64, digestif, fmt, jsonm, logs, ocaml_lwt, ocamlgraph, uri
+, alcotest, hex
+}:
+
+buildDunePackage rec {
+
+  pname = "irmin";
+  version = "2.0.0";
+
+  minimumOCamlVersion = "4.06";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz";
+    sha256 = "09qffvgi5yrm3ghiywlbdhjly8xb5x5njnan213q8j033fzmf2dr";
+  };
+
+  propagatedBuildInputs = [ astring base64 digestif fmt jsonm logs ocaml_lwt ocamlgraph uri ];
+
+  checkInputs = lib.optionals doCheck [ alcotest hex ];
+
+  doCheck = true;
+
+  meta = {
+    homepage = "https://irmin.org/";
+    description = "A distributed database built on the same principles as Git";
+    license = lib.licenses.isc;
+    maintainers = [ lib.maintainers.vbgl ];
+  };
+
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 58cc306baca..1b78a08e681 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -370,6 +370,8 @@ let
 
     iri = callPackage ../development/ocaml-modules/iri { };
 
+    irmin = callPackage ../development/ocaml-modules/irmin { };
+
     jingoo = callPackage ../development/ocaml-modules/jingoo {
       pcre = ocaml_pcre;
     };