summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-16 08:39:46 +0100
committerGitHub <noreply@github.com>2021-02-16 08:39:46 +0100
commitc59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af (patch)
treee519ccb3b8c08ea58c3476ae81e07e388389c3da
parent857299448666484f401202a6fbcd1454e33881bf (diff)
downloadnixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.tar
nixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.tar.gz
nixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.tar.bz2
nixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.tar.lz
nixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.tar.xz
nixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.tar.zst
nixpkgs-c59b8ce9c3260ee67aca9eee7d3d6dd5c68e96af.zip
ocamlPackages: irmin 2.2.0 → 2.4.0; git: 2.13 → 3.2.0; and related changes (#110184)
* ocamlPackages.index: 1.2.1 -> 1.3.0

* ocamlPackages.decompress: 0.9.0 -> 1.2.0

* ocamlPackages.imagelib-unix: remove at 20191011

* ocamlPackages.imagelib: 20191011 -> 20200929

* ocamlPackages.duff: 0.2 -> 0.3

* ocamlPackages.carton{,-git,-lwt}: init at 0.2.0

* ocamlPackages.encore: 0.5 → 0.7

* ocamlPackages.git-http: remove at 2.1.3

* ocamlPackages.git-unix: move into git directory

* ocamlPackages.irmin-mem: remove at 2.2.0

Replaced by irmin.mem contained in ocamlPackages.irmin >= 2.4.0

* ocamlPackages.git*: 2.1.3 -> 3.2.0

ocamlPackages.git-unix: 2.1.3 -> 3.2.0

ocamlPackages.git-cohttp{,-unix,-mirage}: init at 3.2.0

* ocamlPackages.irmin*: 2.2.0 -> 2.4.0

ocamlPackages.irmin-containers: init at 2.4.0
ocamlPackages.irmin-layers: init at 2.4.0
ocamlPackages.irmin-mirage: init at 2.4.0
ocamlPackages.irmin-mirage-git: init at 2.4.0
ocamlPackages.irmin-mirage-graphql: init at 2.4.0

* ocamlPackages.wodan-irmin: mark as broken
-rw-r--r--pkgs/development/ocaml-modules/carton/default.nix66
-rw-r--r--pkgs/development/ocaml-modules/carton/git.nix28
-rw-r--r--pkgs/development/ocaml-modules/carton/lwt.nix46
-rw-r--r--pkgs/development/ocaml-modules/decompress/default.nix15
-rw-r--r--pkgs/development/ocaml-modules/duff/default.nix19
-rw-r--r--pkgs/development/ocaml-modules/encore/default.nix11
-rw-r--r--pkgs/development/ocaml-modules/git-http/default.nix15
-rw-r--r--pkgs/development/ocaml-modules/git-unix/default.nix20
-rw-r--r--pkgs/development/ocaml-modules/git/cohttp-mirage.nix18
-rw-r--r--pkgs/development/ocaml-modules/git/cohttp-unix.nix17
-rw-r--r--pkgs/development/ocaml-modules/git/cohttp.nix19
-rw-r--r--pkgs/development/ocaml-modules/git/default.nix18
-rw-r--r--pkgs/development/ocaml-modules/git/unix.nix44
-rw-r--r--pkgs/development/ocaml-modules/imagelib/default.nix24
-rw-r--r--pkgs/development/ocaml-modules/imagelib/unix.nix8
-rw-r--r--pkgs/development/ocaml-modules/index/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/irmin/chunk.nix4
-rw-r--r--pkgs/development/ocaml-modules/irmin/containers.nix27
-rw-r--r--pkgs/development/ocaml-modules/irmin/default.nix23
-rw-r--r--pkgs/development/ocaml-modules/irmin/git.nix26
-rw-r--r--pkgs/development/ocaml-modules/irmin/http.nix4
-rw-r--r--pkgs/development/ocaml-modules/irmin/layers.nix21
-rw-r--r--pkgs/development/ocaml-modules/irmin/mem.nix21
-rw-r--r--pkgs/development/ocaml-modules/irmin/mirage-git.nix27
-rw-r--r--pkgs/development/ocaml-modules/irmin/mirage-graphql.nix21
-rw-r--r--pkgs/development/ocaml-modules/irmin/mirage.nix15
-rw-r--r--pkgs/development/ocaml-modules/irmin/pack.nix9
-rw-r--r--pkgs/development/ocaml-modules/irmin/ppx.nix15
-rw-r--r--pkgs/development/ocaml-modules/irmin/test.nix8
-rw-r--r--pkgs/development/ocaml-modules/irmin/unix.nix12
-rw-r--r--pkgs/development/ocaml-modules/wodan/irmin.nix10
-rw-r--r--pkgs/top-level/ocaml-packages.nix28
32 files changed, 514 insertions, 147 deletions
diff --git a/pkgs/development/ocaml-modules/carton/default.nix b/pkgs/development/ocaml-modules/carton/default.nix
new file mode 100644
index 00000000000..5bf7be4e779
--- /dev/null
+++ b/pkgs/development/ocaml-modules/carton/default.nix
@@ -0,0 +1,66 @@
+{ lib, buildDunePackage, fetchurl
+, ke, duff, decompress, cstruct, optint, bigstringaf, stdlib-shims
+, bigarray-compat, checkseum, logs, psq, fmt
+, result, rresult, fpath, base64, bos, digestif, mmap, alcotest
+, crowbar, alcotest-lwt, lwt, findlib, mirage-flow, cmdliner
+}:
+
+buildDunePackage rec {
+  pname = "carton";
+  version = "0.2.0";
+
+  useDune2 = true;
+  minimumOCamlVersion = "4.08";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/ocaml-git/releases/download/${pname}-v${version}/${pname}-${pname}-v${version}.tbz";
+    sha256 = "0gfns4a9p9540kijccsg52yzyn3jfvi737mb0g71yazyc89dqwhn";
+  };
+
+  # remove changelogs for mimic and the git* packages
+  postPatch = ''
+    rm CHANGES.md CHANGES.mimic.md
+  '';
+
+  buildInputs = [
+    cmdliner
+    digestif
+    mmap
+    result
+    rresult
+    fpath
+    bos
+  ];
+  propagatedBuildInputs = [
+    ke
+    duff
+    decompress
+    cstruct
+    optint
+    bigstringaf
+    stdlib-shims
+    bigarray-compat
+    checkseum
+    logs
+    psq
+    fmt
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    base64
+    alcotest
+    alcotest-lwt
+    crowbar
+    lwt
+    findlib
+    mirage-flow
+  ];
+
+  meta = with lib; {
+    description = "Implementation of PACKv2 file in OCaml";
+    license = licenses.mit;
+    homepage = "https://github.com/mirage/ocaml-git";
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/carton/git.nix b/pkgs/development/ocaml-modules/carton/git.nix
new file mode 100644
index 00000000000..ef41ff2b594
--- /dev/null
+++ b/pkgs/development/ocaml-modules/carton/git.nix
@@ -0,0 +1,28 @@
+{ buildDunePackage, carton, carton-lwt
+, bigarray-compat, bigstringaf, lwt, fpath, result
+, mmap, fmt, decompress, astring
+, alcotest, alcotest-lwt, cstruct, logs
+, mirage-flow, rresult, ke
+}:
+
+buildDunePackage {
+  pname = "carton-git";
+
+  inherit (carton) version src useDune2 minimumOCamlVersion postPatch;
+
+  propagatedBuildInputs = [
+    carton
+    carton-lwt
+    bigarray-compat
+    bigstringaf
+    lwt
+    fpath
+    result
+    mmap
+    fmt
+    decompress
+    astring
+  ];
+
+  inherit (carton) meta;
+}
diff --git a/pkgs/development/ocaml-modules/carton/lwt.nix b/pkgs/development/ocaml-modules/carton/lwt.nix
new file mode 100644
index 00000000000..024ff51559e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/carton/lwt.nix
@@ -0,0 +1,46 @@
+{ buildDunePackage, carton
+, lwt, decompress, optint, bigstringaf
+, alcotest, alcotest-lwt, cstruct, fmt, logs
+, mirage-flow, result, rresult, bigarray-compat
+, ke, base64, bos, checkseum, digestif, fpath, mmap
+, stdlib-shims
+, git-binary # pkgs.git
+}:
+
+buildDunePackage {
+  pname = "carton-lwt";
+
+  inherit (carton) version src useDune2 minimumOCamlVersion postPatch;
+
+  propagatedBuildInputs = [
+    carton
+    lwt
+    decompress
+    optint
+    bigstringaf
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    git-binary
+    alcotest
+    alcotest-lwt
+    cstruct
+    fmt
+    logs
+    mirage-flow
+    result
+    rresult
+    bigarray-compat
+    ke
+    base64
+    bos
+    checkseum
+    digestif
+    fpath
+    mmap
+    stdlib-shims
+  ];
+
+  inherit (carton) meta;
+}
diff --git a/pkgs/development/ocaml-modules/decompress/default.nix b/pkgs/development/ocaml-modules/decompress/default.nix
index 067fac33d45..f53e166c662 100644
--- a/pkgs/development/ocaml-modules/decompress/default.nix
+++ b/pkgs/development/ocaml-modules/decompress/default.nix
@@ -1,22 +1,23 @@
 { lib, fetchurl, buildDunePackage
-, checkseum, cmdliner
-, alcotest, bos, camlzip, mmap, re
+, checkseum, bigarray-compat, optint
+, bigstringaf, alcotest, hxd, camlzip, base64
 }:
 
 buildDunePackage rec {
-  version = "0.9.0";
+  version = "1.2.0";
   pname = "decompress";
 
+  minimumOCamlVersion = "4.07";
+
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/decompress/releases/download/v${version}/decompress-v${version}.tbz";
-    sha256 = "0fryhcvv96vfca51c7kqdn3n3canqsbbvfbi75ya6lca4lmpipbh";
+    sha256 = "1c3sq9a6kpzl0pj3gmg7w18ssjjl70yv0r3l7qjprcncjx23v62i";
   };
 
-  buildInputs = [ cmdliner ];
-  propagatedBuildInputs = [ checkseum ];
-  checkInputs = lib.optionals doCheck [ alcotest bos camlzip mmap re ];
+  propagatedBuildInputs = [ optint bigarray-compat checkseum ];
+  checkInputs = [ alcotest bigstringaf hxd camlzip base64 ];
   doCheck = true;
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/duff/default.nix b/pkgs/development/ocaml-modules/duff/default.nix
index 8c9dad42fd7..64a32d179d5 100644
--- a/pkgs/development/ocaml-modules/duff/default.nix
+++ b/pkgs/development/ocaml-modules/duff/default.nix
@@ -1,24 +1,29 @@
 { lib, fetchurl, buildDunePackage
-, cstruct, fmt
-, bos, cmdliner, fpath, logs
-, alcotest
+, stdlib-shims, bigarray-compat, fmt
+, alcotest, hxd, crowbar, bigstringaf
 }:
 
 buildDunePackage rec {
   pname = "duff";
-  version = "0.2";
+  version = "0.3";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/duff/releases/download/v${version}/duff-v${version}.tbz";
-    sha256 = "0bi081w4349cqc1n9jsjh1lrcqlnv3nycmvh9fniscv8lz1c0gjq";
+    sha256 = "1lb67yxk93ifj94p1i3swjbnj5xy8j6xzs72bwvq6cffx5xykznm";
   };
 
-  buildInputs = [ bos cmdliner fpath logs ] ++ lib.optional doCheck alcotest;
-  propagatedBuildInputs = [ cstruct fmt ];
+  propagatedBuildInputs = [ stdlib-shims bigarray-compat fmt ];
 
   doCheck = true;
+  checkInputs = [
+    alcotest
+    crowbar
+    hxd
+    bigstringaf
+  ];
+
 
   meta = {
     description = "Pure OCaml implementation of libXdiff (Rabin’s fingerprint)";
diff --git a/pkgs/development/ocaml-modules/encore/default.nix b/pkgs/development/ocaml-modules/encore/default.nix
index dd05982c3ca..95eb75ee7ca 100644
--- a/pkgs/development/ocaml-modules/encore/default.nix
+++ b/pkgs/development/ocaml-modules/encore/default.nix
@@ -1,19 +1,20 @@
 { lib, buildDunePackage, fetchurl, ocaml
-, fmt, bigstringaf, bigarray-compat
-, bigarray-overlap, angstrom, ke, alcotest }:
+, fmt, bigstringaf, angstrom, alcotest }:
 
 buildDunePackage rec {
   pname = "encore";
-  version = "0.5";
+  version = "0.7";
+
+  minimumOCamlVersion = "4.07";
 
   src = fetchurl {
     url = "https://github.com/mirage/encore/releases/download/v${version}/encore-v${version}.tbz";
-    sha256 = "15n0dla149k9h7migs76wap08z5402qcvxyqxzl887ha6isj3p9n";
+    sha256 = "0cwmhkj5jmk3z5y0agmkf5ygpgxynjkq2d7d50jgzmnqs7f6g7nh";
   };
 
   useDune2 = true;
 
-  propagatedBuildInputs = [ angstrom ke fmt bigstringaf bigarray-compat bigarray-overlap ];
+  propagatedBuildInputs = [ angstrom fmt bigstringaf ];
   checkInputs = [ alcotest ];
   doCheck = true;
 
diff --git a/pkgs/development/ocaml-modules/git-http/default.nix b/pkgs/development/ocaml-modules/git-http/default.nix
deleted file mode 100644
index 54bd5c2da23..00000000000
--- a/pkgs/development/ocaml-modules/git-http/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ buildDunePackage, git, cohttp, cohttp-lwt }:
-
-buildDunePackage {
-  pname = "git-http";
-  inherit (git) version src minimumOCamlVersion;
-
-  useDune2 = true;
-
-  propagatedBuildInputs = [ git cohttp cohttp-lwt ];
-
-  meta = {
-    description = "Client implementation of the “Smart” HTTP Git protocol in pure OCaml";
-    inherit (git.meta) homepage license maintainers;
-  };
-}
diff --git a/pkgs/development/ocaml-modules/git-unix/default.nix b/pkgs/development/ocaml-modules/git-unix/default.nix
deleted file mode 100644
index 6ee6ef21c15..00000000000
--- a/pkgs/development/ocaml-modules/git-unix/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ stdenv, buildDunePackage, git-http, cohttp, cohttp-lwt-unix
-, mmap, cmdliner, mtime, alcotest, mirage-crypto-rng, tls
-, io-page, git-binary
-}:
-
-buildDunePackage {
-  pname = "git-unix";
-  inherit (git-http) version src minimumOCamlVersion;
-
-  useDune2 = true;
-
-  propagatedBuildInputs = [ mmap cmdliner git-http cohttp cohttp-lwt-unix mtime ];
-  checkInputs = [ alcotest mirage-crypto-rng tls io-page git-binary ];
-  doCheck = !stdenv.isAarch64;
-
-  meta = {
-    description = "Unix backend for the Git protocol(s)";
-    inherit (git-http.meta) homepage license maintainers;
-  };
-}
diff --git a/pkgs/development/ocaml-modules/git/cohttp-mirage.nix b/pkgs/development/ocaml-modules/git/cohttp-mirage.nix
new file mode 100644
index 00000000000..d3088400641
--- /dev/null
+++ b/pkgs/development/ocaml-modules/git/cohttp-mirage.nix
@@ -0,0 +1,18 @@
+{ lib, buildDunePackage
+, git, mimic, cohttp-mirage, cohttp, cohttp-lwt
+, fmt, lwt, result, rresult, uri
+}:
+
+buildDunePackage {
+  pname = "git-cohttp-mirage";
+
+  inherit (git) version src minimumOCamlVersion useDune2;
+
+  propagatedBuildInputs = [
+    git mimic cohttp-mirage cohttp cohttp-lwt fmt lwt result rresult uri
+  ];
+
+  meta = git.meta // {
+    description = "A package to use HTTP-based ocaml-git with MirageOS backend";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/git/cohttp-unix.nix b/pkgs/development/ocaml-modules/git/cohttp-unix.nix
new file mode 100644
index 00000000000..ac6d423d58a
--- /dev/null
+++ b/pkgs/development/ocaml-modules/git/cohttp-unix.nix
@@ -0,0 +1,17 @@
+{ buildDunePackage, git, git-cohttp
+, cohttp-lwt-unix, cohttp-lwt, fmt, lwt, result, rresult, uri
+}:
+
+buildDunePackage {
+  pname = "git-cohttp-unix";
+
+  inherit (git) version src minimumOCamlVersion useDune2;
+
+  propagatedBuildInputs = [
+    git git-cohttp cohttp-lwt-unix cohttp-lwt fmt lwt result rresult uri
+  ];
+
+  meta = git.meta // {
+    description = "A package to use HTTP-based ocaml-git with Unix backend";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/git/cohttp.nix b/pkgs/development/ocaml-modules/git/cohttp.nix
new file mode 100644
index 00000000000..e9126ba4bec
--- /dev/null
+++ b/pkgs/development/ocaml-modules/git/cohttp.nix
@@ -0,0 +1,19 @@
+{ buildDunePackage, git
+, cohttp, cohttp-lwt, fmt, lwt, result, rresult, uri
+, alcotest, alcotest-lwt, bigstringaf, cstruct, logs
+, mirage-flow, ke
+}:
+
+buildDunePackage rec {
+  pname = "git-cohttp";
+
+  inherit (git) version minimumOCamlVersion src useDune2;
+
+  propagatedBuildInputs = [
+    git cohttp cohttp-lwt fmt lwt result rresult uri
+  ];
+
+  meta = git.meta // {
+    description = "A package to use HTTP-based ocaml-git with Unix backend";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/git/default.nix b/pkgs/development/ocaml-modules/git/default.nix
index f5cb452f1a9..b493dbd5a06 100644
--- a/pkgs/development/ocaml-modules/git/default.nix
+++ b/pkgs/development/ocaml-modules/git/default.nix
@@ -1,27 +1,31 @@
 { stdenv, lib, fetchurl, buildDunePackage
 , alcotest, mtime, mirage-crypto-rng, tls, git-binary
 , angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt, checkseum
-, fpath, hex, ke, logs, lru, ocaml_lwt, ocamlgraph, ocplib-endian, uri, rresult
-, stdlib-shims
+, fpath, ke, logs, lwt, ocamlgraph, uri, rresult
+, result, bigstringaf, optint, mirage-flow, domain-name, emile
+, mimic, carton, carton-lwt, carton-git, ipaddr, psq, crowbar, alcotest-lwt
 }:
 
 buildDunePackage rec {
   pname = "git";
-  version = "2.1.3";
+  version = "3.2.0";
 
-  minimumOCamlVersion = "4.07";
+  minimumOCamlVersion = "4.08";
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-git/releases/download/${version}/git-${version}.tbz";
-    sha256 = "1ppllv65vrkfrmx46aiq5879isffcjmg92z9rv2kh92a83h4lqax";
+    sha256 = "14rq7h1n5v2n0507ycbac8sq21xnzhgirxmlmqv4j5k3aajdcj16";
   };
 
   propagatedBuildInputs = [
     angstrom astring checkseum cstruct decompress digestif encore duff fmt fpath
-    hex ke logs lru ocaml_lwt ocamlgraph ocplib-endian uri rresult stdlib-shims
+    ke logs lwt ocamlgraph uri rresult result bigstringaf optint mirage-flow
+    domain-name emile mimic carton carton-lwt carton-git ipaddr psq
+  ];
+  checkInputs = [
+    alcotest alcotest-lwt mtime mirage-crypto-rng tls git-binary crowbar
   ];
-  checkInputs = [ alcotest mtime mirage-crypto-rng tls git-binary ];
   doCheck = !stdenv.isAarch64;
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/git/unix.nix b/pkgs/development/ocaml-modules/git/unix.nix
new file mode 100644
index 00000000000..37be4c68ad4
--- /dev/null
+++ b/pkgs/development/ocaml-modules/git/unix.nix
@@ -0,0 +1,44 @@
+{ buildDunePackage, fetchpatch, git
+, mmap, rresult, result, bigstringaf
+, fmt, bos, fpath, uri, digestif, logs, lwt, git-cohttp-unix
+, mirage-clock, mirage-clock-unix, astring, awa, cmdliner
+, cohttp-lwt-unix, decompress, domain-name, ipaddr, mtime
+, tcpip, awa-mirage, mirage-flow
+, alcotest, alcotest-lwt, base64, cstruct
+, ke, mirage-crypto-rng, ocurl, git-binary
+}:
+
+buildDunePackage {
+  pname = "git-unix";
+  inherit (git) version src minimumOCamlVersion;
+
+  useDune2 = true;
+
+  buildInputs = [
+    awa awa-mirage cmdliner git-cohttp-unix
+    mirage-clock mirage-clock-unix tcpip
+  ];
+  propagatedBuildInputs = [
+    mmap rresult result bigstringaf
+    fmt bos fpath uri digestif logs lwt
+    astring cohttp-lwt-unix decompress
+    domain-name ipaddr mtime mirage-flow
+  ];
+  checkInputs = [
+    alcotest alcotest-lwt base64 cstruct ke
+    mirage-crypto-rng ocurl git-binary
+  ];
+  doCheck = true;
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/mirage/ocaml-git/commit/09b41073fa869c0a595e1d8ed7224d539682af1c.patch";
+      sha256 = "1avbxv60gbrll9gny1pl6jwbx5b8282h3frhzy2ghb0fx1pggp6w";
+    })
+  ];
+
+  meta = {
+    description = "Unix backend for the Git protocol(s)";
+    inherit (git.meta) homepage license maintainers;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/imagelib/default.nix b/pkgs/development/ocaml-modules/imagelib/default.nix
index 46bd4b96268..f7ca279b988 100644
--- a/pkgs/development/ocaml-modules/imagelib/default.nix
+++ b/pkgs/development/ocaml-modules/imagelib/default.nix
@@ -1,30 +1,28 @@
-{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, decompress }:
+{ lib, fetchurl, buildDunePackage
+, decompress, stdlib-shims, alcotest
+}:
 
 buildDunePackage rec {
   minimumOCamlVersion = "4.07";
-  version = "20191011";
+  version = "20200929";
   pname = "imagelib";
 
   useDune2 = true;
 
-  src = fetchFromGitHub {
-    owner = "rlepigre";
-    repo = "ocaml-imagelib";
-    rev = "03fed7733825cef7e0465163f398f6af810e2e75";
-    sha256 = "0h7vgyss42nhlfqpbdnb54nxq86rskqi2ilx8b87r0hi19hqx463";
+  src = fetchurl {
+    url = "https://github.com/rlepigre/ocaml-imagelib/releases/download/ocaml-imagelib_${version}/imagelib-ocaml-imagelib_${version}.tbz";
+    sha256 = "1wyq4xxj0dxwafbcmd7jylsd8w1gbyl7j4ak6jbq1n0ardwmpwca";
   };
 
-  patches = [ (fetchpatch {
-    url = "https://github.com/rlepigre/ocaml-imagelib/pull/24/commits/4704fd44adcda62e0d96ea5b1927071326aa6111.patch";
-    sha256 = "0ipjab1hfa2v2pnd8g1k3q2ia0plgiw7crm3fa4w2aqpzdyabkb9";
-  }) ];
+  propagatedBuildInputs = [ decompress stdlib-shims ];
 
-  propagatedBuildInputs = [ decompress ];
+  doCheck = true;
+  checkInputs = [ alcotest ];
 
   meta = {
     description = "Image formats such as PNG and PPM in OCaml";
     license = lib.licenses.lgpl3;
     maintainers = [ lib.maintainers.vbgl ];
-    inherit (src.meta) homepage;
+    homepage = "https://github.com/rlepigre/ocaml-imagelib";
   };
 }
diff --git a/pkgs/development/ocaml-modules/imagelib/unix.nix b/pkgs/development/ocaml-modules/imagelib/unix.nix
deleted file mode 100644
index a188165a48f..00000000000
--- a/pkgs/development/ocaml-modules/imagelib/unix.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ buildDunePackage, imagelib }:
-
-buildDunePackage {
-  pname = "imagelib-unix";
-  inherit (imagelib) version src useDune2 meta;
-
-  propagatedBuildInputs = [ imagelib ];
-}
diff --git a/pkgs/development/ocaml-modules/index/default.nix b/pkgs/development/ocaml-modules/index/default.nix
index f4b1844d684..a24d72a3445 100644
--- a/pkgs/development/ocaml-modules/index/default.nix
+++ b/pkgs/development/ocaml-modules/index/default.nix
@@ -1,18 +1,29 @@
-{ lib, fetchurl, buildDunePackage, fmt, logs, mtime, stdlib-shims }:
+{ lib, fetchurl, buildDunePackage
+, repr, ppx_repr, fmt, logs, mtime, stdlib-shims
+, cmdliner, progress, semaphore-compat
+, alcotest, crowbar, re
+}:
 
 buildDunePackage rec {
   pname = "index";
-  version = "1.2.1";
+  version = "1.3.0";
 
-  minimumOCamlVersion = "4.07";
+  minimumOCamlVersion = "4.08";
+
+  useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz";
-    sha256 = "1a9b6rsazrjy07syxl9ix5002i95mlvx5vk7nl2x9cs6s0zw906d";
+    sha256 = "00qwhwg79scs5bgp8nbppv06qs9yhicf686q7lh64ngh0642iz6n";
   };
 
   buildInputs = [ stdlib-shims ];
-  propagatedBuildInputs = [ fmt logs mtime ];
+  propagatedBuildInputs = [
+    fmt logs mtime repr ppx_repr cmdliner progress semaphore-compat
+  ];
+
+  doCheck = true;
+  checkInputs = [ alcotest crowbar re ];
 
   meta = {
     homepage = "https://github.com/mirage/index";
@@ -20,5 +31,4 @@ buildDunePackage rec {
     license = lib.licenses.mit;
     maintainers = [ lib.maintainers.vbgl ];
   };
-
 }
diff --git a/pkgs/development/ocaml-modules/irmin/chunk.nix b/pkgs/development/ocaml-modules/irmin/chunk.nix
index 7a2ad0ec7df..0014bbbcfcb 100644
--- a/pkgs/development/ocaml-modules/irmin/chunk.nix
+++ b/pkgs/development/ocaml-modules/irmin/chunk.nix
@@ -1,4 +1,4 @@
-{ lib, buildDunePackage, irmin, irmin-mem, irmin-test }:
+{ lib, buildDunePackage, irmin, irmin-test, alcotest }:
 
 buildDunePackage rec {
 
@@ -8,7 +8,7 @@ buildDunePackage rec {
   propagatedBuildInputs = [ irmin ];
 
   doCheck = true;
-  checkInputs = [ irmin-mem irmin-test ];
+  checkInputs = [ alcotest irmin-test ];
 
   meta = irmin.meta // {
     description = "Irmin backend which allow to store values into chunks";
diff --git a/pkgs/development/ocaml-modules/irmin/containers.nix b/pkgs/development/ocaml-modules/irmin/containers.nix
new file mode 100644
index 00000000000..761e9bf5619
--- /dev/null
+++ b/pkgs/development/ocaml-modules/irmin/containers.nix
@@ -0,0 +1,27 @@
+{ buildDunePackage
+, irmin, irmin-unix, irmin-git, ppx_irmin, lwt, mtime
+, alcotest, alcotest-lwt
+}:
+
+buildDunePackage {
+  pname = "irmin-containers";
+
+  inherit (ppx_irmin) src version useDune2;
+
+  nativeBuildInputs = [
+    ppx_irmin
+  ];
+
+  propagatedBuildInputs = [
+    irmin irmin-unix irmin-git ppx_irmin lwt mtime
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    alcotest alcotest-lwt
+  ];
+
+  meta = ppx_irmin.meta // {
+    description = "Mergeable Irmin data structures";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/irmin/default.nix b/pkgs/development/ocaml-modules/irmin/default.nix
index 2e3e27df7ff..166c4c6b853 100644
--- a/pkgs/development/ocaml-modules/irmin/default.nix
+++ b/pkgs/development/ocaml-modules/irmin/default.nix
@@ -1,6 +1,6 @@
-{ lib, fetchurl, buildDunePackage
+{ lib, buildDunePackage
 , astring, base64, digestif, fmt, jsonm, logs, ocaml_lwt, ocamlgraph, uri
-, alcotest, hex, ppx_irmin
+, repr, ppx_irmin, bheap
 }:
 
 buildDunePackage {
@@ -11,10 +11,23 @@ buildDunePackage {
   useDune2 = true;
   minimumOCamlVersion = "4.07";
 
-  propagatedBuildInputs = [ astring base64 digestif fmt jsonm logs ocaml_lwt ocamlgraph uri ];
+  propagatedBuildInputs = [
+    astring
+    base64
+    digestif
+    fmt
+    jsonm
+    logs
+    ocaml_lwt
+    ocamlgraph
+    uri
+    repr
+    bheap
+    ppx_irmin
+  ];
 
-  checkInputs = [ alcotest hex ppx_irmin ];
-  doCheck = true;
+  # circular dependency on irmin-mem
+  doCheck = false;
 
   meta = ppx_irmin.meta // {
     description = "A distributed database built on the same principles as Git";
diff --git a/pkgs/development/ocaml-modules/irmin/git.nix b/pkgs/development/ocaml-modules/irmin/git.nix
index b222bc53e3a..a6c1e8af8fa 100644
--- a/pkgs/development/ocaml-modules/irmin/git.nix
+++ b/pkgs/development/ocaml-modules/irmin/git.nix
@@ -1,6 +1,10 @@
-{ lib, buildDunePackage, git, irmin, irmin-mem, irmin-test, git-unix }:
+{ lib, buildDunePackage
+, git, irmin, irmin-test, ppx_irmin, git-cohttp-unix, git-unix
+, digestif, cstruct, fmt, astring, fpath, logs, lwt, uri
+, mtime, alcotest
+}:
 
-buildDunePackage rec {
+buildDunePackage {
 
   pname = "irmin-git";
 
@@ -8,9 +12,21 @@ buildDunePackage rec {
 
   useDune2 = true;
 
-  propagatedBuildInputs = [ git irmin ];
-
-  checkInputs = lib.optionals doCheck [ git-unix irmin-mem irmin-test ];
+  propagatedBuildInputs = [
+    git
+    irmin
+    ppx_irmin
+    digestif
+    cstruct
+    fmt
+    astring
+    fpath
+    logs
+    lwt
+    uri
+  ];
+
+  checkInputs = [ mtime alcotest git-cohttp-unix git-unix irmin-test ];
 
   doCheck = true;
 
diff --git a/pkgs/development/ocaml-modules/irmin/http.nix b/pkgs/development/ocaml-modules/irmin/http.nix
index 24e9f52aa08..b50e0b87345 100644
--- a/pkgs/development/ocaml-modules/irmin/http.nix
+++ b/pkgs/development/ocaml-modules/irmin/http.nix
@@ -1,5 +1,5 @@
 { lib, buildDunePackage, cohttp-lwt, irmin, webmachine
-, checkseum, git-unix, irmin-git, irmin-mem, irmin-test
+, checkseum, git-unix, irmin-git, irmin-test, digestif, git-cohttp-unix
 }:
 
 buildDunePackage rec {
@@ -12,7 +12,7 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ cohttp-lwt irmin webmachine ];
 
-  checkInputs = lib.optionals doCheck [ checkseum git-unix irmin-git irmin-mem irmin-test ];
+  checkInputs = [ digestif checkseum git-cohttp-unix git-unix irmin-git irmin-test ];
 
   doCheck = true;
 
diff --git a/pkgs/development/ocaml-modules/irmin/layers.nix b/pkgs/development/ocaml-modules/irmin/layers.nix
new file mode 100644
index 00000000000..9e6b237f1e2
--- /dev/null
+++ b/pkgs/development/ocaml-modules/irmin/layers.nix
@@ -0,0 +1,21 @@
+{ buildDunePackage, irmin, mtime, logs, lwt }:
+
+buildDunePackage {
+  pname = "irmin-layers";
+
+  inherit (irmin) version src useDune2;
+
+  propagatedBuildInputs = [
+    irmin
+    mtime
+    logs
+    lwt
+  ];
+
+  # mutual dependency on irmin-test
+  doCheck = false;
+
+  meta = irmin.meta // {
+    description = "Combine different Irmin stores into a single, layered store";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/irmin/mem.nix b/pkgs/development/ocaml-modules/irmin/mem.nix
deleted file mode 100644
index 1b8947849a9..00000000000
--- a/pkgs/development/ocaml-modules/irmin/mem.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ lib, buildDunePackage, irmin, irmin-test }:
-
-buildDunePackage rec {
-
-  pname = "irmin-mem";
-
-  inherit (irmin) version src;
-
-  useDune2 = true;
-
-  propagatedBuildInputs = [ irmin ];
-
-  checkInputs = lib.optional doCheck irmin-test;
-
-  doCheck = true;
-
-  meta = irmin.meta // {
-    description = "Generic in-memory Irmin stores";
-  };
-
-}
diff --git a/pkgs/development/ocaml-modules/irmin/mirage-git.nix b/pkgs/development/ocaml-modules/irmin/mirage-git.nix
new file mode 100644
index 00000000000..dfa84ff2335
--- /dev/null
+++ b/pkgs/development/ocaml-modules/irmin/mirage-git.nix
@@ -0,0 +1,27 @@
+{ buildDunePackage, irmin-mirage, irmin-git
+, mirage-kv, cohttp, conduit-lwt, conduit-mirage
+, git-cohttp-mirage, fmt, git, lwt, mirage-clock, uri
+}:
+
+buildDunePackage {
+  pname = "irmin-mirage-git";
+
+  inherit (irmin-mirage) version src useDune2;
+
+  propagatedBuildInputs = [
+    irmin-mirage
+    irmin-git
+    mirage-kv
+    cohttp
+    conduit-lwt
+    conduit-mirage
+    git-cohttp-mirage
+    fmt
+    git
+    lwt
+    mirage-clock
+    uri
+  ];
+
+  inherit (irmin-mirage) meta;
+}
diff --git a/pkgs/development/ocaml-modules/irmin/mirage-graphql.nix b/pkgs/development/ocaml-modules/irmin/mirage-graphql.nix
new file mode 100644
index 00000000000..d550b9c924b
--- /dev/null
+++ b/pkgs/development/ocaml-modules/irmin/mirage-graphql.nix
@@ -0,0 +1,21 @@
+{ buildDunePackage, irmin-mirage, irmin-graphql
+, mirage-clock, cohttp-lwt, lwt, uri, git
+}:
+
+buildDunePackage {
+  pname = "irmin-mirage-graphql";
+
+  inherit (irmin-mirage) version src useDune2;
+
+  propagatedBuildInputs = [
+    irmin-mirage
+    irmin-graphql
+    mirage-clock
+    cohttp-lwt
+    lwt
+    uri
+    git
+  ];
+
+  inherit (irmin-mirage) meta;
+}
diff --git a/pkgs/development/ocaml-modules/irmin/mirage.nix b/pkgs/development/ocaml-modules/irmin/mirage.nix
new file mode 100644
index 00000000000..675c8a3fdd2
--- /dev/null
+++ b/pkgs/development/ocaml-modules/irmin/mirage.nix
@@ -0,0 +1,15 @@
+{ buildDunePackage, irmin, fmt, ptime, mirage-clock }:
+
+buildDunePackage {
+  pname = "irmin-mirage";
+
+  inherit (irmin) version src useDune2;
+
+  propagatedBuildInputs = [
+    irmin fmt ptime mirage-clock
+  ];
+
+  meta = irmin.meta // {
+    description = "MirageOS-compatible Irmin stores";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/irmin/pack.nix b/pkgs/development/ocaml-modules/irmin/pack.nix
index b0081eb366e..16ef675c1f8 100644
--- a/pkgs/development/ocaml-modules/irmin/pack.nix
+++ b/pkgs/development/ocaml-modules/irmin/pack.nix
@@ -1,4 +1,6 @@
-{ lib, buildDunePackage, alcotest-lwt, index, irmin, irmin-test, ocaml_lwt }:
+{ lib, buildDunePackage
+, alcotest-lwt, index, irmin, irmin-layers, irmin-test, ocaml_lwt, fpath
+}:
 
 buildDunePackage rec {
   minimumOCamlVersion = "4.02.3";
@@ -9,9 +11,10 @@ buildDunePackage rec {
 
   useDune2 = true;
 
-  propagatedBuildInputs = [ index irmin ocaml_lwt ];
+  buildInputs = [ fpath ];
+  propagatedBuildInputs = [ index irmin irmin-layers ocaml_lwt ];
 
-  checkInputs = lib.optionals doCheck [ alcotest-lwt irmin-test ];
+  checkInputs = [ alcotest-lwt irmin-test ];
 
   doCheck = true;
 
diff --git a/pkgs/development/ocaml-modules/irmin/ppx.nix b/pkgs/development/ocaml-modules/irmin/ppx.nix
index 35aa659fbc8..91fd1155181 100644
--- a/pkgs/development/ocaml-modules/irmin/ppx.nix
+++ b/pkgs/development/ocaml-modules/irmin/ppx.nix
@@ -1,23 +1,24 @@
-{ lib, fetchurl, buildDunePackage, ppxlib, ocaml-syntax-shims }:
+{ lib, fetchurl, buildDunePackage, ppxlib, ppx_repr }:
 
 buildDunePackage rec {
   pname = "ppx_irmin";
-  version = "2.2.0";
+  version = "2.4.0";
 
   src = fetchurl {
     url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz";
-    sha256 = "0gzw918b661qkvd140hilww9jsc49rxsxz1k4iihyvikjn202km4";
+    sha256 = "1b6lav5br1b83cwdc3gj9mqkzhlbfjrbyjx0107zvj54m82dbrxb";
   };
 
-  minimumOCamlVersion = "4.06";
+  minimumOCamlVersion = "4.08";
 
   useDune2 = true;
 
-  buildInputs = [ ocaml-syntax-shims ];
-  propagatedBuildInputs = [ ppxlib ];
+  propagatedBuildInputs = [
+    ppx_repr
+    ppxlib
+  ];
 
   # tests depend on irmin, would create mutual dependency
-  # opt to test irmin instead of ppx_irmin
   doCheck = false;
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/irmin/test.nix b/pkgs/development/ocaml-modules/irmin/test.nix
index b8a3f3ae245..90141d925e6 100644
--- a/pkgs/development/ocaml-modules/irmin/test.nix
+++ b/pkgs/development/ocaml-modules/irmin/test.nix
@@ -1,4 +1,6 @@
-{ buildDunePackage, alcotest, cmdliner, irmin, metrics-unix, mtime }:
+{ buildDunePackage
+, alcotest, cmdliner, irmin, metrics-unix, mtime, irmin-layers
+}:
 
 buildDunePackage {
 
@@ -8,7 +10,9 @@ buildDunePackage {
 
   useDune2 = true;
 
-  propagatedBuildInputs = [ alcotest cmdliner irmin metrics-unix mtime ];
+  propagatedBuildInputs = [
+    alcotest cmdliner irmin metrics-unix mtime irmin-layers
+  ];
 
   meta = irmin.meta // {
     description = "Irmin test suite";
diff --git a/pkgs/development/ocaml-modules/irmin/unix.nix b/pkgs/development/ocaml-modules/irmin/unix.nix
index 7a09eaabd3e..a3dfb5d508c 100644
--- a/pkgs/development/ocaml-modules/irmin/unix.nix
+++ b/pkgs/development/ocaml-modules/irmin/unix.nix
@@ -1,7 +1,7 @@
 { lib, buildDunePackage
-, checkseum, cmdliner, git-unix, yaml
-, irmin, irmin-fs, irmin-git, irmin-graphql, irmin-http, irmin-mem, irmin-pack, irmin-watcher
-, irmin-test
+, checkseum, cmdliner, git-unix, git-cohttp-unix, yaml, fpath
+, irmin, irmin-fs, irmin-git, irmin-graphql, irmin-http
+, irmin-pack, irmin-watcher, irmin-test
 }:
 
 buildDunePackage rec {
@@ -12,8 +12,10 @@ buildDunePackage rec {
 
   useDune2 = true;
 
-  propagatedBuildInputs = [ checkseum cmdliner git-unix yaml
-    irmin irmin-fs irmin-git irmin-graphql irmin-http irmin-mem irmin-pack irmin-watcher
+  propagatedBuildInputs = [
+    checkseum cmdliner git-unix yaml fpath
+    irmin irmin-fs irmin-git irmin-graphql irmin-http
+    irmin-pack irmin-watcher git-cohttp-unix
   ];
 
   checkInputs = lib.optional doCheck irmin-test;
diff --git a/pkgs/development/ocaml-modules/wodan/irmin.nix b/pkgs/development/ocaml-modules/wodan/irmin.nix
index a42259af9e6..86064d887db 100644
--- a/pkgs/development/ocaml-modules/wodan/irmin.nix
+++ b/pkgs/development/ocaml-modules/wodan/irmin.nix
@@ -15,6 +15,12 @@ buildDunePackage rec {
     wodan
   ];
 
-  meta = wodan.meta // { description = "Wodan as an Irmin store"; };
-
+  meta = wodan.meta // {
+    # wodan is currently incompatible with irmin 2.3.0.
+    # additionally upgrading to current master (unclear
+    # if the issue is fixed there) is not possible as it
+    # depends on a custom fork of mirage-block
+    broken = true;
+    description = "Wodan as an Irmin store";
+  };
 }
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index c0faba640a2..673b9f2383c 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -82,6 +82,14 @@ let
 
     ca-certs = callPackage ../development/ocaml-modules/ca-certs { };
 
+    carton = callPackage ../development/ocaml-modules/carton { };
+
+    carton-git = callPackage ../development/ocaml-modules/carton/git.nix { };
+
+    carton-lwt = callPackage ../development/ocaml-modules/carton/lwt.nix {
+      git-binary = pkgs.git;
+    };
+
     camlidl = callPackage ../development/tools/ocaml/camlidl { };
 
     camlp4 =
@@ -391,8 +399,6 @@ let
 
     imagelib = callPackage ../development/ocaml-modules/imagelib { };
 
-    imagelib-unix = callPackage ../development/ocaml-modules/imagelib/unix.nix { };
-
     inotify = callPackage ../development/ocaml-modules/inotify { };
 
     integers = callPackage ../development/ocaml-modules/integers { };
@@ -425,9 +431,13 @@ let
       git-binary = pkgs.git;
     };
 
-    git-http = callPackage ../development/ocaml-modules/git-http { };
+    git-cohttp = callPackage ../development/ocaml-modules/git/cohttp.nix { };
 
-    git-unix = callPackage ../development/ocaml-modules/git-unix {
+    git-cohttp-unix = callPackage ../development/ocaml-modules/git/cohttp-unix.nix { };
+
+    git-cohttp-mirage = callPackage ../development/ocaml-modules/git/cohttp-mirage.nix { };
+
+    git-unix = callPackage ../development/ocaml-modules/git/unix.nix {
       git-binary = pkgs.git;
     };
 
@@ -464,6 +474,8 @@ let
 
     irmin-chunk = callPackage ../development/ocaml-modules/irmin/chunk.nix { };
 
+    irmin-containers = callPackage ../development/ocaml-modules/irmin/containers.nix { };
+
     irmin-fs = callPackage ../development/ocaml-modules/irmin/fs.nix { };
 
     irmin-git = callPackage ../development/ocaml-modules/irmin/git.nix { };
@@ -472,7 +484,13 @@ let
 
     irmin-http = callPackage ../development/ocaml-modules/irmin/http.nix { };
 
-    irmin-mem = callPackage ../development/ocaml-modules/irmin/mem.nix { };
+    irmin-layers = callPackage ../development/ocaml-modules/irmin/layers.nix { };
+
+    irmin-mirage = callPackage ../development/ocaml-modules/irmin/mirage.nix { };
+
+    irmin-mirage-git = callPackage ../development/ocaml-modules/irmin/mirage-git.nix { };
+
+    irmin-mirage-graphql = callPackage ../development/ocaml-modules/irmin/mirage-graphql.nix { };
 
     irmin-pack = callPackage ../development/ocaml-modules/irmin/pack.nix { };