about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix31
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/atd/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/awa/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/bap/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix21
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ca-certs-nss/default.nix55
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix12
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix19
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix41
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/camlimages/4.1.2.nix37
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/caqti/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/carton/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix39
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/checkseum/makefile-no-opam.patch12
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix72
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix13
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix25
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix25
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cohttp/mirage.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix18
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix10
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix27
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/conduit/mirage.nix7
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/containers/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/cooltt/default.nix47
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix19
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/csv/csvtool.nix16
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/csv/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/curly/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dns/certify.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dns/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/extlib/1.7.7.nix7
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/fix/default.nix29
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/git/cohttp-mirage.nix18
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/git/default.nix13
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/git/paf.nix49
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/git/unix.nix11
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/containers.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix5
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/mirage-git.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/junit/alcotest.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/junit/default.nix26
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/junit/ounit.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/letsencrypt/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/luv/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix30
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix43
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/menhir/lib.nix29
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/menhir/sdk.nix15
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix19
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix22
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix12
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix29
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/optint/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/paf/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix41
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix17
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/repr/default.nix17
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/repr/ppx.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/stdcompat/default.nix24
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tls/default.nix12
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix5
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/uri/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/x509/default.nix4
81 files changed, 801 insertions, 425 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix
index 53b02a453a0e..edd40fb4df29 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ansiterminal/default.nix
@@ -1,36 +1,29 @@
-{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
+{ lib, buildDunePackage, fetchFromGitHub }:
 
-stdenv.mkDerivation rec {
+buildDunePackage rec {
+  pname = "ANSITerminal";
+  version = "0.8.2";
 
-  version = "0.7";
+  useDune2 = true;
 
-  name = "ocaml${ocaml.version}-ansiterminal-${version}";
-
-  src = fetchurl {
-    url = "https://github.com/Chris00/ANSITerminal/releases/download/${version}/ANSITerminal-${version}.tar.gz";
-    sha256 = "03pqfxvw9pa9720l8i5fgxky1qx70kw6wxbczd5i50xi668lh0i9";
+  src = fetchFromGitHub {
+    owner = "Chris00";
+    repo = pname;
+    rev = version;
+    sha256 = "0dyjischrgwlxqz1p5zbqq76jvk6pl1qj75i7ydhijssr9pj278d";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ];
-
-  configurePhase = "ocaml setup.ml -configure --prefix $out";
-
-  buildPhase = "ocaml setup.ml -build";
-
-  installPhase = "ocaml setup.ml -install";
-
-  createFindlibDestdir = true;
+  doCheck = true;
 
   meta = with lib; {
-    homepage = "https://github.com/Chris00/ANSITerminal";
     description = "A module allowing to use the colors and cursor movements on ANSI terminals";
     longDescription = ''
       ANSITerminal is a module allowing to use the colors and cursor
       movements on ANSI terminals. It also works on the windows shell (but
       this part is currently work in progress).
     '';
+    inherit (src.meta) homepage;
     license = licenses.lgpl3;
-    platforms = ocaml.meta.platforms or [];
     maintainers = [ maintainers.jirkamarsik ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix b/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix
index 2f85221e539c..de6ade61518a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/atd/default.nix
@@ -1,4 +1,4 @@
-{ lib, menhir, easy-format, fetchurl, buildDunePackage, which, re }:
+{ lib, menhir, easy-format, fetchurl, buildDunePackage, which, re, nixosTests }:
 
 buildDunePackage rec {
   pname = "atd";
@@ -18,6 +18,10 @@ buildDunePackage rec {
 
   doCheck = true;
 
+  passthru.tests = {
+    smoke-test = nixosTests.atd;
+  };
+
   meta = with lib; {
     homepage = "https://github.com/mjambon/atd";
     description = "Syntax for cross-language type definitions";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/awa/default.nix b/nixpkgs/pkgs/development/ocaml-modules/awa/default.nix
index 49d614cda884..14f99bb6f8db 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/awa/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/awa/default.nix
@@ -8,14 +8,14 @@
 
 buildDunePackage rec {
   pname = "awa";
-  version = "0.0.1";
+  version = "0.0.3";
 
   minimumOCamlVersion = "4.07";
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/awa-ssh/releases/download/v${version}/awa-v${version}.tbz";
-    sha256 = "c1d604645517b191184a5800f5c48a6a9a3e5a2fce4a0e2ecfeee74586301400";
+    sha256 = "5a7927363ffe672cccf12d5425386e84f6f553a17ffec2b01ae5dc28180c831a";
   };
 
   nativeBuildInputs = [ ppx_sexp_conv ppx_cstruct ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix
index 94f254a2edfb..c1cb7de2d188 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/bap/default.nix
@@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
     substituteInPlace oasis/elf-loader --replace bitstring.ppx ppx_bitstring
   '';
 
-  configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ];
+  configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm.dev}/bin/llvm-config" ];
 
   meta = with lib; {
     description = "Platform for binary analysis. It is written in OCaml, but can be used from other languages.";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix
index eba010819949..ddeda86e9bf7 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix
@@ -1,27 +1,28 @@
-{ lib, fetchFromGitHub, buildDunePackage, cmdliner, ocaml-migrate-parsetree, ppx_tools_versioned }:
+{ lib, fetchFromGitHub, buildDunePackage, cmdliner, ppxlib }:
 
 buildDunePackage rec {
   pname = "bisect_ppx";
-  version = "2.5.0";
-
-  useDune2 = true;
+  version = "2.6.1";
 
   src = fetchFromGitHub {
     owner = "aantron";
     repo = "bisect_ppx";
     rev = version;
-    sha256 = "0w2qd1myvh333jvkf8hgrqzl8ns4xgfggk4frf1ij3jyc7qc0868";
+    sha256 = "sha256-YeLDlH3mUbVEY4OmzlrvSwVUav3uMtSsTFlOsQKnz84=";
   };
 
+  minimumOCamlVersion = "4.08";
+  useDune2 = true;
+
   buildInputs = [
     cmdliner
-    ocaml-migrate-parsetree
-    ppx_tools_versioned
+    ppxlib
   ];
 
-  meta = {
-    description = "Code coverage for OCaml";
-    license = lib.licenses.mit;
+  meta = with lib; {
+    description = "Bisect_ppx is a code coverage tool for OCaml and Reason. It helps you test thoroughly by showing what's not tested.";
+    license = licenses.mit;
     homepage = "https://github.com/aantron/bisect_ppx";
+    maintainers = with maintainers; [ ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ca-certs-nss/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ca-certs-nss/default.nix
new file mode 100644
index 000000000000..5e6691a9feba
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/ca-certs-nss/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, buildDunePackage
+, fetchurl
+, rresult
+, mirage-crypto
+, mirage-clock
+, x509
+, logs
+, fmt
+, hex
+, bos
+, astring
+, cmdliner
+, alcotest
+}:
+
+buildDunePackage rec {
+  pname = "ca-certs-nss";
+  version = "3.64.0.1";
+
+  minimumOCamlVersion = "4.07";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/ca-certs-nss/releases/download/v${version}/ca-certs-nss-v${version}.tbz";
+    sha256 = "909c64076491647471f785527bfdd9a886a34504edabf88542b43f27b86067f9";
+  };
+
+  useDune2 = true;
+
+  propagatedBuildInputs = [
+    rresult
+    mirage-crypto
+    mirage-clock
+    x509
+  ];
+
+  buildInputs = [
+    logs
+    fmt
+    hex
+    bos
+    astring
+    cmdliner
+  ];
+
+  doCheck = true;
+  checkInputs = [ alcotest ];
+
+  meta = with lib; {
+    license = licenses.isc;
+    description = "X.509 trust anchors extracted from Mozilla's NSS";
+    maintainers = [ maintainers.sternenseemann ];
+    homepage = "https://github.com/mirage/ca-certs-nss";
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix
index dacc181f751c..acf869dbd275 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix
@@ -1,24 +1,28 @@
 { lib, buildDunePackage, fetchurl
 , bos, fpath, rresult, ptime, mirage-crypto, x509, astring, logs
+, cacert, alcotest
 }:
 
 buildDunePackage rec {
   pname = "ca-certs";
-  version = "0.2.0";
+  version = "0.2.1";
 
   minimumOCamlVersion = "4.07";
 
   src = fetchurl {
     url = "https://github.com/mirage/ca-certs/releases/download/v${version}/ca-certs-v${version}.tbz";
-    sha256 = "15jfb5zvahs90jsfs7ridqihlka5198z2xrvplj8ddchxfmpx868";
+    sha256 = "d43109496a5129feff967d557c556af96f8b10456896a405c43b7cf0c35d0af3";
   };
 
   useDune2 = true;
 
   propagatedBuildInputs = [ bos fpath rresult ptime mirage-crypto x509 astring logs ];
 
-  # tests need access to network and systemwide ca cert chain
-  doCheck = false;
+  doCheck = true;
+  checkInputs = [
+    cacert    # for /etc/ssl/certs/ca-bundle.crt
+    alcotest
+  ];
 
   meta = with lib; {
     description = "Detect root CA certificates from the operating system";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix
index 020006b19c5d..0a9922f67885 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cairo2/default.nix
@@ -1,18 +1,17 @@
-{ stdenv, lib, fetchurl, buildDunePackage, ocaml, dune-configurator
-, pkg-config, cairo
-}:
+{ stdenv, lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config, cairo }:
 
 buildDunePackage rec {
   pname = "cairo2";
-  version = "0.6.1";
-
-  useDune2 = true;
+  version = "0.6.2";
 
   src = fetchurl {
     url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tbz";
-    sha256 = "1ik4qf4b9443sliq2z7x9acd40rmzvyzjh3bh98wvjklxbb84a9i";
+    sha256 = "sha256-a7P1kiVmIwT6Fhtwxs29ffgO4iexsulxUoc9cnJmEK4=";
   };
 
+  minimalOCamlVersion = "4.02";
+  useDune2 = true;
+
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ cairo dune-configurator ];
 
@@ -20,7 +19,7 @@ buildDunePackage rec {
   # https://github.com/Chris00/ocaml-cairo/issues/19
   || lib.versionAtLeast ocaml.version "4.10");
 
-  meta = {
+  meta = with lib; {
     homepage = "https://github.com/Chris00/ocaml-cairo";
     description = "Binding to Cairo, a 2D Vector Graphics Library";
     longDescription = ''
@@ -29,7 +28,7 @@ buildDunePackage rec {
       the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
       and SVG file output.
     '';
-    license = lib.licenses.lgpl3;
-    maintainers = with lib.maintainers; [ jirkamarsik vbgl ];
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ jirkamarsik vbgl ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix b/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix
deleted file mode 100644
index 26735b1c5d7f..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.0.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ lib, stdenv, fetchurl, omake, ocaml, libtiff, libjpeg, libpng, giflib, findlib, libXpm, freetype, graphicsmagick, ghostscript }:
-
-let
-  pname = "camlimages";
-  version = "4.0.1";
-in
-
-stdenv.mkDerivation {
-  name = "${pname}-${version}";
-
-  src = fetchurl {
-    url = "https://bitbucket.org/camlspotter/camlimages/get/v4.0.1.tar.gz";
-    sha256 = "b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4";
-  };
-
-  buildInputs = [ ocaml omake findlib graphicsmagick ghostscript ];
-
-  propagatedBuildInputs = [libtiff libjpeg libpng giflib freetype libXpm ];
-
-  createFindlibDestdir = true;
-
-  preConfigure = ''
-    rm ./configure
-  '';
-
-  buildPhase = ''
-    omake
-  '';
-
-  installPhase = ''
-    omake install
-  '';
-
-  meta = with lib; {
-    branch = "4.0";
-    homepage = "https://bitbucket.org/camlspotter/camlimages";
-    description = "OCaml image processing library";
-    license = licenses.lgpl2;
-    maintainers = [ maintainers.vbgl ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.1.2.nix b/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.1.2.nix
new file mode 100644
index 000000000000..dba303afdf24
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/camlimages/4.1.2.nix
@@ -0,0 +1,37 @@
+{ lib, stdenv, fetchFromGitLab, fetchpatch, omake, ocaml, findlib
+, graphicsmagick, ghostscript
+, freetype, giflib, libjpeg, libpng, libtiff, libXpm
+}:
+
+stdenv.mkDerivation rec {
+  pname = "camlimages";
+  version = "4.1.2";
+
+  src = fetchFromGitLab {
+    owner = "camlspotter";
+    repo = "camlimages";
+    rev = "98661d507e12ce91a51295a50f244cb8265b4439"; # no tag
+    sha256 = "0kpxj8wm2m17wjq217jzjpfgv1d7sp4w1yd1gi8ipn5rj4sid2j8";
+  };
+
+  buildInputs = [ ocaml omake findlib graphicsmagick ghostscript ];
+  propagatedBuildInputs = [ libtiff libjpeg libpng giflib freetype libXpm ];
+
+  createFindlibDestdir = true;
+
+  buildPhase = ''
+    omake
+  '';
+
+  installPhase = ''
+    omake install
+  '';
+
+  meta = with lib; {
+    branch = "4.1";
+    homepage = "https://gitlab.com/camlspotter/camlimages";
+    description = "OCaml image processing library";
+    license = licenses.lgpl2;
+    maintainers = [ maintainers.vbgl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/caqti/default.nix b/nixpkgs/pkgs/development/ocaml-modules/caqti/default.nix
index 6df0af597c21..105a6a9dfe18 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/caqti/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/caqti/default.nix
@@ -2,7 +2,7 @@
 
 buildDunePackage rec {
   pname = "caqti";
-  version = "1.3.0";
+  version = "1.5.1";
   useDune2 = true;
 
   minimumOCamlVersion = "4.04";
@@ -11,7 +11,7 @@ buildDunePackage rec {
     owner = "paurkedal";
     repo = "ocaml-${pname}";
     rev = "v${version}";
-    sha256 = "1ksjchfjnh059wvd95my1sv9b0ild0dfaiynbf2xsaz7zg1y4xmw";
+    sha256 = "1vl61kdyj89whc3mh4k9bis6rbj9x2scf6hnv9afyalp4j65sqx1";
   };
 
   buildInputs = [ cppo ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/carton/default.nix b/nixpkgs/pkgs/development/ocaml-modules/carton/default.nix
index 31b864e29d32..c10537d5d506 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/carton/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/carton/default.nix
@@ -7,19 +7,19 @@
 
 buildDunePackage rec {
   pname = "carton";
-  version = "0.4.0";
+  version = "0.4.1";
 
   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 = "777f9692b83cd63570c17527a32c5045818ab9242d923cbbde72fc23d0da0140";
+    sha256 = "d16aad5560d9ab1e3b4d93d2e8fdea638c216ff47338fb630a8aefd22b452665";
   };
 
   # remove changelogs for mimic and the git* packages
   postPatch = ''
-    rm CHANGES.md CHANGES.mimic.md
+    rm CHANGES.md
   '';
 
   buildInputs = [
diff --git a/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix b/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix
index 810099810470..527afec33eb3 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/checkseum/default.nix
@@ -1,23 +1,46 @@
-{ lib, fetchurl, buildDunePackage, dune-configurator
+{ lib, fetchurl, buildDunePackage, dune-configurator, pkg-config
 , bigarray-compat, optint
-, fmt, rresult
-, alcotest
+, fmt, rresult, bos, fpath, astring, alcotest
+, withFreestanding ? false
+, ocaml-freestanding
 }:
 
 buildDunePackage rec {
-  version = "0.2.1";
+  version = "0.3.1";
   pname = "checkseum";
 
   useDune2 = true;
 
+  minimumOCamlVersion = "4.07";
+
   src = fetchurl {
     url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-v${version}.tbz";
-    sha256 = "1swb44c64pcs4dh9ka9lig6d398qwwkd3kkiajicww6qk7jbh3n5";
+    sha256 = "b9e4d054e17618b1faed8c0eb15afe0614b2f093e58b59a180bda4500a5d2da1";
   };
 
-  buildInputs = [ dune-configurator fmt rresult ];
-  propagatedBuildInputs = [ bigarray-compat optint ];
-  checkInputs = lib.optionals doCheck [ alcotest ];
+  patches = [
+    ./makefile-no-opam.patch
+  ];
+
+  nativeBuildInputs = [
+    dune-configurator
+    pkg-config
+  ];
+  propagatedBuildInputs = [
+    bigarray-compat
+    optint
+  ] ++ lib.optionals withFreestanding [
+    ocaml-freestanding
+  ];
+
+  checkInputs = [
+    alcotest
+    bos
+    astring
+    fmt
+    fpath
+    rresult
+  ];
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/checkseum/makefile-no-opam.patch b/nixpkgs/pkgs/development/ocaml-modules/checkseum/makefile-no-opam.patch
new file mode 100644
index 000000000000..49fb41b2e008
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/checkseum/makefile-no-opam.patch
@@ -0,0 +1,12 @@
+diff --git a/freestanding/Makefile b/freestanding/Makefile
+index d535050..bb286bd 100644
+--- a/freestanding/Makefile
++++ b/freestanding/Makefile
+@@ -1,4 +1,6 @@
+-PKG_CONFIG_PATH := $(shell opam config var prefix)/lib/pkgconfig
++ifneq (, $(shell command -v opam))
++PKG_CONFIG_PATH ?= $(shell opam var prefix)/lib/pkgconfig
++endif
+ 
+ EXISTS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --exists ocaml-freestanding; echo $$?)
+ 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix b/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix
index 21e22533f1b2..060d2c6fb6a8 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cohttp/async.nix
@@ -1,22 +1,60 @@
-{ lib, buildDunePackage, async, cohttp, conduit-async, uri, ppx_sexp_conv
-, logs, magic-mime }:
+{ lib
+, buildDunePackage
+, ppx_sexp_conv
+, base
+, async
+, async_kernel
+, async_unix
+, cohttp
+, conduit-async
+, uri
+, uri-sexp
+, logs
+, fmt
+, sexplib0
+, ipaddr
+, magic-mime
+, ounit
+, mirage-crypto
+, core
+}:
 
-if !lib.versionAtLeast cohttp.version "0.99" then
-  cohttp
-else if !lib.versionAtLeast async.version "0.13" then
-  throw "cohttp-async needs async-0.13 (hence OCaml >= 4.08)"
-else
+buildDunePackage {
+  pname = "cohttp-async";
 
-  buildDunePackage {
-    pname = "cohttp-async";
-    useDune2 = true;
-    inherit (cohttp) version src;
+  inherit (cohttp)
+    version
+    src
+    minimumOCamlVersion
+    useDune2
+    ;
 
-    buildInputs = [ ppx_sexp_conv ];
+  buildInputs = [ ppx_sexp_conv ];
 
-    propagatedBuildInputs = [ async cohttp conduit-async logs magic-mime uri ];
+  propagatedBuildInputs = [
+    cohttp
+    conduit-async
+    async_kernel
+    async_unix
+    async
+    base
+    magic-mime
+    logs
+    fmt
+    sexplib0
+    uri
+    uri-sexp
+    ipaddr
+  ];
 
-    meta = cohttp.meta // {
-      description = "CoHTTP implementation for the Async concurrency library";
-    };
-  }
+  doCheck = true;
+  checkInputs = [
+    ounit
+    mirage-crypto
+    core
+  ];
+
+  meta = cohttp.meta // {
+    description = "CoHTTP implementation for the Async concurrency library";
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix
index 1cbc43bc2804..c1dc973d0eea 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cohttp/default.nix
@@ -1,25 +1,24 @@
 { lib, fetchurl, buildDunePackage
-, ppx_fields_conv, ppx_sexp_conv, stdlib-shims
-, base64, fieldslib, jsonm, re, stringext, uri-sexp
+, ppx_sexp_conv, base64, jsonm, re, stringext, uri-sexp
 , ocaml, fmt, alcotest
 }:
 
 buildDunePackage rec {
   pname = "cohttp";
-  version = "2.5.5";
+  version = "4.0.0";
 
   useDune2 = true;
 
-  minimumOCamlVersion = "4.04.1";
+  minimumOCamlVersion = "4.08";
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-cohttp/releases/download/v${version}/cohttp-v${version}.tbz";
-    sha256 = "0ywmql4lp6ps2gd064ixbjzsdnnn5vk3pipm005sswl553qqwaim";
+    sha256 = "bd7aa4cd2c82744990ed7c49e3ee7a40324c64cb3d8509804809155e2bacd1d2";
   };
 
-  buildInputs = [ jsonm ppx_fields_conv ppx_sexp_conv ];
+  buildInputs = [ jsonm ppx_sexp_conv ];
 
-  propagatedBuildInputs = [ base64 fieldslib re stringext uri-sexp stdlib-shims ];
+  propagatedBuildInputs = [ base64 re stringext uri-sexp ];
 
   doCheck = lib.versionAtLeast ocaml.version "4.05";
   checkInputs = [ fmt alcotest ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix b/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix
index 845df2a3f542..57885b0e65e0 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt-unix.nix
@@ -1,19 +1,28 @@
 { lib, buildDunePackage, cohttp-lwt
-, conduit-lwt-unix, ppx_sexp_conv
-, cmdliner, fmt, magic-mime
+, conduit-lwt-unix, conduit-lwt, ppx_sexp_conv
+, cmdliner, fmt, logs, magic-mime
+, ounit
+, cacert
 }:
 
-if !lib.versionAtLeast cohttp-lwt.version "0.99"
-then cohttp-lwt
-else
-
 buildDunePackage {
   pname = "cohttp-lwt-unix";
-  inherit (cohttp-lwt) version src meta;
+  inherit (cohttp-lwt) version src;
 
   useDune2 = true;
 
   buildInputs = [ cmdliner ppx_sexp_conv ];
 
-  propagatedBuildInputs = [ cohttp-lwt conduit-lwt-unix fmt magic-mime ];
+  propagatedBuildInputs = [
+    cohttp-lwt conduit-lwt conduit-lwt-unix fmt logs magic-mime
+  ];
+
+  # TODO(@sternenseemann): fail for unknown reason
+  # https://github.com/mirage/ocaml-cohttp/issues/675#issuecomment-830692742
+  doCheck = false;
+  checkInputs = [ ounit cacert ];
+
+  meta = cohttp-lwt.meta // {
+    description = "CoHTTP implementation for Unix and Windows using Lwt";
+  };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix b/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix
index 36831d946132..158aa3b27b26 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cohttp/lwt.nix
@@ -1,16 +1,21 @@
-{ lib, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv, logs }:
-
-if !lib.versionAtLeast cohttp.version "0.99"
-then cohttp
-else if !lib.versionAtLeast ppx_sexp_conv.version "0.13"
-then throw "cohttp-lwt is not available for ppx_sexp_conv version ${ppx_sexp_conv.version}"
-else
+{ lib, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv, logs, sexplib0 }:
 
 buildDunePackage {
   pname = "cohttp-lwt";
-  inherit (cohttp) version src useDune2 meta;
+  inherit (cohttp)
+    version
+    src
+    useDune2
+    minimumOCamlVersion
+    ;
+
+  buildInputs = [ ppx_sexp_conv ];
 
-  buildInputs = [ uri ppx_sexp_conv ];
+  propagatedBuildInputs = [
+    cohttp ocaml_lwt logs sexplib0 uri
+  ];
 
-  propagatedBuildInputs = [ cohttp ocaml_lwt logs ];
+  meta = cohttp.meta // {
+    description = "CoHTTP implementation using the Lwt concurrency library";
+  };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cohttp/mirage.nix b/nixpkgs/pkgs/development/ocaml-modules/cohttp/mirage.nix
index e7b172349cb9..d2d3e945645b 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/cohttp/mirage.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/cohttp/mirage.nix
@@ -2,6 +2,7 @@
 , mirage-flow, mirage-channel, mirage-kv
 , conduit, conduit-mirage, lwt
 , astring, magic-mime
+, ppx_sexp_conv
 }:
 
 buildDunePackage {
@@ -9,6 +10,8 @@ buildDunePackage {
 
   inherit (cohttp) version src minimumOCamlVersion useDune2;
 
+  nativeBuildInputs = [ ppx_sexp_conv ];
+
   propagatedBuildInputs = [
     mirage-flow mirage-channel conduit conduit-mirage mirage-kv
     lwt cohttp cohttp-lwt astring magic-mime
diff --git a/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix b/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix
index c15ad0520fb2..e78cb2bc5165 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/conduit/async.nix
@@ -1,17 +1,17 @@
-{ lib, buildDunePackage, async, async_ssl, ppx_sexp_conv, conduit }:
-
-if !lib.versionAtLeast conduit.version "1.0"
-then conduit
-else
+{ lib, buildDunePackage, async, async_ssl, ppx_sexp_conv, ppx_here, uri, conduit }:
 
 buildDunePackage {
   pname = "conduit-async";
-  useDune2 = true;
-  inherit (conduit) version src;
+  inherit (conduit)
+    version
+    src
+    minimumOCamlVersion
+    useDune2
+    ;
 
-  buildInputs = [ ppx_sexp_conv ];
+  buildInputs = [ ppx_sexp_conv ppx_here ];
 
-  propagatedBuildInputs = [ async async_ssl conduit ];
+  propagatedBuildInputs = [ async async_ssl conduit uri ];
 
   meta = conduit.meta // {
     description = "A network connection establishment library for Async";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix b/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix
index 8c9b757f87c3..96f5bf43d214 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix
@@ -5,18 +5,18 @@
 
 buildDunePackage rec {
   pname = "conduit";
-  version = "2.2.2";
+  version = "4.0.0";
   useDune2 = true;
 
-  minimumOCamlVersion = "4.07";
+  minimumOCamlVersion = "4.03";
 
   src = fetchurl {
-    url = "https://github.com/mirage/ocaml-conduit/releases/download/v2.2.2/conduit-v2.2.2.tbz";
-    sha256 = "1zb83w2pq9c8xrappfxa6y5q93772f5dj22x78camsm77a2c2z55";
+    url = "https://github.com/mirage/ocaml-conduit/releases/download/v${version}/conduit-v${version}.tbz";
+    sha256 = "74b29d72bf47adc5d5c4cae6130ad5a2a4923118b9c571331bd1cb3c56decd2a";
   };
 
   buildInputs = [ ppx_sexp_conv ];
-  propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri ];
+  propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri logs ];
 
   meta = {
     description = "A network connection establishment library";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix b/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix
index ab6449b50a17..ce6016012d76 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/conduit/lwt-unix.nix
@@ -1,18 +1,31 @@
 { buildDunePackage
-, conduit-lwt, ppx_sexp_conv, ocaml_lwt, uri, ipaddr, ipaddr-sexp
-, lwt_ssl, tls
+, conduit-lwt, ppx_sexp_conv, ocaml_lwt, uri, ipaddr, ipaddr-sexp, ca-certs, logs
+, lwt_ssl, tls, lwt_log, ssl
 }:
 
 buildDunePackage {
   pname = "conduit-lwt-unix";
-  inherit (conduit-lwt) version src minimumOCamlVersion;
-
-  useDune2 = true;
+  inherit (conduit-lwt) version src minimumOCamlVersion useDune2;
 
   buildInputs = [ ppx_sexp_conv ];
 
-  propagatedBuildInputs =
-    [ conduit-lwt ocaml_lwt uri ipaddr ipaddr-sexp tls lwt_ssl ];
+  propagatedBuildInputs = [
+    conduit-lwt
+    ocaml_lwt
+    uri
+    ipaddr
+    ipaddr-sexp
+    tls
+    ca-certs
+    logs
+    lwt_ssl
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    lwt_log
+    ssl
+  ];
 
   meta = conduit-lwt.meta // {
     description = "A network connection establishment library for Lwt_unix";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/conduit/mirage.nix b/nixpkgs/pkgs/development/ocaml-modules/conduit/mirage.nix
index 6100908f785b..d1f636be93c4 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/conduit/mirage.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/conduit/mirage.nix
@@ -1,7 +1,8 @@
 { buildDunePackage, conduit-lwt
-, ppx_sexp_conv, sexplib, cstruct, mirage-stack, mirage-flow
+, ppx_sexp_conv, sexplib, uri, cstruct, mirage-stack, mirage-flow
 , mirage-flow-combinators, mirage-random, mirage-time, mirage-clock
 , dns-client, vchan, xenstore, tls, tls-mirage, ipaddr, ipaddr-sexp
+, tcpip, ca-certs-nss
 }:
 
 buildDunePackage {
@@ -12,10 +13,10 @@ buildDunePackage {
   nativeBuildInputs = [ ppx_sexp_conv ];
 
   propagatedBuildInputs = [
-    sexplib cstruct mirage-stack mirage-clock mirage-flow
+    sexplib uri cstruct mirage-stack mirage-clock mirage-flow
     mirage-flow-combinators mirage-random mirage-time
     dns-client conduit-lwt vchan xenstore tls tls-mirage
-    ipaddr ipaddr-sexp
+    ipaddr ipaddr-sexp tcpip ca-certs-nss
   ];
 
   meta = conduit-lwt.meta // {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix b/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix
index c3847acb9594..b0df52061520 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/containers/default.nix
@@ -5,7 +5,7 @@
 }:
 
 buildDunePackage rec {
-  version = "3.0.1";
+  version = "3.4";
   pname = "containers";
 
   useDune2 = true;
@@ -14,7 +14,7 @@ buildDunePackage rec {
     owner = "c-cube";
     repo = "ocaml-containers";
     rev = "v${version}";
-    sha256 = "1m19cfcwks3xcj16nqldfb49dg0vdc7by1q1j8bpac3z2mjvks0l";
+    sha256 = "0ixpy81p6rc3lq71djfndb2sg2hfj20j1jbzzrrmgqsysqdjsgzz";
   };
 
   buildInputs = [ dune-configurator ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/cooltt/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cooltt/default.nix
new file mode 100644
index 000000000000..2ece4543c2a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/cooltt/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, fetchFromGitHub
+, buildDunePackage
+, cmdliner
+, menhir
+, menhirLib
+, ppx_deriving
+, ppxlib
+, uuseg
+, uutf
+}:
+
+buildDunePackage {
+  pname = "cooltt";
+  version = "unstable-2021-05-25";
+
+  minimumOCamlVersion = "4.10";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "RedPRL";
+    repo = "cooltt";
+    rev = "8ac06cbf7e05417d777f3ac6a471fe3576249f79";
+    sha256 = "sha256-JBLNJaRuP/gwlg8RS3cpOpzxChOVKfmFulf5HKhhHh4=";
+  };
+
+  nativeBuildInputs = [
+    cmdliner
+    menhir
+    ppxlib
+  ];
+
+  propagatedBuildInputs = [
+    menhirLib
+    ppx_deriving
+    uuseg
+    uutf
+  ];
+
+  meta = with lib; {
+    homepage = "https://github.com/RedPRL/cooltt";
+    description = "A cool implementation of normalization by evaluation (nbe) & elaboration for Cartesian cubical type theory";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ fortuneteller2k ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix b/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix
index 4bb83019dc5c..664d9a773ab0 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/csexp/default.nix
@@ -2,23 +2,24 @@
 
 buildDunePackage rec {
   pname = "csexp";
-  version = "1.4.0";
-
-  useDune2 = true;
-
-  minimumOCamlVersion = "4.02.3";
+  version = "1.5.1";
 
   src = fetchurl {
     url = "https://github.com/ocaml-dune/csexp/releases/download/${version}/csexp-${version}.tbz";
-    sha256 = "sha256-jj1vyofxAqEm3ui3KioNFG8QQ5xHIY38FJ1Rvz7fNk4=";
+    sha256 = "sha256-1gXkBl+pCliABEDvLzOi2TE5i/LCIGGorLffhFwKrAI=";
   };
 
-  propagatedBuildInputs = [ result ];
+  minimumOCamlVersion = "4.03";
+  useDune2 = true;
+
+  propagatedBuildInputs = [
+    result
+  ];
 
   meta = with lib; {
-    homepage = "https://github.com/ocaml-dune/csexp";
+    homepage = "https://github.com/ocaml-dune/csexp/";
     description = "Minimal support for Canonical S-expressions";
     license = licenses.mit;
-    maintainers = [ maintainers.marsam ];
+    maintainers = with maintainers; [ marsam ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/csv/csvtool.nix b/nixpkgs/pkgs/development/ocaml-modules/csv/csvtool.nix
new file mode 100644
index 000000000000..12c0dfa160e6
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/csv/csvtool.nix
@@ -0,0 +1,16 @@
+{ lib, ocamlPackages }:
+
+let inherit (ocamlPackages) buildDunePackage csv uutf; in
+
+buildDunePackage {
+  pname = "csvtool";
+  inherit (csv) src version useDune2;
+
+  buildInputs = [ csv uutf ];
+
+  doCheck = true;
+
+  meta = csv.meta // {
+    description = "Command line tool for handling CSV files";
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix b/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix
index 595624531759..d4c3d72a6d80 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/csv/default.nix
@@ -4,13 +4,13 @@ buildDunePackage rec {
   pname = "csv";
   version = "2.4";
 
-  useDune2 = true;
-
   src = fetchurl {
     url = "https://github.com/Chris00/ocaml-${pname}/releases/download/${version}/csv-${version}.tbz";
     sha256 = "13m9n8mdss6jfbiw7d5bybxn4n85vmg4zw7dc968qrgjfy0w9zhk";
   };
 
+  useDune2 = true;
+
   meta = {
     description = "A pure OCaml library to read and write CSV files";
     license = lib.licenses.lgpl21;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix b/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix
index 1c48b509c414..20197e207af3 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/curly/default.nix
@@ -1,5 +1,6 @@
 { stdenv, lib, buildDunePackage, fetchurl, ocaml
-, result, alcotest, cohttp-lwt-unix, odoc, curl }:
+, result, alcotest, cohttp-lwt-unix, odoc, curl, cacert
+}:
 
 buildDunePackage rec {
   pname = "curly";
@@ -15,8 +16,9 @@ buildDunePackage rec {
   };
 
   propagatedBuildInputs = [ result ];
-  checkInputs = [ alcotest cohttp-lwt-unix ];
+  checkInputs = [ alcotest cohttp-lwt-unix cacert ];
   # test dependencies are only available for >= 4.08
+  # https://github.com/mirage/ca-certs/issues/16
   doCheck = lib.versionAtLeast ocaml.version "4.08"
     # Some test fails in macOS sandbox
     # > Fatal error: exception Unix.Unix_error(Unix.EPERM, "bind", "")
diff --git a/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix b/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix
index d2cba68d732e..505ffe3c4257 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/decompress/default.nix
@@ -4,7 +4,7 @@
 }:
 
 buildDunePackage rec {
-  version = "1.3.0";
+  version = "1.4.0";
   pname = "decompress";
 
   minimumOCamlVersion = "4.07";
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   src = fetchurl {
     url = "https://github.com/mirage/decompress/releases/download/v${version}/decompress-v${version}.tbz";
-    sha256 = "de149896939be13fedec46a4581121d5ab74850a2241d08e6aa8ae4bb18c52c4";
+    sha256 = "d1669e07446d73dd5e16f020d4a1682abcbb1b7a1e3bf19b805429636c26a19b";
   };
 
   buildInputs = [ cmdliner ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dns/certify.nix b/nixpkgs/pkgs/development/ocaml-modules/dns/certify.nix
index 1835114d707c..31b39d18225c 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dns/certify.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dns/certify.nix
@@ -1,6 +1,6 @@
 { buildDunePackage, dns, dns-tsig, dns-mirage, randomconv, x509
 , mirage-random, mirage-time, mirage-clock, mirage-stack
-, logs, mirage-crypto-pk, mirage-crypto-rng, tls, lwt
+, logs, mirage-crypto-pk, mirage-crypto-rng, mirage-crypto-ec, lwt
 }:
 
 buildDunePackage {
@@ -21,7 +21,7 @@ buildDunePackage {
     logs
     mirage-crypto-pk
     mirage-crypto-rng
-    tls
+    mirage-crypto-ec
     lwt
   ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix
index 4f0b95da6cb3..8a5115f10f05 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dns/default.nix
@@ -4,14 +4,14 @@
 
 buildDunePackage rec {
   pname = "dns";
-  version = "4.6.3";
+  version = "5.0.1";
 
   useDune2 = true;
   minimumOCamlVersion = "4.07";
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-dns/releases/download/v${version}/dns-v${version}.tbz";
-    sha256 = "0g7xw43jm5hv0w9lsnhhi0w3243mxl615cdsvz29yh39fcqvqsdy";
+    sha256 = "72c0a1a91c8e409bd448c8e0ea28d16d13177c326aea403ee1c30ddcb5969adc";
   };
 
   propagatedBuildInputs = [ rresult astring fmt logs ptime domain-name gmap cstruct ipaddr lru duration metrics ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix
index a1a73bfe2188..815e1acd72ac 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dolmen/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir }:
+{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, menhirLib }:
 
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-dolmen-${version}";
@@ -10,8 +10,8 @@ stdenv.mkDerivation rec {
     sha256 = "1b9mf8p6mic0n76acx8x82hhgm2n40sdv0jri95im65l52223saf";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ];
-  propagatedBuildInputs = [ menhir ];
+  buildInputs = [ ocaml findlib ocamlbuild menhir ];
+  propagatedBuildInputs = [ menhirLib ];
 
   makeFlags = [ "-C" "src" ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix b/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix
index 07e9b5a35461..a6a3648bec65 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/earlybird/default.nix
@@ -1,5 +1,5 @@
 { lib, fetchurl, ocaml, buildDunePackage
-, cmdliner, dap, fmt, iter, logs, lru, lwt_ppx, lwt_react, menhir, path_glob, ppx_deriving_yojson
+, cmdliner, dap, fmt, iter, logs, lru, lwt_ppx, lwt_react, menhir, menhirLib, path_glob, ppx_deriving_yojson
 }:
 
 if lib.versionAtLeast ocaml.version "4.13"
@@ -19,7 +19,7 @@ buildDunePackage rec {
     sha256 = "1pwzhcr3pw24ra4j4d23vz71h0psz4xkyp7b12l2wl1slxzjbrxa";
   };
 
-  buildInputs = [ cmdliner dap fmt iter logs lru lwt_ppx lwt_react menhir path_glob ppx_deriving_yojson ];
+  buildInputs = [ cmdliner dap fmt iter logs lru lwt_ppx lwt_react menhir menhirLib path_glob ppx_deriving_yojson ];
 
   meta = {
     homepage = "https://github.com/hackwaly/ocamlearlybird";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix b/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix
index c86b7cba0103..47b002fd7302 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/eigen/default.nix
@@ -15,7 +15,7 @@ buildDunePackage rec {
 
   minimumOCamlVersion = "4.02";
 
-  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
+  NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
 
   propagatedBuildInputs = [ ctypes ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix b/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix
index 38ba8f478bda..642a249e4937 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/elpi/default.nix
@@ -1,10 +1,11 @@
 { stdenv, lib, fetchzip, buildDunePackage, camlp5
 , ppxlib, ppx_deriving, re, perl, ncurses
-, version ? "1.13.1"
+, version ? "1.13.5"
 }:
 with lib;
 let fetched = import ../../../build-support/coq/meta-fetch/default.nix
   {inherit lib stdenv fetchzip; } ({
+    release."1.13.5".sha256 = "02a6r23mximrdvs6kgv6rp0r2dgk7zynbs99nn7lphw2c4189kka";
     release."1.13.1".sha256 = "12a9nbdvg9gybpw63lx3nw5wnxfznpraprb0wj3l68v1w43xq044";
     release."1.13.0".sha256 = "0dmzy058m1mkndv90byjaik6lzzfk3aaac7v84mpmkv6my23bygr";
     release."1.12.0".sha256 = "1agisdnaq9wrw3r73xz14yrq3wx742i6j8i5icjagqk0ypmly2is";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/extlib/1.7.7.nix b/nixpkgs/pkgs/development/ocaml-modules/extlib/1.7.7.nix
index 3314ebcb9b5d..d27fe085569f 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/extlib/1.7.7.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/extlib/1.7.7.nix
@@ -1,11 +1,14 @@
 # Older version of extlib for Haxe 4.0 and 4.1.
 # May be replaceable by the next extlib + extlib-base64 release.
-{ fetchurl, ocaml_extlib }:
+{ lib, fetchurl, ocaml, ocaml_extlib }:
 
-ocaml_extlib.overrideAttrs (_: rec {
+ocaml_extlib.overrideAttrs (x: rec {
   version = "1.7.7";
   src = fetchurl {
     url = "https://github.com/ygrek/ocaml-extlib/releases/download/${version}/extlib-${version}.tar.gz";
     sha256 = "1sxmzc1mx3kg62j8kbk0dxkx8mkf1rn70h542cjzrziflznap0s1";
   };
+  meta = x.meta // {
+    broken = lib.versionAtLeast ocaml.version "4.12";
+  };
 })
diff --git a/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix b/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix
index d4ce484653b9..ffd0b5003ce4 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/fix/default.nix
@@ -1,25 +1,24 @@
-{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild }:
+{ lib, fetchFromGitLab, buildDunePackage }:
 
-assert lib.versionAtLeast (lib.getVersion ocaml) "3.12";
+buildDunePackage rec {
+  pname = "fix";
+  version = "20201120";
 
-stdenv.mkDerivation {
-
-  name = "ocaml-fix-20130611";
-
-  src = fetchurl {
-    url = "http://gallium.inria.fr/~fpottier/fix/fix-20130611.tar.gz";
-    sha256 = "1phlqcs1nb93x9cf0w0hnq2ck4dmn71zm4mxf60w96vb9yb9qzp0";
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "fpottier";
+    repo = "fix";
+    rev = "${version}";
+    sha256 = "sha256-RO+JCG6R2i5uZfwTYEnQBCVq963fjv5lA2wA/8KrgMg=";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild ];
-
-  createFindlibDestdir = true;
+  minimumOCamlVersion = "4.03";
+  useDune2 = true;
 
   meta = with lib; {
-    homepage = "http://gallium.inria.fr/~fpottier/fix/";
+    homepage = "https://gitlab.inria.fr/fpottier/fix/";
     description = "A simple OCaml module for computing the least solution of a system of monotone equations";
     license = licenses.cecill-c;
-    maintainers = [ maintainers.vbgl ];
-    platforms = ocaml.meta.platforms or [];
+    maintainers = with maintainers; [ vbgl ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/git/cohttp-mirage.nix b/nixpkgs/pkgs/development/ocaml-modules/git/cohttp-mirage.nix
deleted file mode 100644
index d30884006410..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/git/cohttp-mirage.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ 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/nixpkgs/pkgs/development/ocaml-modules/git/default.nix b/nixpkgs/pkgs/development/ocaml-modules/git/default.nix
index b8d73178d09b..954e4956c816 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/git/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/git/default.nix
@@ -1,30 +1,35 @@
 { stdenv, lib, fetchurl, buildDunePackage
 , alcotest, mtime, mirage-crypto-rng, tls, git-binary
 , angstrom, astring, cstruct, decompress, digestif, encore, duff, fmt, checkseum
-, fpath, ke, logs, lwt, ocamlgraph, uri, rresult, base64
+, fpath, ke, logs, lwt, ocamlgraph, uri, rresult, base64, hxd
 , result, bigstringaf, optint, mirage-flow, domain-name, emile
 , mimic, carton, carton-lwt, carton-git, ipaddr, psq, crowbar, alcotest-lwt
 }:
 
 buildDunePackage rec {
   pname = "git";
-  version = "3.3.3";
+  version = "3.4.0";
 
   minimumOCamlVersion = "4.08";
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-git/releases/download/${version}/git-${version}.tbz";
-    sha256 = "0j8pw9w74bfhrjsqr8zm8g7h1az94z9vg7qgc6z6649zm9yjiax3";
+    sha256 = "6eef1240c7c85a8e495b82ef863c509ad41d75e0c45cf73c34ed1bdafd03413f";
   };
 
+  # remove changelog for the carton package
+  postPatch = ''
+    rm CHANGES.carton.md
+  '';
+
   buildInputs = [
     base64
   ];
   propagatedBuildInputs = [
     angstrom astring checkseum cstruct decompress digestif encore duff fmt fpath
     ke logs lwt ocamlgraph uri rresult result bigstringaf optint mirage-flow
-    domain-name emile mimic carton carton-lwt carton-git ipaddr psq
+    domain-name emile mimic carton carton-lwt carton-git ipaddr psq hxd
   ];
   checkInputs = [
     alcotest alcotest-lwt mtime mirage-crypto-rng tls git-binary crowbar
diff --git a/nixpkgs/pkgs/development/ocaml-modules/git/paf.nix b/nixpkgs/pkgs/development/ocaml-modules/git/paf.nix
new file mode 100644
index 000000000000..cf0272ddf3b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/git/paf.nix
@@ -0,0 +1,49 @@
+{ lib, buildDunePackage
+, git
+, mimic
+, paf
+, ca-certs-nss
+, cohttp
+, cohttp-lwt
+, fmt
+, ipaddr
+, logs
+, lwt
+, mirage-clock
+, mirage-stack
+, mirage-time
+, result
+, rresult
+, tls
+, uri
+}:
+
+buildDunePackage {
+  pname = "git-paf";
+
+  inherit (git) version src minimumOCamlVersion useDune2;
+
+  propagatedBuildInputs = [
+    git
+    mimic
+    paf
+    ca-certs-nss
+    cohttp
+    cohttp-lwt
+    fmt
+    lwt
+    result
+    rresult
+    ipaddr
+    logs
+    mirage-clock
+    mirage-stack
+    mirage-time
+    tls
+    uri
+  ];
+
+  meta = git.meta // {
+    description = "A package to use HTTP-based ocaml-git with MirageOS backend";
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/git/unix.nix b/nixpkgs/pkgs/development/ocaml-modules/git/unix.nix
index f4cea472886d..3e5f464cea06 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/git/unix.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/git/unix.nix
@@ -6,7 +6,8 @@
 , tcpip, awa-mirage, mirage-flow
 , alcotest, alcotest-lwt, base64, cstruct
 , ke, mirage-crypto-rng, ocurl, git-binary
-, ptime
+, ptime, mimic, ca-certs-nss, tls, tls-mirage
+, cacert
 }:
 
 buildDunePackage {
@@ -24,10 +25,14 @@ buildDunePackage {
     fmt bos fpath uri digestif logs lwt
     astring cohttp-lwt-unix decompress
     domain-name ipaddr mtime mirage-flow
+    cstruct ptime mimic ca-certs-nss
+    tls tls-mirage
   ];
   checkInputs = [
-    alcotest alcotest-lwt base64 cstruct ke
-    mirage-crypto-rng ocurl git-binary ptime
+    alcotest alcotest-lwt base64 ke
+    mirage-crypto-rng git-binary
+    cohttp-lwt-unix
+    cacert # sets up NIX_SSL_CERT_FILE
   ];
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/containers.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/containers.nix
index 761e9bf5619e..76383099a41d 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/containers.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/containers.nix
@@ -1,6 +1,6 @@
 { buildDunePackage
 , irmin, irmin-unix, irmin-git, ppx_irmin, lwt, mtime
-, alcotest, alcotest-lwt
+, alcotest, alcotest-lwt, cacert
 }:
 
 buildDunePackage {
@@ -18,7 +18,7 @@ buildDunePackage {
 
   doCheck = true;
   checkInputs = [
-    alcotest alcotest-lwt
+    alcotest alcotest-lwt cacert
   ];
 
   meta = ppx_irmin.meta // {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix
index a6c1e8af8fa4..d477c932928e 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/git.nix
@@ -1,7 +1,7 @@
 { lib, buildDunePackage
 , git, irmin, irmin-test, ppx_irmin, git-cohttp-unix, git-unix
 , digestif, cstruct, fmt, astring, fpath, logs, lwt, uri
-, mtime, alcotest
+, mtime, alcotest, cacert
 }:
 
 buildDunePackage {
@@ -26,7 +26,7 @@ buildDunePackage {
     uri
   ];
 
-  checkInputs = [ mtime alcotest git-cohttp-unix git-unix irmin-test ];
+  checkInputs = [ mtime alcotest git-cohttp-unix git-unix irmin-test cacert ];
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix
index ca205cac4e15..03c8f1eca291 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/graphql.nix
@@ -1,5 +1,5 @@
 { lib, buildDunePackage, cohttp-lwt, graphql-cohttp, graphql-lwt, irmin
-, alcotest, alcotest-lwt, logs, yojson, cohttp-lwt-unix
+, alcotest, alcotest-lwt, logs, yojson, cohttp-lwt-unix, cacert
 }:
 
 buildDunePackage rec {
@@ -19,6 +19,7 @@ buildDunePackage rec {
     logs
     cohttp-lwt-unix
     yojson
+    cacert
   ];
 
   meta = irmin.meta // {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix
index b50e0b873454..7bfae9982021 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/http.nix
@@ -1,5 +1,6 @@
 { lib, buildDunePackage, cohttp-lwt, irmin, webmachine
 , checkseum, git-unix, irmin-git, irmin-test, digestif, git-cohttp-unix
+, cacert
 }:
 
 buildDunePackage rec {
@@ -12,7 +13,9 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ cohttp-lwt irmin webmachine ];
 
-  checkInputs = [ digestif checkseum git-cohttp-unix git-unix irmin-git irmin-test ];
+  checkInputs = [
+    digestif checkseum git-cohttp-unix git-unix irmin-git irmin-test cacert
+  ];
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/mirage-git.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/mirage-git.nix
index dfa84ff2335d..e33b766bd4cb 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/mirage-git.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/mirage-git.nix
@@ -1,6 +1,6 @@
 { buildDunePackage, irmin-mirage, irmin-git
 , mirage-kv, cohttp, conduit-lwt, conduit-mirage
-, git-cohttp-mirage, fmt, git, lwt, mirage-clock, uri
+, git-paf, fmt, git, lwt, mirage-clock, uri
 }:
 
 buildDunePackage {
@@ -15,7 +15,7 @@ buildDunePackage {
     cohttp
     conduit-lwt
     conduit-mirage
-    git-cohttp-mirage
+    git-paf
     fmt
     git
     lwt
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix
index 7c59e1eaef34..c7eed70d9d99 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/ppx.nix
@@ -2,11 +2,11 @@
 
 buildDunePackage rec {
   pname = "ppx_irmin";
-  version = "2.5.3";
+  version = "2.6.0";
 
   src = fetchurl {
     url = "https://github.com/mirage/irmin/releases/download/${version}/irmin-${version}.tbz";
-    sha256 = "2c8ef24cc57379c3a138f121fea350ee7b6077abc22a4fdc6a47d0c81585f3f6";
+    sha256 = "1db134221e82c424260a0e206b640fcb82902be35eea4137af2bcd9c98d3ac0f";
   };
 
   minimumOCamlVersion = "4.08";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix b/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix
index a3dfb5d508c2..89cf36979bde 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/irmin/unix.nix
@@ -1,7 +1,7 @@
 { lib, buildDunePackage
 , checkseum, cmdliner, git-unix, git-cohttp-unix, yaml, fpath
 , irmin, irmin-fs, irmin-git, irmin-graphql, irmin-http
-, irmin-pack, irmin-watcher, irmin-test
+, irmin-pack, irmin-watcher, irmin-test, cacert
 }:
 
 buildDunePackage rec {
@@ -18,7 +18,9 @@ buildDunePackage rec {
     irmin-pack irmin-watcher git-cohttp-unix
   ];
 
-  checkInputs = lib.optional doCheck irmin-test;
+  checkInputs = [
+    irmin-test cacert
+  ];
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix b/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix
index eb429b2bb6dc..e348c5d9325a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix
@@ -1,4 +1,5 @@
 { self
+, lib
 , openssl
 , zstd
 }:
@@ -40,6 +41,7 @@ with self;
     version = "0.14.1";
     hash = "1cdkv34m6czhacivpbb2sasj83fgcid6gnqk30ig9i84z8nh2gw2";
     meta.description = "Accessors for Core types, for use with the Accessor library";
+    meta.broken = lib.versionAtLeast ocaml.version "4.12";
     propagatedBuildInputs = [ accessor_base core_kernel ];
   };
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/junit/alcotest.nix b/nixpkgs/pkgs/development/ocaml-modules/junit/alcotest.nix
new file mode 100644
index 000000000000..85abaf7f872b
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/junit/alcotest.nix
@@ -0,0 +1,14 @@
+{ buildDunePackage, junit, alcotest }:
+
+buildDunePackage ({
+  pname = "junit_alcotest";
+
+  inherit (junit) src version meta useDune2;
+
+  propagatedBuildInputs = [
+    junit
+    alcotest
+  ];
+
+  doCheck = false; # 2 tests fail: 1) "Test with unexpected exception"; 2) "with wrong result";
+})
diff --git a/nixpkgs/pkgs/development/ocaml-modules/junit/default.nix b/nixpkgs/pkgs/development/ocaml-modules/junit/default.nix
new file mode 100644
index 000000000000..c91625e823b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/junit/default.nix
@@ -0,0 +1,26 @@
+{ lib, fetchurl, buildDunePackage, ptime, tyxml }:
+
+buildDunePackage (rec {
+  pname = "junit";
+  version = "2.0.2";
+
+  src = fetchurl {
+    url = "https://github.com/Khady/ocaml-junit/releases/download/${version}/junit-${version}.tbz";
+    sha256 = "00bbx5j8vsy9fqbc04xa3lsalaxicirmbczr65bllfk1afv43agx";
+  };
+
+  propagatedBuildInputs = [
+    ptime
+    tyxml
+  ];
+
+  useDune2 = true;
+  doCheck = true;
+
+  meta = with lib; {
+    description = "ocaml-junit is an OCaml package for the creation of JUnit XML reports, proving a typed API to produce valid reports acceptable to Jenkins, comes with packages supporting OUnit and Alcotest.";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ superherointj ];
+    homepage = "https://github.com/Khady/ocaml-junit";
+  };
+})
diff --git a/nixpkgs/pkgs/development/ocaml-modules/junit/ounit.nix b/nixpkgs/pkgs/development/ocaml-modules/junit/ounit.nix
new file mode 100644
index 000000000000..5f261b07236f
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/junit/ounit.nix
@@ -0,0 +1,14 @@
+{ buildDunePackage, junit, ounit }:
+
+buildDunePackage ({
+  pname = "junit_ounit";
+
+  inherit (junit) src version meta useDune2;
+
+  propagatedBuildInputs = [
+    junit
+    ounit
+  ];
+
+  doCheck = true;
+})
diff --git a/nixpkgs/pkgs/development/ocaml-modules/letsencrypt/default.nix b/nixpkgs/pkgs/development/ocaml-modules/letsencrypt/default.nix
index b3c0d4f89412..0a70bf302428 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/letsencrypt/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/letsencrypt/default.nix
@@ -31,11 +31,11 @@
 
 buildDunePackage rec {
   pname = "letsencrypt";
-  version = "0.2.4";
+  version = "0.2.5";
 
   src = fetchurl {
     url = "https://github.com/mmaker/ocaml-letsencrypt/releases/download/v${version}/letsencrypt-v${version}.tbz";
-    sha256 = "91c79828a50243804da29c17563c54d2d528a79207e5b874dce6a3e7fedf7567";
+    sha256 = "6e3bbb5f593823d49e83e698c06cf9ed48818695ec8318507b311ae74731e607";
   };
 
   minimumOCamlVersion = "4.08";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix b/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix
index 34fe75a2943f..f984a28869e1 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/llvm/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, lib, fetchpatch, python, cmake, llvm, ocaml, findlib, ctypes }:
+{ stdenv, lib, fetchpatch, python, cmake, libllvm, ocaml, findlib, ctypes }:
 
-let version = lib.getVersion llvm; in
+let version = lib.getVersion libllvm; in
 
 stdenv.mkDerivation {
   pname = "ocaml-llvm";
   inherit version;
 
-  inherit (llvm) src;
+  inherit (libllvm) src;
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ python ocaml findlib ctypes ];
-  propagatedBuildInputs = [ llvm ];
+  propagatedBuildInputs = [ libllvm ];
 
   patches = [ (fetchpatch {
     url = "https://raw.githubusercontent.com/ocaml/opam-repository/2bdc193f5a9305ea93bf0f0dfc1fbc327c8b9306/packages/llvm/llvm.7.0.0/files/fix-shared.patch";
@@ -20,7 +20,7 @@ stdenv.mkDerivation {
   cmakeFlags = [
     "-DLLVM_OCAML_OUT_OF_TREE=TRUE"
     "-DLLVM_OCAML_INSTALL_PATH=${placeholder "out"}/ocaml"
-    "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR=${lib.getLib llvm}/lib"
+    "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR=${lib.getLib libllvm}/lib"
   ];
 
   buildFlags = [ "ocaml_all" ];
@@ -34,11 +34,11 @@ stdenv.mkDerivation {
   '';
 
   passthru = {
-    inherit llvm;
+    inherit libllvm;
   };
 
   meta = {
-    inherit (llvm.meta) license homepage;
+    inherit (libllvm.meta) license homepage;
     platforms = ocaml.meta.platforms or [];
     description = "OCaml bindings distributed with LLVM";
     maintainers = with lib.maintainers; [ vbgl ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/luv/default.nix b/nixpkgs/pkgs/development/ocaml-modules/luv/default.nix
index 6ad5ce5d4879..41fdbc4eedcd 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/luv/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/luv/default.nix
@@ -6,12 +6,12 @@
 
 buildDunePackage rec {
   pname = "luv";
-  version = "0.5.7";
+  version = "0.5.8";
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/aantron/luv/releases/download/${version}/luv-${version}.tar.gz";
-    sha256 = "0wjnw5riydnzsk1xdzljlpzdnjwpa0j597y6x6ma4990mqj54260";
+    sha256 = "1y3g7jvb72frckjl92zyn7hzmzjy1fy4a48992jdk80vphsdzgmk";
   };
 
   postConfigure = ''
diff --git a/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix b/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix
index ee0c3b5b00cc..b0f73546eed9 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/lwt/default.nix
@@ -8,13 +8,13 @@ let inherit (lib) optional versionAtLeast; in
 
 buildDunePackage rec {
   pname = "lwt";
-  version = "5.4.0";
+  version = "5.4.1";
 
   useDune2 = true;
 
   src = fetchzip {
     url = "https://github.com/ocsigen/${pname}/archive/${version}.tar.gz";
-    sha256 = "1ay1zgadnw19r9hl2awfjr22n37l7rzxd9v73pjbahavwm2ay65d";
+    sha256 = "0cq2qy23sa1a5zk6nja3c652mp29i84yfrkcwks6i8sdqwli36jy";
   };
 
   nativeBuildInputs = [ pkg-config ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix b/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix
index cbb759205e03..686cf9820580 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/menhir/default.nix
@@ -1,15 +1,15 @@
-{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
-, version ? if lib.versionAtLeast (lib.getVersion ocaml) "4.02" then "20190626" else "20140422"
-}@args:
-
-let
-  src = fetchurl (
-  if version == "20140422" then { url = "http://cristal.inria.fr/~fpottier/menhir/menhir-20140422.tar.gz"; sha256 = "1ki1f2id6a14h9xpv2k8yb6px7dyw8cvwh39csyzj4qpzx7wia0d"; }
-  else if version == "20170712" then { url = "http://gallium.inria.fr/~fpottier/menhir/menhir-20170712.tar.gz"; sha256 = "006hq3bwj81j67f2k9cgzj5wr4hai8j36925p5n3sd2j01ljsj6a"; }
-  else if version == "20181113" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz"; sha256 = "0hl611l0gyl7b2bm7m0sk7vjz14m0i7znrnjq3gw58pylj934dx4"; }
-  else if version == "20190626" then { url = "https://gitlab.inria.fr/fpottier/menhir/repository/20190626/archive.tar.gz"; sha256 = "0nigjnskg89knyi2zj1w211mb1pvkrwfqpz9a0qbw80k3hm8gg0h"; }
-  else throw ("menhir: unknown version " ++ version)
-  );
-in
-
-import ./generic.nix (args // { inherit version src; })
+{ lib, fetchFromGitLab, buildDunePackage
+, menhirLib, menhirSdk
+}:
+
+buildDunePackage rec {
+  pname = "menhir";
+
+  inherit (menhirLib) version src useDune2;
+
+  buildInputs = [ menhirLib menhirSdk ];
+
+  meta = menhirSdk.meta // {
+    description = "A LR(1) parser generator for OCaml";
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix b/nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix
deleted file mode 100644
index a917d634a19c..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/menhir/generic.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{ version, src, lib, stdenv, ocaml, findlib, ocamlbuild, ... }:
-
-stdenv.mkDerivation {
-  pname = "menhir";
-  inherit version;
-
-  inherit src;
-
-  buildInputs = [ ocaml findlib ocamlbuild ];
-
-  createFindlibDestdir = true;
-
-  preBuild = ''
-    # fix makefiles.
-    RM=$(type -p rm)
-    CHMOD=$(type -p chmod)
-    for f in src/Makefile demos/OMakefile* demos/Makefile*
-    do
-      substituteInPlace $f \
-        --replace /bin/rm $RM \
-        --replace /bin/chmod $CHMOD
-    done
-
-    export PREFIX=$out
-  '';
-
-  meta = with lib; {
-    homepage = "http://pauillac.inria.fr/~fpottier/menhir/";
-    description = "A LR(1) parser generator for OCaml";
-    longDescription = ''
-      Menhir is a LR(1) parser generator for the Objective Caml programming
-      language.  That is, Menhir compiles LR(1) grammar specifications down
-      to OCaml code.  Menhir was designed and implemented by François Pottier
-      and Yann Régis-Gianas.
-    '';
-    license = with licenses; [
-      (if versionAtLeast version "20170418" then gpl2 else qpl) /* generator */
-      lgpl2 /* library */
-    ];
-    platforms = ocaml.meta.platforms or [];
-    maintainers = with maintainers; [ maggesi ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/menhir/lib.nix b/nixpkgs/pkgs/development/ocaml-modules/menhir/lib.nix
new file mode 100644
index 000000000000..3f6660f23ee9
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/menhir/lib.nix
@@ -0,0 +1,29 @@
+{ lib, fetchFromGitLab, buildDunePackage }:
+
+buildDunePackage rec {
+  pname = "menhirLib";
+  version = "20210419";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.inria.fr";
+    owner = "fpottier";
+    repo = "menhir";
+    rev = version;
+    sha256 = "0jcbr7s3iwfr7xxfybs3h407g76yfp5yq5r9i0wg2ahvvbqh03ky";
+  };
+
+  useDune2 = true;
+
+  meta = with lib; {
+    homepage = "http://pauillac.inria.fr/~fpottier/menhir/";
+    description = "Runtime support library for parsers generated by Menhir";
+    longDescription = ''
+      Menhir is a LR(1) parser generator for the Objective Caml programming
+      language.  That is, Menhir compiles LR(1) grammar specifications down
+      to OCaml code.  Menhir was designed and implemented by François Pottier
+      and Yann Régis-Gianas.
+    '';
+    license = with licenses; [ lgpl2Only ];
+    maintainers = with maintainers; [ vbgl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/menhir/sdk.nix b/nixpkgs/pkgs/development/ocaml-modules/menhir/sdk.nix
new file mode 100644
index 000000000000..0e60849494cc
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/menhir/sdk.nix
@@ -0,0 +1,15 @@
+{ lib, fetchFromGitLab, buildDunePackage
+, menhirLib
+}:
+
+buildDunePackage rec {
+  pname = "menhirSdk";
+
+  inherit (menhirLib) version src useDune2;
+
+  meta = menhirLib.meta // {
+    description = "Compile-time library for auxiliary tools related to Menhir";
+    license = with lib.licenses; [ gpl2Only ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix
index 3ddae57e9e8d..ea1636427038 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix
@@ -1,27 +1,23 @@
 { lib, buildDunePackage, fetchurl
-, fmt, mirage-flow, result, rresult, cstruct, logs, ke
+, fmt, mirage-flow, result, rresult, cstruct, logs, ke, lwt
 , alcotest, alcotest-lwt, bigstringaf, bigarray-compat
 }:
 
 buildDunePackage rec {
   pname = "mimic";
-  version = "0.0.2";
+  version = "0.0.3";
 
   minimumOCamlVersion = "4.08";
   useDune2 = true;
 
   src = fetchurl {
-    url = "https://github.com/mirage/ocaml-git/releases/download/${pname}-v${version}/${pname}-${pname}-v${version}.tbz";
-    sha256 = "3ad5af3caa1120ecfdf022de41ba5be8edfbf50270fc99238b82d3d2d6e7c317";
+    url = "https://github.com/dinosaure/mimic/releases/download/${version}/mimic-${version}.tbz";
+    sha256 = "e4743cd2e4f8242eb1ce9d8086fd2affba0eb6a62131309ffa279108bd3dbbcb";
   };
 
-  # don't install changelogs for other packages
-  postPatch = ''
-    rm -f CHANGES.md CHANGES.carton.md
-  '';
-
   propagatedBuildInputs = [
     fmt
+    lwt
     mirage-flow
     result
     rresult
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix b/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix
index 50121ad62802..aaa51aa276c4 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mirage/runtime.nix
@@ -3,7 +3,7 @@
 
 buildDunePackage rec {
   pname = "mirage-runtime";
-  version = "3.10.1";
+  version = "3.10.3";
 
   useDune2 = true;
 
@@ -11,7 +11,7 @@ buildDunePackage rec {
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage/releases/download/v${version}/mirage-v${version}.tbz";
-    sha256 = "1glmsz2znhfkk4w6d6nsr7q5jqvivhmi8zwagzw2d8pah0c8bhm4";
+    sha256 = "7c8059ef9e330eaef1ed51c0d89afe17900310f8083a426cd8099602222c2281";
   };
 
   propagatedBuildInputs = [ ipaddr functoria-runtime fmt logs ocaml_lwt ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix
index 005e26926d1a..b16dfd484814 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mustache/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, ounit }:
+{ lib, buildDunePackage, fetchFromGitHub, ezjsonm, menhir, menhirLib, ounit }:
 
 buildDunePackage rec {
   pname = "mustache";
@@ -11,8 +11,8 @@ buildDunePackage rec {
     sha256 = "19v8rk8d8lkfm2rmhdawfgadji6wa267ir5dprh4w9l1sfj8a1py";
   };
 
-  buildInputs = [ ezjsonm ];
-  propagatedBuildInputs = [ menhir ];
+  buildInputs = [ ezjsonm menhir ];
+  propagatedBuildInputs = [ menhirLib ];
 
   doCheck = true;
   checkInputs = [ ounit ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix
index 4fde475cf936..a8912c0f5d58 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocaml-version/default.nix
@@ -1,24 +1,21 @@
 { lib, fetchurl, buildDunePackage }:
 
 buildDunePackage rec {
-
   pname = "ocaml-version";
-  version = "3.0.0";
-
-  minimumOCamlVersion = "4.07";
-
-  useDune2 = true;
+  version = "3.1.0";
 
   src = fetchurl {
     url = "https://github.com/ocurrent/ocaml-version/releases/download/v${version}/ocaml-version-v${version}.tbz";
-    sha256 = "15vk8sh50p3f2mbv8z7mqnx76cffri36f2krp25zkkwix8jg7ci4";
+    sha256 = "sha256-rHuhagnY9yISdC85NpgPv667aYx7v2JRgq99ayw83l8=";
   };
 
-  meta = {
+  minimumOCamlVersion = "4.07";
+  useDune2 = true;
+
+  meta = with lib; {
     description = "Manipulate, parse and generate OCaml compiler version strings";
     homepage = "https://github.com/ocurrent/ocaml-version";
-    license = lib.licenses.isc;
-    maintainers = [ lib.maintainers.vbgl ];
+    license = licenses.isc;
+    maintainers = with maintainers; [ vbgl ];
   };
-
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix
index 553ad9562cc8..2cb066a7c035 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix
@@ -1,24 +1,22 @@
-{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild, cppo }:
+{ lib, buildDunePackage, fetchzip, cppo }:
 
-let version = "1.0"; in
-
-stdenv.mkDerivation {
-  name = "ocaml${ocaml.version}-ocplib-endian-${version}";
+buildDunePackage rec {
+  version = "1.1";
+  pname = "ocplib-endian";
 
   src = fetchzip {
     url = "https://github.com/OCamlPro/ocplib-endian/archive/${version}.tar.gz";
-    sha256 = "0s1ld3kavz892b8awyxyg1mr98h2g61gy9ci5v6yb49bsii6wicw";
+    sha256 = "sha256-zKsSkhlZBXSqPtw+/WN3pwo9plM9rDZfMbGVfosqb10=";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild cppo ];
+  useDune2 = true;
 
-  createFindlibDestdir = true;
+  buildInputs = [ cppo ];
 
-  meta = {
+  meta = with lib; {
     description = "Optimised functions to read and write int16/32/64";
     homepage = "https://github.com/OCamlPro/ocplib-endian";
-    license = lib.licenses.lgpl21;
-    platforms = ocaml.meta.platforms or [];
-    maintainers = with lib.maintainers; [ vbgl ];
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ vbgl ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix
index cf869b6e5ef9..aac8b27955b5 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocsigen-server/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, fetchFromGitHub, which, ocaml, findlib, lwt_react, ssl, lwt_ssl
 , lwt_log, ocamlnet, ocaml_pcre, cryptokit, tyxml, xml-light, ipaddr
 , pgocaml, camlzip, ocaml_sqlite3
-, makeWrapper, fetchpatch
+, makeWrapper
 }:
 
 if !lib.versionAtLeast ocaml.version "4.06.1"
@@ -13,22 +13,16 @@ let mkpath = p: n:
 in
 
 stdenv.mkDerivation rec {
-  version = "2.16.0";
+  version = "2.18.0";
   pname = "ocsigenserver";
 
   src = fetchFromGitHub {
     owner = "ocsigen";
     repo = "ocsigenserver";
     rev = version;
-    sha256 = "0dd7zfk8dlajv0297dswaaqh96hjk2ppy8zb67jbkd26nimahk9y";
+    sha256 = "0c61wkq8ddy3qxb2x1jz04rz0722hk92r6jl1zvgikh74m5p5ipp";
   };
 
-  # unreleased fix for Makefile typos breaking compilation
-  patches = [ (fetchpatch {
-    url = "https://github.com/ocsigen/ocsigenserver/commit/014aefc4e460686a361b974f16ebb7e0c993b36b.patch";
-    sha256 = "0xda4fj8p5102lh9xmrn5mv3s0ps6yykqj3mpjf72gf4zd6fzcn7";
-  }) ];
-
   nativeBuildInputs = [ makeWrapper ];
   buildInputs = [ which ocaml findlib lwt_react pgocaml camlzip ocaml_sqlite3 ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix b/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix
index c71c8f35f4ba..a4124df66640 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/octavius/default.nix
@@ -1,24 +1,25 @@
-{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+{ lib, fetchFromGitHub, buildDunePackage, ocaml }:
 
-if !lib.versionAtLeast ocaml.version "4.03"
-then throw "octavius is not available for OCaml ${ocaml.version}" else
+buildDunePackage rec {
+  pname = "octavius";
+  version = "1.2.2";
 
-stdenv.mkDerivation {
-  name = "ocaml${ocaml.version}-octavius-0.2.0";
-  src = fetchurl {
-    url = "https://github.com/ocaml-doc/octavius/releases/download/v0.2.0/octavius-0.2.0.tbz";
-    sha256 = "02milzzlr4xk5aymg2fjz27f528d5pyscqvld3q0dm41zcpkz5ml";
+  src = fetchFromGitHub {
+    owner = "ocaml-doc";
+    repo = "octavius";
+    rev = "v${version}";
+    sha256 = "sha256-/S6WpIo1c5J9uM3xgtAM/elhnsl0XimnIFsKy3ootbA=";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild topkg ];
+  minimumOCamlVersion = "4.03";
+  useDune2 = lib.versionAtLeast ocaml.version "4.08";
 
-  inherit (topkg) buildPhase installPhase;
+  doCheck = true;
 
-  meta = {
+  meta = with lib; {
     description = "Ocamldoc comment syntax parser";
     homepage = "https://github.com/ocaml-doc/octavius";
-    license = lib.licenses.isc;
-    maintainers = [ lib.maintainers.vbgl ];
-    inherit (ocaml.meta) platforms;
+    license = licenses.isc;
+    maintainers = with maintainers; [ vbgl ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix b/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix
index 7f8ded5feb6c..2227f6e033ca 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/optint/default.nix
@@ -1,12 +1,12 @@
 { lib, buildDunePackage, fetchurl }:
 
 buildDunePackage rec {
-  minimumOCamlVersion = "4.03";
-  version = "0.0.4";
+  minimumOCamlVersion = "4.07";
+  version = "0.1.0";
   pname = "optint";
   src = fetchurl {
     url = "https://github.com/mirage/optint/releases/download/v${version}/optint-v${version}.tbz";
-    sha256 = "1a7gabxqmfvii8qnxq1clx43md2h9glskxhac8y8r0rhzblx3s1a";
+    sha256 = "27847660223c16cc7eaf8fcd9d5589a0b802114330a2529578f8007d3b01185d";
   };
 
   useDune2 = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/paf/default.nix b/nixpkgs/pkgs/development/ocaml-modules/paf/default.nix
index 0c91051e2433..375ba1c125e8 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/paf/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/paf/default.nix
@@ -5,6 +5,7 @@
 , mirage-stack
 , mirage-time
 , httpaf
+, h2
 , tls-mirage
 , mimic
 , cohttp-lwt
@@ -31,11 +32,11 @@
 
 buildDunePackage rec {
   pname = "paf";
-  version = "0.0.1";
+  version = "0.0.3";
 
   src = fetchurl {
     url = "https://github.com/dinosaure/paf-le-chien/releases/download/${version}/paf-${version}.tbz";
-    sha256 = "7a794c21ce458bda302553b0f5ac128c067579fbb3b7b8fba9b410446c43e790";
+    sha256 = "a0bbb84b19e1f0255337fc4d7017f3ea3611b241746e391b11c1d8b1f5f30a2b";
   };
 
   useDune2 = true;
@@ -45,6 +46,7 @@ buildDunePackage rec {
     mirage-stack
     mirage-time
     httpaf
+    h2
     tls-mirage
     mimic
     cohttp-lwt
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix
new file mode 100644
index 000000000000..412ef9568db2
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_cmdliner/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildDunePackage
+, fetchFromGitHub
+, alcotest
+, cmdliner
+, ppx_deriving
+, ppxlib
+}:
+
+buildDunePackage rec {
+  pname = "ppx_deriving_cmdliner";
+  version = "0.6.0";
+
+  minimumOCamlVersion = "4.08";
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "hammerlab";
+    repo = "ppx_deriving_cmdliner";
+    rev = "v${version}";
+    sha256 = "19l32y2wv64d1c7fvln07dg3bkf7wf5inzjxlff7lbabskdbbras";
+  };
+
+  propagatedBuildInputs = [
+    cmdliner
+    ppx_deriving
+    ppxlib
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    alcotest
+  ];
+
+  meta = with lib; {
+    description = "Ppx_deriving plugin for generating command line interfaces from types for OCaml";
+    inherit (src.meta) homepage;
+    license = licenses.asl20;
+    maintainers = [ maintainers.romildo ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
index 87ccd85a07df..ee801f6adfd8 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_gen_rec/default.nix
@@ -1,22 +1,23 @@
-{ lib, fetchurl, buildDunePackage, ocaml-migrate-parsetree }:
+{ lib, fetchurl, buildDunePackage, ppxlib }:
 
 buildDunePackage rec {
   pname = "ppx_gen_rec";
-  version = "1.1.0";
-
-  useDune2 = true;
+  version = "2.0.0";
 
   src = fetchurl {
     url = "https://github.com/flowtype/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
-    sha256 = "0fwi4bknq8h9zgpsarjvnzdm9bm8qlyyw0lz30pihg02aiiljqbh";
+    sha256 = "sha256-/mMj5UT22KQGVy1sjgEoOgPzyCYyeDPtWJYNDvQ9nlk=";
   };
 
-  buildInputs = [ ocaml-migrate-parsetree ];
+  minimumOCamlVersion = "4.07";
+  useDune2 = true;
+
+  buildInputs = [ ppxlib ];
 
   meta = with lib; {
     homepage = "https://github.com/flowtype/ocaml-ppx_gen_rec";
-    description = "ocaml preprocessor that generates a recursive module";
+    description = "A ppx rewriter that transforms a recursive module expression into a struct.";
     license = licenses.mit;
-    maintainers = [ maintainers.frontsideair ];
+    maintainers = with maintainers; [ frontsideair ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix
index 4ad26ff0862b..6588d6db7f45 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_import/default.nix
@@ -1,7 +1,6 @@
 { lib, fetchurl, buildDunePackage
 , ppx_tools_versioned
 , ocaml-migrate-parsetree
-, ounit, ppx_deriving, ppxlib
 }:
 
 buildDunePackage rec {
@@ -21,9 +20,6 @@ buildDunePackage rec {
     ppx_tools_versioned ocaml-migrate-parsetree
   ];
 
-  doCheck = true;
-  checkInputs = [ ounit ppx_deriving ppxlib ];
-
   meta = {
     description = "A syntax extension that allows to pull in types or signatures from other compiled interface files";
     license = lib.licenses.mit;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/repr/default.nix b/nixpkgs/pkgs/development/ocaml-modules/repr/default.nix
index de6877ddd68e..cd7e1e014e4d 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/repr/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/repr/default.nix
@@ -1,30 +1,29 @@
-{ lib, buildDunePackage, fetchurl, fmt, uutf, jsonm, base64, either }:
+{ lib, buildDunePackage, fetchurl, base64, either, fmt, jsonm, uutf }:
 
 buildDunePackage rec {
   pname = "repr";
-  version = "0.2.1";
-
-  minimumOCamlVersion = "4.08";
+  version = "0.3.0";
 
   src = fetchurl {
     url = "https://github.com/mirage/${pname}/releases/download/${version}/${pname}-fuzz-${version}.tbz";
-    sha256 = "1cbzbawbn71mmpw8y84s1p2pbhc055w1znz64jvr00c7fdr9p8hc";
+    sha256 = "sha256-2b0v5RwutvyidzEDTEb5p33IvJ+3t2IW+KVxYD1ufXQ=";
   };
 
+  minimumOCamlVersion = "4.08";
   useDune2 = true;
 
   propagatedBuildInputs = [
-    fmt
-    uutf
-    jsonm
     base64
     either
+    fmt
+    jsonm
+    uutf
   ];
 
   meta = with lib; {
     description = "Dynamic type representations. Provides no stability guarantee";
     homepage = "https://github.com/mirage/repr";
     license = licenses.isc;
-    maintainers = [ maintainers.sternenseemann ];
+    maintainers = with maintainers; [ sternenseemann ];
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/repr/ppx.nix b/nixpkgs/pkgs/development/ocaml-modules/repr/ppx.nix
index a1112ef9ac74..7ef2c55c2c26 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/repr/ppx.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/repr/ppx.nix
@@ -1,4 +1,4 @@
-{ buildDunePackage, repr, ppxlib, ppx_deriving, alcotest, hex }:
+{ buildDunePackage, ppx_deriving, ppxlib, repr, alcotest, hex }:
 
 buildDunePackage {
   pname = "ppx_repr";
@@ -6,9 +6,9 @@ buildDunePackage {
   inherit (repr) src version useDune2;
 
   propagatedBuildInputs = [
-    repr
-    ppxlib
     ppx_deriving
+    ppxlib
+    repr
   ];
 
   doCheck = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/stdcompat/default.nix b/nixpkgs/pkgs/development/ocaml-modules/stdcompat/default.nix
new file mode 100644
index 000000000000..df5c1a58b17b
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/stdcompat/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, lib, fetchurl
+, ocaml, findlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ocaml${ocaml.version}-stdcompat";
+  version = "15";
+
+  src = fetchurl {
+    url = "https://github.com/thierry-martinez/stdcompat/releases/download/v${version}/stdcompat-${version}.tar.gz";
+    sha256 = "1xcwb529m4lg9cbnxa9m3x2nnl9nxzz1x5lxpvdfflg4zxl6yx2y";
+  };
+
+  buildInputs = [ ocaml findlib ];
+
+  configureFlags = "--libdir=$(OCAMLFIND_DESTDIR)";
+
+  meta = {
+    homepage = "https://github.com/thierry-martinez/stdcompat";
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.vbgl ];
+    inherit (ocaml.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix
index 2ee01ed82194..dadeb5a98eaf 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/tls/default.nix
@@ -1,17 +1,17 @@
 { lib, fetchurl, buildDunePackage, ppx_sexp_conv, ppx_cstruct, cstruct
 , cstruct-sexp, sexplib, mirage-crypto, mirage-crypto-pk, mirage-crypto-rng
-, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime
-, hacl_x25519, fiat-p256, hkdf, logs, alcotest }:
+, x509, domain-name, fmt, cstruct-unix, ounit2, ocaml_lwt, ptime, rresult
+, mirage-crypto-ec, hkdf, logs, alcotest }:
 
 buildDunePackage rec {
   minimumOCamlVersion = "4.08";
 
-  version = "0.12.8";
+  version = "0.13.1";
   pname = "tls";
 
   src = fetchurl {
     url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-v${version}.tbz";
-    sha256 = "0sgppvfnamfnsglw1cl801i1xqkxbs33g40kwmmqj2vqjcarm26a";
+    sha256 = "ca95fa59a82f7d38b0b495fc0cd1ff54e7728492a292895d0067c1ba9de81b7b";
   };
 
   useDune2 = true;
@@ -21,8 +21,8 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [ ppx_sexp_conv ppx_cstruct cstruct cstruct-sexp
                             sexplib mirage-crypto mirage-crypto-pk mirage-crypto-rng
-                            x509 domain-name fmt ocaml_lwt ptime hacl_x25519 fiat-p256
-                            hkdf logs ];
+                            x509 domain-name fmt ocaml_lwt ptime mirage-crypto-ec
+                            hkdf logs rresult ];
 
   meta = with lib; {
     homepage = "https://github.com/mirleft/ocaml-tls";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix
index ad81c03c35d0..18d0f08357d4 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/tls/mirage.nix
@@ -1,6 +1,6 @@
 { buildDunePackage, tls
 , x509, lwt, fmt, mirage-flow, mirage-kv, mirage-clock, ptime
-, mirage-crypto, mirage-crypto-pk, hacl_x25519, fiat-p256
+, mirage-crypto, mirage-crypto-pk, mirage-crypto-ec
 }:
 
 buildDunePackage {
@@ -19,8 +19,7 @@ buildDunePackage {
     ptime
     mirage-crypto
     mirage-crypto-pk
-    hacl_x25519
-    fiat-p256
+    mirage-crypto-ec
   ];
 
   meta = tls.meta // {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix b/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix
index bf0e06507c9e..c49327d7d338 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/tyxml/default.nix
@@ -2,13 +2,13 @@
 
 buildDunePackage rec {
   pname = "tyxml";
-  version = "4.4.0";
+  version = "4.5.0";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/ocsigen/tyxml/releases/download/${version}/tyxml-${version}.tbz";
-    sha256 = "0c150h2f4c4id73ickkdqkir3jya66m6c7f5jxlp4caw9bfr8qsi";
+    sha256 = "0s30f72m457c3gbdmdwbx7ls9zg806nvm83aiz9qkpglbppwr6n6";
   };
 
   propagatedBuildInputs = [ uutf re ];
@@ -19,7 +19,7 @@ buildDunePackage rec {
     license = licenses.lgpl21;
     maintainers = with maintainers; [
       gal_bolle vbgl
-      ];
+    ];
   };
 
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix b/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix
index 7933b3bd8d42..f669a98c4def 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/uri/default.nix
@@ -5,13 +5,13 @@
 buildDunePackage rec {
   minimumOCamlVersion = "4.03";
   pname = "uri";
-  version = "4.0.0";
+  version = "4.2.0";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
-    sha256 = "13r9nkgym9z3dqxkyf0yyaqlrk5r3pjdw0kfzvrc90bmhwl9j380";
+    sha256 = "0szifda6yism5vn5jdizkha3ad0xk6zw4xgfl8g77dnv83ci7h65";
   };
 
   checkInputs = [ ounit ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix b/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix
index 637105361fda..0ce57b071689 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/x509/default.nix
@@ -8,11 +8,11 @@ buildDunePackage rec {
   minimumOCamlVersion = "4.07";
 
   pname = "x509";
-  version = "0.12.0";
+  version = "0.13.0";
 
   src = fetchurl {
     url = "https://github.com/mirleft/ocaml-x509/releases/download/v${version}/x509-v${version}.tbz";
-    sha256 = "04g59j8sn8am0z0a94h8cyvr6cqzd5gkn2lj6g51nb5dkwajj19h";
+    sha256 = "4577c2a616bda45cc777869fc44e272397d63a029135a993df8937bcfd6f6c49";
   };
 
   useDune2 = true;