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/asn1-combinators/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix69
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/bos/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix11
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix25
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix8
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/directories/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix8
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix8
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix10
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dune-site/default.nix8
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/duration/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/dyn/default.nix16
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/elina/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix31
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/facile/default.nix7
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix33
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/hack_parallel/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/iter/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix7
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/lwt-watcher/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix10
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/magick/default.nix34
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/markup/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mirage-fs/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mirage-logs/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mirage-profile/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix5
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/odn/default.nix37
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/odoc-parser/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ordering/default.nix13
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/pcap-format/default.nix3
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ppx_cstubs/default.nix8
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix6
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/routes/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix7
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/shared-memory-ring/default.nix2
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/stdune/default.nix16
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tcpip/default.nix4
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix1
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix14
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix2
70 files changed, 200 insertions, 366 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix
index 289f6a6cba4b..3c8be666b66a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/asn1-combinators/default.nix
@@ -6,13 +6,13 @@ buildDunePackage rec {
   minimumOCamlVersion = "4.05";
 
   pname = "asn1-combinators";
-  version = "0.2.5";
+  version = "0.2.6";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirleft/ocaml-asn1-combinators/releases/download/v${version}/asn1-combinators-v${version}.tbz";
-    sha256 = "1pbcdwm12hnfpd1jv2b7cjfkj5r7h61xp2gr8dysb8waa455kwln";
+    sha256 = "sha256-ASreDYhp72IQY3UsHPjqAm9rxwL+0Q35r1ZojikbGpE=";
   };
 
   propagatedBuildInputs = [ cstruct zarith bigarray-compat stdlib-shims ptime ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix b/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix
index 184f10a52be4..865518ec29c7 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/batteries/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, num, ounit
+{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, qcheck, num, ounit
 , doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64
 }:
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ ocaml findlib ocamlbuild ];
-  checkInputs = [ qtest ounit ];
+  checkInputs = [ qtest ounit qcheck ];
   propagatedBuildInputs = [ num ];
 
   strictDeps = !doCheck;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix
index fd690cfdd5b3..be343c444171 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/bigarray-compat/default.nix
@@ -2,7 +2,7 @@
 
 buildDunePackage rec {
   pname = "bigarray-compat";
-  version = "1.0.0";
+  version = "1.1.0";
 
   useDune2 = true;
 
@@ -12,7 +12,7 @@ buildDunePackage rec {
     owner = "mirage";
     repo = pname;
     rev = "v${version}";
-    sha256 = "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz";
+    sha256 = "sha256-2JVopggK2JuXWEPu8qn12F1jQIJ9OV89XY1rHtUqLkI=";
   };
 
   meta = {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix b/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix
index 5a2e2ea9a7fa..ec81e5b8db91 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/biniou/1.0.nix
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
   makeFlags = [ "PREFIX=$(out)" ];
 
   preBuild = ''
-    mkdir $out/bin
+    mkdir -p $out/bin
   '';
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix
index ddeda86e9bf7..48b9684902ce 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/bisect_ppx/default.nix
@@ -2,13 +2,13 @@
 
 buildDunePackage rec {
   pname = "bisect_ppx";
-  version = "2.6.1";
+  version = "2.8.1";
 
   src = fetchFromGitHub {
     owner = "aantron";
     repo = "bisect_ppx";
     rev = version;
-    sha256 = "sha256-YeLDlH3mUbVEY4OmzlrvSwVUav3uMtSsTFlOsQKnz84=";
+    sha256 = "sha256-pOeeSxzUF1jXQjA71atSZALdgQ2NB9qpKo5iaDnPwhQ=";
   };
 
   minimumOCamlVersion = "4.08";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix
deleted file mode 100644
index 46e3b6f16cce..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/bolt/default.nix
+++ /dev/null
@@ -1,69 +0,0 @@
-{ lib, stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, which, camlp4 }:
-
-let inherit (lib) getVersion versionAtLeast; in
-
-assert versionAtLeast (getVersion ocaml) "4.00.0";
-assert versionAtLeast (getVersion findlib) "1.3.3";
-
-if versionAtLeast ocaml.version "4.06"
-then throw "bolt is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  pname = "bolt";
-  version = "1.4";
-
-  src = fetchurl {
-    url = "https://forge.ocamlcore.org/frs/download.php/1043/bolt-${version}.tar.gz";
-    sha256 = "1c807wrpxra9sbb34lajhimwra28ldxv04m570567lh2b04n38zy";
-  };
-
-  nativeBuildInputs = [ ocaml findlib ocamlbuild which camlp4 ];
-
-  strictDeps = true;
-
-  patches = [
-    (fetchpatch {
-      url = "https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/bolt/bolt.1.4/files/opam.patch";
-      sha256 = "08cl39r98w312sw23cskd5wian6zg20isn9ki41hnbcgkazhi7pb";
-    })
-  ];
-
-  postPatch = ''
-    patch myocamlbuild.ml <<EOF
-70,74c70
-<         let camlp4of =
-<           try
-<             let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in
-<             Filename.concat path_bin "camlp4of"
-<           with _ -> "camlp4of" in
----
->         let camlp4of = "camlp4of" in
-EOF
-  '';
-
-  # The custom `configure` script does not expect the --prefix
-  # option. Installation is handled by ocamlfind.
-  dontAddPrefix = true;
-  dontAddStaticConfigureFlags = true;
-  configurePlatforms = [ ];
-
-  createFindlibDestdir = true;
-
-  buildFlags = [ "all" ];
-
-  doCheck = true;
-  checkTarget = "tests";
-
-  meta = with lib; {
-    homepage = "http://bolt.x9c.fr";
-    description = "A logging tool for the OCaml language";
-    longDescription = ''
-      Bolt is a logging tool for the OCaml language. It is inspired by and
-      modeled after the famous log4j logging framework for Java.
-    '';
-    license = licenses.lgpl3;
-    platforms = ocaml.meta.platforms or [ ];
-    maintainers = [ maintainers.jirkamarsik ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix b/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix
index 07d4d4864d82..9f7ce539e18a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/bos/default.nix
@@ -4,11 +4,11 @@
 
 stdenv.mkDerivation rec {
   pname = "ocaml${ocaml.version}-bos";
-  version = "0.2.0";
+  version = "0.2.1";
 
   src = fetchurl {
     url = "https://erratique.ch/software/bos/releases/bos-${version}.tbz";
-    sha256 = "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc";
+    sha256 = "sha256-2NYueGsQ1pfgRXIFqO7eqifrzJDxhV8Y3xkMrC49jzc=";
   };
 
   nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix
index ce8993b465eb..0805edbafe84 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ca-certs/default.nix
@@ -1,28 +1,29 @@
 { lib, buildDunePackage, fetchurl
-, bos, fpath, rresult, ptime, mirage-crypto, x509, astring, logs
-, cacert, alcotest
+, bos, fpath, ptime, mirage-crypto, x509, astring, logs
+, cacert, alcotest, fmt
 }:
 
 buildDunePackage rec {
   pname = "ca-certs";
-  version = "0.2.1";
+  version = "0.2.2";
 
   minimumOCamlVersion = "4.07";
 
   src = fetchurl {
     url = "https://github.com/mirage/ca-certs/releases/download/v${version}/ca-certs-v${version}.tbz";
-    sha256 = "d43109496a5129feff967d557c556af96f8b10456896a405c43b7cf0c35d0af3";
+    sha256 = "sha256-Tx53zBJemZh3ODh/8izahxDoJvXvNFLyAA8LMM1mhlI=";
   };
 
   useDune2 = true;
 
-  propagatedBuildInputs = [ bos fpath rresult ptime mirage-crypto x509 astring logs ];
+  propagatedBuildInputs = [ bos fpath ptime mirage-crypto x509 astring logs ];
 
   # Assumes nss-cacert < 3.74 https://github.com/mirage/ca-certs/issues/21
   doCheck = false;
   checkInputs = [
     cacert    # for /etc/ssl/certs/ca-bundle.crt
     alcotest
+    fmt
   ];
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix b/nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix
deleted file mode 100644
index 1da631d683cc..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/comparelib/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ lib, buildOcaml, fetchFromGitHub, type_conv, camlp4 }:
-
-buildOcaml rec {
-  pname = "comparelib";
-  version = "113.00.00";
-
-  minimumSupportedOcamlVersion = "4.00";
-
-  src = fetchFromGitHub {
-    owner = "janestreet";
-    repo = "comparelib";
-    rev = version;
-    sha256 = "sha256-gtJvXAUxiIt/L9bCzS+8wHcCQ+QpBubwcjDcyN0K2MA=";
-  };
-
-  buildInputs = [ camlp4 ];
-  propagatedBuildInputs = [ type_conv ];
-
-  meta = with lib; {
-    homepage = "https://github.com/janestreet/comparelib";
-    description = "Syntax extension for deriving \"compare\" functions automatically";
-    license = licenses.asl20;
-    maintainers = [ maintainers.ericbmerritt ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix b/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix
index 1dc28b2b5f79..6261ba2801b0 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/conduit/default.nix
@@ -15,8 +15,7 @@ buildDunePackage rec {
     sha256 = "2a37ffaa352a1e145ef3d80ac28661213c69a741b238623e59f29e3d5a12c537";
   };
 
-  buildInputs = [ ppx_sexp_conv ];
-  propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri logs ];
+  propagatedBuildInputs = [ astring ipaddr ipaddr-sexp sexplib uri logs ppx_sexp_conv ];
 
   meta = {
     description = "A network connection establishment library";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix b/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix
index cd298fb39a9f..ef4ae4484d83 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/csv/1.5.nix
@@ -22,13 +22,17 @@ stdenv.mkDerivation rec {
   doCheck = true;
   checkPhase = "ocaml setup.ml -test";
 
-  installPhase = "ocaml setup.ml -install";
+  installPhase = ''
+    runHook preInstall
+    ocaml setup.ml -install
+    runHook postInstall
+  '';
 
   meta = with lib; {
     description = "A pure OCaml library to read and write CSV files";
     homepage = "https://github.com/Chris00/ocaml-csv";
     license = licenses.lgpl21;
     maintainers = [ maintainers.vbgl ];
-    platforms = ocaml.meta.platforms or [ ];
+    inherit (ocaml.meta) platforms;
   };
 }
diff --git a/nixpkgs/pkgs/development/ocaml-modules/directories/default.nix b/nixpkgs/pkgs/development/ocaml-modules/directories/default.nix
index eae11953113b..509d5b2a1e4a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/directories/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/directories/default.nix
@@ -2,7 +2,7 @@
 
 buildDunePackage rec {
   pname = "directories";
-  version = "0.2";
+  version = "0.5";
   useDune2 = true;
 
   minimumOCamlVersion = "4.07";
@@ -11,7 +11,7 @@ buildDunePackage rec {
     owner = "ocamlpro";
     repo = pname;
     rev = version;
-    sha256 = "0s7ginh0g0fhw8xf9v58cx99a8q9jqsf4i0p134m5qzf84qpjwff";
+    sha256 = "sha256-31CGhmmfOORJ1ewgp+IU+p1+f2kfX/W+lxK7EGU62vc=";
   };
 
   meta = {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix
index 65c55da6e3b3..c39239525d18 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dune-action-plugin/default.nix
@@ -1,17 +1,17 @@
-{ lib, buildDunePackage, dune_2, dune-glob, dune-private-libs }:
+{ lib, buildDunePackage, dune_3, dune-glob, dune-private-libs }:
 
 buildDunePackage rec {
   pname = "dune-action-plugin";
-  inherit (dune_2) src version patches;
+  inherit (dune_3) src version;
 
-  useDune2 = true;
+  duneVersion = "3";
 
   dontAddPrefix = true;
 
   propagatedBuildInputs = [ dune-glob dune-private-libs ];
 
   meta = with lib; {
-    inherit (dune_2.meta) homepage;
+    inherit (dune_3.meta) homepage;
     description = "API for writing dynamic Dune actions";
     maintainers = [ maintainers.marsam ];
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix
index c7c6f9be4ee0..04b5e7623793 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dune-glob/default.nix
@@ -1,17 +1,17 @@
-{ lib, buildDunePackage, dune_2, dune-private-libs }:
+{ lib, buildDunePackage, dune_3, dune-private-libs }:
 
 buildDunePackage rec {
   pname = "dune-glob";
-  inherit (dune_2) src version patches;
+  inherit (dune_3) src version;
 
-  useDune2 = true;
+  duneVersion = "3";
 
   dontAddPrefix = true;
 
   propagatedBuildInputs = [ dune-private-libs ];
 
   meta = with lib; {
-    inherit (dune_2.meta) homepage;
+    inherit (dune_3.meta) homepage;
     description = "Glob string matching language supported by dune";
     maintainers = [ maintainers.marsam ];
     license = licenses.mit;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix
index 8a635efa3a59..9b45064d1984 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dune-private-libs/default.nix
@@ -1,16 +1,18 @@
-{ lib, buildDunePackage, dune_2 }:
+{ lib, buildDunePackage, dune_3, stdune }:
 
 buildDunePackage rec {
   pname = "dune-private-libs";
 
-  useDune2 = true;
+  duneVersion = "3";
 
-  inherit (dune_2) src version patches;
+  inherit (dune_3) src version;
 
-  minimumOCamlVersion = "4.08";
+  minimalOCamlVersion = "4.08";
 
   dontAddPrefix = true;
 
+  propagatedBuildInputs = [ stdune ];
+
   meta = with lib; {
     description = "Private libraries of Dune";
     maintainers = [ maintainers.marsam ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dune-site/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dune-site/default.nix
index 9462393d2697..8f51e182970f 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/dune-site/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/dune-site/default.nix
@@ -1,10 +1,10 @@
-{ lib, buildDunePackage, dune_2, dune-private-libs }:
+{ lib, buildDunePackage, dune_3, dune-private-libs }:
 
 buildDunePackage rec {
   pname = "dune-site";
-  inherit (dune_2) src version patches;
+  inherit (dune_3) src version;
 
-  useDune2 = true;
+  duneVersion = "3";
 
   dontAddPrefix = true;
 
@@ -12,7 +12,7 @@ buildDunePackage rec {
 
   meta = with lib; {
     description = "A library for embedding location information inside executable and libraries";
-    inherit (dune_2.meta) homepage;
+    inherit (dune_3.meta) homepage;
     maintainers = with lib.maintainers; [ ];
     license = licenses.mit;
   };
diff --git a/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix b/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix
index a547a919c31d..ccddecf28988 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/duration/default.nix
@@ -2,13 +2,13 @@
 
 buildDunePackage rec {
   pname = "duration";
-  version = "0.1.3";
+  version = "0.2.0";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/hannesm/duration/releases/download/${version}/duration-${version}.tbz";
-    sha256 = "0m9r0ayhpl98g9vdxrbjdcllns274jilic5v8xj1x7dphw21p95h";
+    sha256 = "sha256-rRT7daWm9z//fvFyEXiSXuVVzw8jsj46sykYS8DBzmk=";
   };
 
   doCheck = lib.versionAtLeast ocaml.version "4.05";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/dyn/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dyn/default.nix
new file mode 100644
index 000000000000..81b9e0d745fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/dyn/default.nix
@@ -0,0 +1,16 @@
+{ lib, buildDunePackage, dune_3, ordering }:
+
+buildDunePackage {
+  pname = "dyn";
+  inherit (dune_3) version src;
+  duneVersion = "3";
+
+  dontAddPrefix = true;
+
+  propagatedBuildInputs = [ ordering ];
+
+  meta = dune_3.meta // {
+    description = "Dynamic type";
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix b/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix
index df7f140e5458..ec4199cc06eb 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/elina/default.nix
@@ -8,9 +8,9 @@ stdenv.mkDerivation rec {
     sha256 = "1nymykskq1yx87y4xl6hl9i4q6kv0qaq25rniqgl1bfn883p1ysc";
   };
 
-  nativeBuildInputs = [ perl ocaml findlib ];
+  nativeBuildInputs = [ perl ocaml findlib camlidl ];
 
-  propagatedBuildInputs = [ apron camlidl gmp mpfr ];
+  propagatedBuildInputs = [ apron gmp mpfr ];
 
   strictDeps = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix b/nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix
deleted file mode 100644
index 9bedc4215108..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/enumerate/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, type_conv, camlp4 }:
-
-assert lib.versionAtLeast (lib.getVersion ocaml) "4.00";
-
-if lib.versionAtLeast ocaml.version "4.06"
-then throw "enumerate-111.08.00 is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  pname = "ocaml-enumerate";
-  version = "111.08.00";
-
-  src = fetchurl {
-    url = "https://ocaml.janestreet.com/ocaml-core/${lib.versions.majorMinor version}.00/individual/enumerate-${version}.tar.gz";
-    sha256 = "0b6mx5p01lcpimvak4wx6aj2119707wsfzd83rwgb91bhpgzh156";
-  };
-
-  nativeBuildInputs = [ ocaml findlib ocamlbuild ];
-  propagatedBuildInputs = [ type_conv camlp4 ];
-
-  strictDeps = true;
-
-  createFindlibDestdir = true;
-
-  meta = {
-    homepage = "https://ocaml.janestreet.com/";
-    description = "Quotation expanders for enumerating finite types";
-    license = lib.licenses.asl20;
-    platforms = ocaml.meta.platforms or [ ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix b/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix
index a3f64cb7bd95..ba2274e9c326 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/eqaf/default.nix
@@ -3,12 +3,12 @@
 buildDunePackage rec {
   minimumOCamlVersion = "4.03";
   pname = "eqaf";
-  version = "0.7";
+  version = "0.8";
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/eqaf/releases/download/v${version}/eqaf-v${version}.tbz";
-    sha256 = "1q09pwhs121vpficl2af1yzs4y7dd9bc1lcxbqyfc4x4m6p6drhh";
+    sha256 = "sha256-EUWhYBB0N9eUPgLkht9r0jPTk37BpZfX+jntuUcc+HU=";
   };
 
   propagatedBuildInputs = [ cstruct bigarray-compat ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix b/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix
index df228603e9f4..3eab7d3417fc 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/facile/default.nix
@@ -1,11 +1,9 @@
-{ lib, fetchurl, buildDunePackage }:
+{ lib, fetchurl, buildDunePackage, ocaml }:
 
 buildDunePackage rec {
   pname = "facile";
   version = "1.1.4";
 
-  useDune2 = false;
-
   src = fetchurl {
     url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz";
     sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp";
@@ -13,6 +11,9 @@ buildDunePackage rec {
 
   doCheck = true;
 
+  useDune2 = lib.versionAtLeast ocaml.version "4.12";
+  postPatch = lib.optionalString useDune2 "dune upgrade";
+
   meta = {
     homepage = "http://opti.recherche.enac.fr/facile/";
     license = lib.licenses.lgpl21Plus;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix b/nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix
deleted file mode 100644
index c979fe682d3e..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/fiat-p256/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ lib, buildDunePackage, fetchurl, alcotest, asn1-combinators, benchmark
-, bigarray-compat, cstruct, eqaf, hex, ppx_deriving_yojson, rresult
-, stdlib-shims, yojson, dune-configurator }:
-
-buildDunePackage rec {
-  pname = "fiat-p256";
-  version = "0.2.1";
-  useDune2 = true;
-
-  src = fetchurl {
-    url = "https://github.com/mirage/fiat/releases/download/v${version}/${pname}-v${version}.tbz";
-    sha256 = "0086h9qkvnqfm8acrxqbki54z619nj73x7f0d01v5vg2naznx7w9";
-  };
-
-  # Make tests compatible with alcotest 1.4.0
-  postPatch = ''
-    substituteInPlace test/wycheproof/test.ml --replace \
-      'Printf.ksprintf Alcotest.fail' 'Printf.ksprintf (fun s -> Alcotest.fail s)'
-  '';
-
-  buildInputs = [ dune-configurator ];
-  propagatedBuildInputs = [ bigarray-compat cstruct eqaf hex ];
-  checkInputs = [ alcotest asn1-combinators benchmark
-                  ppx_deriving_yojson rresult stdlib-shims yojson ];
-  doCheck = true;
-
-  meta = with lib; {
-    description = "Primitives for Elliptic Curve Cryptography taken from Fiat";
-    homepage = "https://github.com/mirage/fiat";
-    license = licenses.mit;
-    maintainers = with maintainers; [ sternenseemann ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix b/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix
index 348a70a0da9f..c417d94e2947 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/gapi-ocaml/default.nix
@@ -5,7 +5,7 @@
 
 buildDunePackage rec {
   pname = "gapi-ocaml";
-  version = "0.4.1";
+  version = "0.4.2";
 
   useDune2 = true;
 
@@ -15,7 +15,7 @@ buildDunePackage rec {
     owner = "astrada";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0riax23grjnq9pczmp1yv02ji0svvs2kbiqskj6f6yjviamnpa31";
+    sha256 = "sha256-imicHOlNjPHHW/lcWRJmURafYZFe/6J3efKPJcel8J8=";
   };
 
   propagatedBuildInputs = [ cryptokit ocamlnet ocurl yojson ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix b/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix
index 50be2adcb384..fe4f85a0024f 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/gmetadom/default.nix
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec {
   '';
 
   nativeBuildInputs = [ pkg-config ocaml findlib ];
-  buildInputs = [ gdome2 libxslt];
-  propagatedBuildInputs = [gdome2];
+  buildInputs = [ libxslt ];
+  propagatedBuildInputs = [ gdome2 ];
 
   strictDeps = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/hack_parallel/default.nix b/nixpkgs/pkgs/development/ocaml-modules/hack_parallel/default.nix
index f9bc67772125..122ee2149f3a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/hack_parallel/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/hack_parallel/default.nix
@@ -15,7 +15,7 @@ buildDunePackage rec {
 
   nativeBuildInputs = [ pkg-config ];
 
-  buildInputs = [ core core_kernel sqlite ];
+  propagatedBuildInputs = [ core core_kernel sqlite ];
 
   meta = {
     description =
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix b/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix
index d1386230452c..c2621584f34f 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ipaddr/cstruct.nix
@@ -5,7 +5,7 @@
 buildDunePackage rec {
   pname = "ipaddr-cstruct";
 
-  inherit (ipaddr) version src useDune2 minimumOCamlVersion;
+  inherit (ipaddr) version src;
 
   propagatedBuildInputs = [ ipaddr cstruct ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix
index 3090066c2f4e..c4eefb637fb5 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ipaddr/default.nix
@@ -6,7 +6,7 @@
 buildDunePackage rec {
   pname = "ipaddr";
 
-  inherit (macaddr) version src useDune2 minimumOCamlVersion;
+  inherit (macaddr) version src;
 
   propagatedBuildInputs = [ macaddr domain-name stdlib-shims ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix b/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix
index 1ede3c064ada..373b5a87e495 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ipaddr/sexp.nix
@@ -5,7 +5,7 @@
 buildDunePackage rec {
   pname = "ipaddr-sexp";
 
-  inherit (ipaddr) version src useDune2 minimumOCamlVersion;
+  inherit (ipaddr) version src;
 
   propagatedBuildInputs = [ ipaddr ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix b/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix
index 4fa7e42c5d51..0154029b5504 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/iter/default.nix
@@ -4,7 +4,7 @@
 
 buildDunePackage rec {
   pname = "iter";
-  version = "1.3";
+  version = "1.4";
 
   useDune2 = true;
 
@@ -12,7 +12,7 @@ buildDunePackage rec {
     owner = "c-cube";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256:0xgkplpbi41sw0yv1wfd12cfbybls6cal8qxddmd9x8khgk5s3vx";
+    sha256 = "sha256-Kk92GM7IVXOSVBkeN6wj67Q3UGCyuOOVi2umpn1AZTo=";
   };
 
   buildInputs = [ dune-configurator ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix b/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix
index 2f9aeea1d628..800b1c1e531a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/janestreet/0.14.nix
@@ -241,6 +241,13 @@ with self;
     doCheck = false; # we don't have quickcheck_deprecated
   };
 
+  core_unix = janePackage {
+    pname = "core_unix";
+    hash = "0irfmpx6iksxk2r8mdizjn75h71qh4p2f1s9x2ggckzqj9y904ck";
+    meta.description = "Unix-specific portions of Core";
+    propagatedBuildInputs = [ core ];
+  };
+
   csvfields = janePackage {
     pname = "csvfields";
     hash = "09jmz6y6nwd96dcx6g8ydicxssi72v1ks276phbc9n19wwg9hkaz";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix b/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix
index cc2c65009ff3..36aa09455cec 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/jingoo/default.nix
@@ -3,7 +3,7 @@
 
 buildDunePackage rec {
   pname = "jingoo";
-  version = "1.4.2";
+  version = "1.4.4";
 
   useDune2 = true;
 
@@ -13,7 +13,7 @@ buildDunePackage rec {
     owner = "tategakibunko";
     repo = "jingoo";
     rev = "v${version}";
-    sha256 = "0q947aik4i4z5wjllhwlkxh60qczwgra21yyrrzwhi9y5bnf8346";
+    sha256 = "sha256-qIw69OE7wYyZYKnIc9QrmF8MzY5Fg5pBFyIpexmaYxA=";
   };
 
   buildInputs = [ menhir ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/lwt-watcher/default.nix b/nixpkgs/pkgs/development/ocaml-modules/lwt-watcher/default.nix
index 23caa894736a..db94ce3d62d1 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/lwt-watcher/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/lwt-watcher/default.nix
@@ -6,12 +6,12 @@
 
 buildDunePackage rec {
   pname = "lwt-watcher";
-  version = "0.1";
+  version = "0.2";
   src = fetchFromGitLab {
     owner = "nomadic-labs";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0kaf7py02i0dn9rvrbzxh4ljfg059wc8xvm093m9wy7lsa68rax9";
+    sha256 = "sha256-35Z73bSzEEgTabNH2cD9lRdDczsyIMZR2ktyKx4aN9k=";
   };
 
   useDune2 = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix b/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix
index 143230408920..db543c0574e1 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/macaddr/cstruct.nix
@@ -5,9 +5,7 @@
 buildDunePackage {
   pname = "macaddr-cstruct";
 
-  inherit (macaddr) version src minimumOCamlVersion;
-
-  useDune2 = true;
+  inherit (macaddr) version src;
 
   propagatedBuildInputs = [ macaddr cstruct ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix b/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix
index f81529ed3a2b..7eb74ff064d0 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/macaddr/default.nix
@@ -4,15 +4,13 @@
 
 buildDunePackage rec {
   pname = "macaddr";
-  version = "5.2.0";
+  version = "5.3.0";
 
-  useDune2 = true;
-
-  minimumOCamlVersion = "4.04";
+  minimalOCamlVersion = "4.04";
 
   src = fetchurl {
-    url = "https://github.com/mirage/ocaml-ipaddr/releases/download/v${version}/ipaddr-v${version}.tbz";
-    sha256 = "f98d237cc1f783a0ba7dff0c6c69b5f519fec056950e3e3e7c15e5511ee5b7ec";
+    url = "https://github.com/mirage/ocaml-ipaddr/releases/download/v${version}/ipaddr-${version}.tbz";
+    sha256 = "0mdp38mkvk2f5h2q7nb9fc70a8hyssblnl7kam0d8r5lckgrx5rn";
   };
 
   checkInputs = [ ppx_sexp_conv ounit ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix b/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix
index 35cc7c6b4401..1f03c1326a53 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/macaddr/sexp.nix
@@ -5,9 +5,7 @@
 buildDunePackage {
   pname = "macaddr-sexp";
 
-  inherit (macaddr) version src minimumOCamlVersion;
-
-  useDune2 = true;
+  inherit (macaddr) version src;
 
   propagatedBuildInputs = [ ppx_sexp_conv ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix b/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix
index 15628bcf26c1..a48260ed38d6 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/magic-mime/default.nix
@@ -2,11 +2,11 @@
 
 buildDunePackage rec {
   pname = "magic-mime";
-  version = "1.1.3";
+  version = "1.2.0";
 
   src = fetchurl {
     url = "https://github.com/mirage/ocaml-magic-mime/releases/download/v${version}/magic-mime-v${version}.tbz";
-    sha256 = "1xqjs8bba567yzrzgnr88j5ck97d36zw68zr9v29liya37k6rcvz";
+    sha256 = "sha256-8SG2dQD43Zfi/J/V0BxzJeTIS8XAI3RCd5+9b6IGlPU=";
   };
 
   minimalOCamlVersion = "4.03";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/magick/default.nix b/nixpkgs/pkgs/development/ocaml-modules/magick/default.nix
deleted file mode 100644
index 87c43fb68693..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/magick/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ stdenv, lib, fetchurl, which, pkg-config, ocaml, findlib, imagemagick }:
-
-if lib.versionAtLeast ocaml.version "4.06"
-then throw "magick is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  pname = "ocaml-magick";
-  version = "0.34";
-
-  src = fetchurl {
-    url = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/ImageMagick/OCaml-ImageMagick-${version}.tgz";
-    sha256 = "0gn9l2qdr8gby2x8c2mb59x1kipb2plr45rbq6ymcxyi0wmzfh3q";
-  };
-
-  nativeBuildInputs = [ which pkg-config ocaml findlib ];
-  buildInputs = [ imagemagick ];
-
-  strictDeps = true;
-
-  createFindlibDestdir = true;
-
-  preConfigure = "substituteInPlace Makefile --replace gcc $CC";
-
-  installTargets = [ "find_install" ];
-
-  meta = {
-    homepage = "http://www.linux-nantes.org/~fmonnier/OCaml/ImageMagick/";
-    description = "ImageMagick Binding for OCaml";
-    license = lib.licenses.mit;
-    platforms = imagemagick.meta.platforms;
-    maintainers = with lib.maintainers; [ vbgl ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix b/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix
index 8d35ae641a6a..65e1459d9e3a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/markup/default.nix
@@ -2,7 +2,7 @@
 
 buildDunePackage rec {
   pname = "markup";
-  version = "1.0.0";
+  version = "1.0.2";
 
   useDune2 = true;
 
@@ -10,7 +10,7 @@ buildDunePackage rec {
     owner = "aantron";
     repo = "markup.ml";
     rev = version;
-    sha256 = "sha256-yapjqAcn0XSC6Guoj69sXNpLZ2urXANkWhcafpPLEyY=";
+    sha256 = "sha256-FcN9EBap93gFeOwSrRxs2sQrjZGs8/YnaEX7zHLmeM8=";
   };
 
   propagatedBuildInputs = [ uchar uutf ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix
index beadceff02b0..50abdf631db8 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mccs/default.nix
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   useDune2 = true;
 
-  buildInputs = [
+  propagatedBuildInputs = [
     cudf
   ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix
index ea1636427038..348a1b39cdd4 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mimic/default.nix
@@ -1,26 +1,23 @@
 { lib, buildDunePackage, fetchurl
-, fmt, mirage-flow, result, rresult, cstruct, logs, ke, lwt
-, alcotest, alcotest-lwt, bigstringaf, bigarray-compat
+, fmt, mirage-flow, cstruct, logs, ke, lwt
+, alcotest, alcotest-lwt, bigstringaf
 }:
 
 buildDunePackage rec {
   pname = "mimic";
-  version = "0.0.3";
+  version = "0.0.4";
 
-  minimumOCamlVersion = "4.08";
-  useDune2 = true;
+  minimalOCamlVersion = "4.08";
 
   src = fetchurl {
     url = "https://github.com/dinosaure/mimic/releases/download/${version}/mimic-${version}.tbz";
-    sha256 = "e4743cd2e4f8242eb1ce9d8086fd2affba0eb6a62131309ffa279108bd3dbbcb";
+    sha256 = "sha256-1Wb2xufgGKp3FJ+FYjK45i9B5+HohdPX+w9Sw0ph5JY=";
   };
 
   propagatedBuildInputs = [
     fmt
     lwt
     mirage-flow
-    result
-    rresult
     logs
   ];
 
@@ -29,7 +26,6 @@ buildDunePackage rec {
     alcotest
     alcotest-lwt
     bigstringaf
-    bigarray-compat
     cstruct
     ke
   ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix
index d6ba6603596a..bc987eff9884 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mirage-flow/default.nix
@@ -2,14 +2,14 @@
 
 buildDunePackage rec {
   pname = "mirage-flow";
-  version = "2.0.1";
+  version = "3.0.0";
 
   useDune2 = true;
   minimumOCamlVersion = "4.05";
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage-flow/releases/download/v${version}/mirage-flow-v${version}.tbz";
-    sha256 = "13v05x34six0z6bc2is8qhvbxk4knxh80ardi5x4rl738vlq3mn9";
+    sha256 = "sha256-1wvabIXsJ0e+2IvE2V8mnSgQUDuSkT8IB75SkWlhOPw=";
   };
 
   propagatedBuildInputs = [ cstruct fmt ocaml_lwt ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mirage-fs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mirage-fs/default.nix
index d8cfddff313c..23c79c4a77d6 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mirage-fs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mirage-fs/default.nix
@@ -4,13 +4,13 @@
 
 buildDunePackage rec {
   pname = "mirage-fs";
-  version = "3.0.1";
+  version = "4.0.0";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage-fs/releases/download/v${version}/mirage-fs-v${version}.tbz";
-    sha256 = "0px18bgk528vr7iw78r0j3z4sdcz684sfcj47ibbly2adbvd64yk";
+    sha256 = "sha256-PYZ2HCPuxOv4FU7EHymsa1oIZU7q8TSzzRvlngYdZ3s=";
   };
 
   propagatedBuildInputs = [ cstruct fmt lwt mirage-device mirage-kv ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mirage-logs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mirage-logs/default.nix
index 2a7670ce3722..7aabd51b819a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mirage-logs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mirage-logs/default.nix
@@ -1,6 +1,6 @@
 { lib, fetchurl, buildDunePackage
 , logs, lwt, mirage-clock, mirage-profile, ptime
-, alcotest
+, alcotest, stdlib-shims
 }:
 
 buildDunePackage rec {
@@ -14,7 +14,7 @@ buildDunePackage rec {
     sha256 = "0h0amzjxy067jljscib7fvw5q8k0adqa8m86affha9hq5jsh07a1";
   };
 
-  propagatedBuildInputs = [ logs lwt mirage-clock mirage-profile ptime ];
+  propagatedBuildInputs = [ logs lwt mirage-clock mirage-profile ptime stdlib-shims ];
 
   doCheck = true;
   checkInputs = [ alcotest ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mirage-profile/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mirage-profile/default.nix
index c6ca730bf3c5..ef856e021273 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mirage-profile/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mirage-profile/default.nix
@@ -1,5 +1,5 @@
 { lib, fetchurl, buildDunePackage
-, ppx_cstruct
+, ppx_cstruct, stdlib-shims
 , cstruct, lwt
 }:
 
@@ -15,7 +15,7 @@ buildDunePackage rec {
   };
 
   buildInputs = [ ppx_cstruct ];
-  propagatedBuildInputs = [ cstruct lwt ];
+  propagatedBuildInputs = [ cstruct lwt stdlib-shims ];
 
   meta = with lib; {
     description = "Collect runtime profiling information in CTF format";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix
index 2e91bda61d6b..1780ba05ac47 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mirage-time/default.nix
@@ -4,13 +4,13 @@ buildDunePackage rec {
   minimumOCamlVersion = "4.06";
 
   pname = "mirage-time";
-  version = "2.0.1";
+  version = "3.0.0";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage-time/releases/download/v${version}/mirage-time-v${version}.tbz";
-    sha256 = "1w6mm4g7fc19cs0ncs0s9fsnb1k1s04qqzs9bsqvq8ngsb90cbh0";
+    sha256 = "sha256-DUCUm1jix+i3YszIzgZjRQRiM8jJXQ49F6JC/yicvXw=";
   };
 
   propagatedBuildInputs = [ ocaml_lwt ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix
index d12329b811e6..33f9f2d8e6b0 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/mlgmpidl/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
     sha256 = "17xqiclaqs4hmnb92p9z6z9a1xfr31vcn8nlnj8ykk57by31vfza";
   };
 
-  nativeBuildInputs = [ perl ocaml findlib mpfr camlidl ];
+  nativeBuildInputs = [ perl ocaml findlib camlidl ];
   buildInputs = [ gmp mpfr ];
 
   strictDeps = true;
@@ -22,8 +22,7 @@ stdenv.mkDerivation rec {
   ];
 
   postConfigure = ''
-    sed -i Makefile \
-      -e 's|/bin/rm|rm|'
+    substituteInPlace Makefile --replace "/bin/rm" "rm"
     mkdir -p $out/lib/ocaml/${ocaml.version}/site-lib/stublibs
   '';
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix b/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix
index 82b1feed540b..696cdff52196 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/nonstd/default.nix
@@ -1,11 +1,9 @@
-{ lib, fetchzip, buildDunePackage }:
+{ lib, fetchzip, buildDunePackage, ocaml }:
 
 buildDunePackage rec {
   pname = "nonstd";
   version = "0.0.3";
 
-  useDune2 = false;
-
   minimalOCamlVersion = "4.02";
 
   src = fetchzip {
@@ -13,6 +11,8 @@ buildDunePackage rec {
     sha256 = "0ccjwcriwm8fv29ij1cnbc9win054kb6pfga3ygzdbjpjb778j46";
   };
 
+  useDune2 = lib.versionAtLeast ocaml.version "4.12";
+  postPatch = lib.optionalString useDune2 "dune upgrade";
   doCheck = true;
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
index b4410981afbd..f2336cf88bbb 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
@@ -1,5 +1,8 @@
 { lib, stdenv, fetchFromGitLab, libvirt, autoreconfHook, pkg-config, ocaml, findlib, perl }:
 
+lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02")
+  "libvirt is not available for OCaml ${ocaml.version}"
+
 stdenv.mkDerivation rec {
   pname = "ocaml-libvirt";
   version = "0.6.1.5";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix
index c0bccbd65a65..1e657fce8dd1 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ocplib-endian/default.nix
@@ -1,17 +1,17 @@
 { lib, buildDunePackage, fetchFromGitHub, cppo }:
 
 buildDunePackage rec {
-  version = "1.1";
+  version = "1.2";
   pname = "ocplib-endian";
 
   src = fetchFromGitHub {
     owner = "OCamlPro";
     repo = "ocplib-endian";
     rev = version;
-    sha256 = "sha256-zKsSkhlZBXSqPtw+/WN3pwo9plM9rDZfMbGVfosqb10=";
+    sha256 = "sha256-THTlhOfXAPaqTt1qBkht+D67bw6M175QLvXoUMgjks4=";
   };
 
-  useDune2 = true;
+  minimalOCamlVersion = "4.03";
 
   nativeBuildInputs = [ cppo ];
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/odn/default.nix b/nixpkgs/pkgs/development/ocaml-modules/odn/default.nix
deleted file mode 100644
index 66fc5d1f1872..000000000000
--- a/nixpkgs/pkgs/development/ocaml-modules/odn/default.nix
+++ /dev/null
@@ -1,37 +0,0 @@
-{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, type_conv, ounit, camlp4 }:
-
-if lib.versionAtLeast ocaml.version "4.06"
-then throw "ocaml-data-notation is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  pname = "ocaml-data-notation";
-  version = "0.0.11";
-
-  src = fetchurl {
-    url = "https://forge.ocamlcore.org/frs/download.php/1310/ocaml-data-notation-${version}.tar.gz";
-    sha256 = "09a8zdyifpc2nl4hdvg9206142y31cq95ajgij011s1qcg3z93lj";
-  };
-
-  nativeBuildInputs = [ ocaml findlib ocamlbuild ];
-  buildInputs = [ type_conv ounit camlp4 ];
-
-  strictDeps = true;
-
-  createFindlibDestdir = true;
-
-  configurePhase = "ocaml setup.ml -configure";
-  buildPhase = "ocaml setup.ml -build";
-  installPhase = "ocaml setup.ml -install";
-
-  meta = with lib; {
-    description = "Store data using OCaml notation";
-    homepage = "https://forge.ocamlcore.org/projects/odn/";
-    license = licenses.lgpl21;
-    platforms = ocaml.meta.platforms or [ ];
-    maintainers = with maintainers; [
-      vbgl
-      maggesi
-    ];
-  };
-}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/odoc-parser/default.nix b/nixpkgs/pkgs/development/ocaml-modules/odoc-parser/default.nix
index 7a2b5abd974b..9e4e4bc8d1de 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/odoc-parser/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/odoc-parser/default.nix
@@ -23,7 +23,7 @@ buildDunePackage rec {
 
   useDune2 = true;
 
-  buildInputs = [ astring result ];
+  propagatedBuildInputs = [ astring result ];
 
   meta = {
     description = "Parser for Ocaml documentation comments";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix b/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix
index c7bfe1e7306a..6b51443df232 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/opium_kernel/default.nix
@@ -9,6 +9,7 @@
 , ezjsonm
 , hmap
 , sexplib
+, fieldslib
 }:
 
 buildDunePackage rec {
@@ -31,7 +32,7 @@ buildDunePackage rec {
   ];
 
   propagatedBuildInputs = [
-    hmap cohttp-lwt ezjsonm sexplib
+    hmap cohttp-lwt ezjsonm sexplib fieldslib
   ];
 
   meta = {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ordering/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ordering/default.nix
new file mode 100644
index 000000000000..c3bffc013f95
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/ordering/default.nix
@@ -0,0 +1,13 @@
+{ lib, buildDunePackage, dune_3 }:
+
+buildDunePackage {
+  pname = "ordering";
+  inherit (dune_3) version src;
+  duneVersion = "3";
+
+  dontAddPrefix = true;
+
+  meta = dune_3.meta // {
+    description = "Element ordering";
+  };
+}
diff --git a/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix b/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix
index b767b1db24c8..189359cd1c86 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/owl-base/default.nix
@@ -2,13 +2,13 @@
 
 buildDunePackage rec {
   pname = "owl-base";
-  version = "1.0.1";
+  version = "1.0.2";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/owlbarn/owl/releases/download/${version}/owl-${version}.tbz";
-    sha256 = "72ca9f6edd302fdfa16c7559cedac7ac2c885466a367e17ea1ea8807b2dd13ef";
+    sha256 = "sha256-ONIQzmwcLwljH9WZUUMOTzZLWuA2xx7RsyzlWbKikmM=";
   };
 
   minimumOCamlVersion = "4.10";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/pcap-format/default.nix b/nixpkgs/pkgs/development/ocaml-modules/pcap-format/default.nix
index f8bb6f4f6b2d..ae093cc7817e 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/pcap-format/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/pcap-format/default.nix
@@ -1,6 +1,6 @@
 { lib, buildDunePackage, fetchurl
 , ppx_cstruct, ppx_tools
-, cstruct, ounit, mmap
+, cstruct, ounit, mmap, stdlib-shims
 }:
 
 buildDunePackage rec {
@@ -24,6 +24,7 @@ buildDunePackage rec {
 
   propagatedBuildInputs = [
     cstruct
+    stdlib-shims
   ];
 
   doCheck = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix b/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix
index 251aeb8de8ec..e2bd4d3ec5c8 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/pipebang/default.nix
@@ -15,7 +15,7 @@ buildOcaml rec {
 
   strictDeps = true;
 
-  buildInputs = [ camlp4 ];
+  propagatedBuildInputs = [ camlp4 ];
 
   meta = with lib; {
     homepage = "https://github.com/janestreet/pipebang";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
index 4f2e4693357f..8c0276bc9a7a 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, ocaml, findlib, piqi, stdlib-shims, num }:
 
 stdenv.mkDerivation rec {
   version = "0.7.7";
@@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ ocaml findlib ];
   buildInputs = [ piqi stdlib-shims ];
 
+  checkInputs  = [ num ];
+
   strictDeps = true;
 
   createFindlibDestdir = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_cstubs/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_cstubs/default.nix
index f4794eea76ed..f2c844ea0482 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ppx_cstubs/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_cstubs/default.nix
@@ -27,17 +27,19 @@ buildDunePackage rec {
     sha256 = "15cjb9ygnvp2kv85rrb7ncz7yalifyl7wd2hp2cl8r1qrpgi1d0w";
   };
 
-  nativeBuildInputs = [ cppo ];
+  nativeBuildInputs = [ cppo findlib ];
 
   buildInputs = [
     bigarray-compat
     containers
-    ctypes
     integers
     num
     ppxlib
     re
-    findlib
+  ];
+
+  propagatedBuildInputs = [
+    ctypes
   ];
 
   strictDeps = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix
index 6f23af44b949..43cc2992c2a0 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix
@@ -1,5 +1,5 @@
 { lib, fetchurl, buildDunePackage, cppo, ppx_deriving
-, ppxlib
+, ppxlib, dune-configurator
 }:
 
 buildDunePackage rec {
@@ -13,7 +13,9 @@ buildDunePackage rec {
     sha256 = "1dc1vxnkd0cnrgac5v3zbaj2lq1d2w8118mp1cmsdxylp06yz1sj";
   };
 
-  buildInputs = [ cppo ppxlib ppx_deriving ];
+  nativeBuildInputs = [ cppo ];
+  buildInputs = [ ppxlib dune-configurator ];
+  propagatedBuildInputs = [ ppx_deriving ];
 
   meta = with lib; {
     homepage = "https://github.com/ocaml-ppx/ppx_deriving_protobuf";
diff --git a/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix b/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix
index 179e559d72fe..28a53210f69f 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/printbox/default.nix
@@ -2,7 +2,7 @@
 
 buildDunePackage rec {
   pname = "printbox";
-  version = "0.6";
+  version = "0.6.1";
 
   useDune2 = true;
 
@@ -12,7 +12,7 @@ buildDunePackage rec {
     owner = "c-cube";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256:0vqp8j1vp8h8par699nnh31hnikzh6pqn07lqyxw65axqy3sc9dp";
+    sha256 = "sha256-7u2ThRhM3vW4ItcFsK4ycgcaW0JcQOFoZZRq2kqbl+k=";
   };
 
   checkInputs = [ mdx.bin ];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix b/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix
index 25c9ec4b870c..41e13f21a412 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/psmt2-frontend/default.nix
@@ -1,14 +1,14 @@
 { lib, fetchFromGitHub, buildDunePackage, menhir }:
 
 buildDunePackage rec {
-  version = "0.3.1";
+  version = "0.4.0";
   pname = "psmt2-frontend";
 
   src = fetchFromGitHub {
     owner = "ACoquereau";
     repo = pname;
     rev = version;
-    sha256 = "038jrfsq09nhnzpjiishg4adk09w3aw1bpczgbj66lqqilkd6gci";
+    sha256 = "sha256-cYY9x7QZjH7pdJyHMqfMXgHZ3/zJLp/6ntY6OSIo6Vs=";
   };
 
   useDune2 = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/routes/default.nix b/nixpkgs/pkgs/development/ocaml-modules/routes/default.nix
index a83d0db5d84d..36476e587ffa 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/routes/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/routes/default.nix
@@ -2,14 +2,14 @@
 
 buildDunePackage rec {
   pname = "routes";
-  version = "0.9.1";
+  version = "1.0.0";
 
   useDune2 = true;
   minimalOCamlVersion = "4.05";
 
   src = fetchurl {
     url = "https://github.com/anuragsoni/routes/releases/download/${version}/routes-${version}.tbz";
-    sha256 = "0h2c1p5w6237c1lmsl5c8q2dj5dq20gf2cmb12nbmlfn12sfmcrl";
+    sha256 = "sha256-WSlASDTA1UX+NhW38/XuLkOkdwjIxz0OUkX6Nd2iROg=";
   };
 
   meta = with lib; {
diff --git a/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix b/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix
index 3b0878155a53..ec1b59c04077 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/sawja/default.nix
@@ -2,8 +2,7 @@
 
 let
   pname = "sawja";
-  version = "1.5.10";
-  webpage = "http://sawja.inria.fr/";
+  version = "1.5.11";
 in
 
 if !lib.versionAtLeast ocaml.version "4.07"
@@ -20,7 +19,7 @@ stdenv.mkDerivation {
     owner = "javalib-team";
     repo = pname;
     rev = version;
-    sha256 = "sha256:0k51rscs9mdgpg3qn4cahql5ncdvlb207m015hr8v6r1vfgn0ddq";
+    sha256 = "sha256-1aKkRZDuLJLmDhUC1FXnn4QrgXaTyAbnXfTOAdnKgs8=";
   };
 
   nativeBuildInputs = [ which ocaml findlib ];
@@ -42,7 +41,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     description = "A library written in OCaml, relying on Javalib to provide a high level representation of Java bytecode programs";
-    homepage = webpage;
+    homepage = "http://sawja.inria.fr/";
     license = licenses.gpl3Plus;
     maintainers = [ maintainers.vbgl ];
     platforms = ocaml.meta.platforms or [];
diff --git a/nixpkgs/pkgs/development/ocaml-modules/shared-memory-ring/default.nix b/nixpkgs/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
index 3a96d4adee4c..17dd6183c0da 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
@@ -5,6 +5,7 @@
 , mirage-profile
 , cstruct
 , ounit
+, stdlib-shims
 }:
 
 buildDunePackage rec {
@@ -25,6 +26,7 @@ buildDunePackage rec {
   propagatedBuildInputs = [
     mirage-profile
     cstruct
+    stdlib-shims
   ];
 
   doCheck = true;
diff --git a/nixpkgs/pkgs/development/ocaml-modules/stdune/default.nix b/nixpkgs/pkgs/development/ocaml-modules/stdune/default.nix
new file mode 100644
index 000000000000..fd1e4f987b40
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/stdune/default.nix
@@ -0,0 +1,16 @@
+{ lib, buildDunePackage, dune_3, dyn, ordering }:
+
+buildDunePackage {
+  pname = "stdune";
+  inherit (dune_3) version src;
+  duneVersion = "3";
+
+  dontAddPrefix = true;
+
+  propagatedBuildInputs = [ dyn ordering ];
+
+  meta = dune_3.meta // {
+    description = "Dune's unstable standard library";
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tcpip/default.nix b/nixpkgs/pkgs/development/ocaml-modules/tcpip/default.nix
index ad12cb42d5e9..bcabb6a3626f 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/tcpip/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/tcpip/default.nix
@@ -13,13 +13,13 @@
 
 buildDunePackage rec {
   pname = "tcpip";
-  version = "7.0.1";
+  version = "7.1.0";
 
   useDune2 = true;
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
-    sha256 = "0gqj2s9sk3a7f4yavx423a569fvxsrgm0wg58biiv16v37xjaymp";
+    sha256 = "sha256-4nd2OVZa4w22I4bgglnS8lrNfjTk40PL5n6Oh6n+osw=";
   };
 
   nativeBuildInputs = [
diff --git a/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix
index 9a5848db3f7b..d08f2c4c0ae3 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/ulex/default.nix
@@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
   createFindlibDestdir = true;
 
   nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ];
+  propagatedBuildInputs = [ camlp4 ];
 
   strictDeps = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix b/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix
index 6701c8650513..c76eac45b35d 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/uutf/default.nix
@@ -1,16 +1,18 @@
 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
 let
   pname = "uutf";
-  webpage = "https://erratique.ch/software/${pname}";
 in
 
+lib.throwIfNot (lib.versionAtLeast ocaml.version "4.03")
+  "${pname} is not available with OCaml ${ocaml.version}"
+
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-${pname}-${version}";
-  version = "1.0.2";
+  version = "1.0.3";
 
   src = fetchurl {
-    url = "${webpage}/releases/${pname}-${version}.tbz";
-    sha256 = "1nx1rly3qj23jzn9yk3x6fwqimcxjd84kv5859vvhdg56psq26p6";
+    url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
+    sha256 = "sha256-h3KlYT0ecCmM4U3zMkGjaF8h5O9r20zwP+mF+x7KBWg=";
   };
 
   nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ];
@@ -23,8 +25,8 @@ stdenv.mkDerivation rec {
 
   meta = with lib; {
     description = "Non-blocking streaming Unicode codec for OCaml";
-    homepage = webpage;
-    platforms = ocaml.meta.platforms or [];
+    homepage = "https://erratique.ch/software/uutf";
+    inherit (ocaml.meta) platforms;
     license = licenses.bsd3;
     maintainers = [ maintainers.vbgl ];
   };
diff --git a/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix b/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix
index 6b0008912906..ffe8479b67e9 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/wasm/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if !lib.versionAtLeast ocaml.version "4.03"
 || lib.versionOlder "4.13" ocaml.version
 then throw "wasm is not available for OCaml ${ocaml.version}"
 else