about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/biniou/1.0.nix2
-rw-r--r--pkgs/development/ocaml-modules/bisect_ppx/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bos/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/comparelib/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/conduit/default.nix3
-rw-r--r--pkgs/development/ocaml-modules/csv/1.5.nix8
-rw-r--r--pkgs/development/ocaml-modules/directories/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/duration/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/elina/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/enumerate/default.nix31
-rw-r--r--pkgs/development/ocaml-modules/facile/default.nix7
-rw-r--r--pkgs/development/ocaml-modules/gmetadom/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/hack_parallel/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lwt-watcher/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/magic-mime/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/magick/default.nix34
-rw-r--r--pkgs/development/ocaml-modules/markup/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/mccs/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/mirage-logs/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/mirage-profile/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/mlgmpidl/default.nix5
-rw-r--r--pkgs/development/ocaml-modules/nonstd/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/ocaml-libvirt/default.nix3
-rw-r--r--pkgs/development/ocaml-modules/odn/default.nix37
-rw-r--r--pkgs/development/ocaml-modules/odoc-parser/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/opium_kernel/default.nix3
-rw-r--r--pkgs/development/ocaml-modules/owl-base/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/pcap-format/default.nix3
-rw-r--r--pkgs/development/ocaml-modules/pipebang/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/piqi-ocaml/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ppx_cstubs/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/routes/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/shared-memory-ring/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ulex/default.nix1
36 files changed, 71 insertions, 181 deletions
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
index 184f10a52be4..865518ec29c7 100644
--- a/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/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/pkgs/development/ocaml-modules/biniou/1.0.nix b/pkgs/development/ocaml-modules/biniou/1.0.nix
index 5a2e2ea9a7fa..ec81e5b8db91 100644
--- a/pkgs/development/ocaml-modules/biniou/1.0.nix
+++ b/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/pkgs/development/ocaml-modules/bisect_ppx/default.nix b/pkgs/development/ocaml-modules/bisect_ppx/default.nix
index ddeda86e9bf7..48b9684902ce 100644
--- a/pkgs/development/ocaml-modules/bisect_ppx/default.nix
+++ b/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/pkgs/development/ocaml-modules/bos/default.nix b/pkgs/development/ocaml-modules/bos/default.nix
index 07d4d4864d82..9f7ce539e18a 100644
--- a/pkgs/development/ocaml-modules/bos/default.nix
+++ b/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/pkgs/development/ocaml-modules/comparelib/default.nix b/pkgs/development/ocaml-modules/comparelib/default.nix
deleted file mode 100644
index 1da631d683cc..000000000000
--- a/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/pkgs/development/ocaml-modules/conduit/default.nix b/pkgs/development/ocaml-modules/conduit/default.nix
index 1dc28b2b5f79..6261ba2801b0 100644
--- a/pkgs/development/ocaml-modules/conduit/default.nix
+++ b/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/pkgs/development/ocaml-modules/csv/1.5.nix b/pkgs/development/ocaml-modules/csv/1.5.nix
index cd298fb39a9f..ef4ae4484d83 100644
--- a/pkgs/development/ocaml-modules/csv/1.5.nix
+++ b/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/pkgs/development/ocaml-modules/directories/default.nix b/pkgs/development/ocaml-modules/directories/default.nix
index eae11953113b..509d5b2a1e4a 100644
--- a/pkgs/development/ocaml-modules/directories/default.nix
+++ b/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/pkgs/development/ocaml-modules/duration/default.nix b/pkgs/development/ocaml-modules/duration/default.nix
index a547a919c31d..ccddecf28988 100644
--- a/pkgs/development/ocaml-modules/duration/default.nix
+++ b/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/pkgs/development/ocaml-modules/elina/default.nix b/pkgs/development/ocaml-modules/elina/default.nix
index df7f140e5458..ec4199cc06eb 100644
--- a/pkgs/development/ocaml-modules/elina/default.nix
+++ b/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/pkgs/development/ocaml-modules/enumerate/default.nix b/pkgs/development/ocaml-modules/enumerate/default.nix
deleted file mode 100644
index 9bedc4215108..000000000000
--- a/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/pkgs/development/ocaml-modules/facile/default.nix b/pkgs/development/ocaml-modules/facile/default.nix
index df228603e9f4..3eab7d3417fc 100644
--- a/pkgs/development/ocaml-modules/facile/default.nix
+++ b/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/pkgs/development/ocaml-modules/gmetadom/default.nix b/pkgs/development/ocaml-modules/gmetadom/default.nix
index 50be2adcb384..fe4f85a0024f 100644
--- a/pkgs/development/ocaml-modules/gmetadom/default.nix
+++ b/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/pkgs/development/ocaml-modules/hack_parallel/default.nix b/pkgs/development/ocaml-modules/hack_parallel/default.nix
index f9bc67772125..122ee2149f3a 100644
--- a/pkgs/development/ocaml-modules/hack_parallel/default.nix
+++ b/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/pkgs/development/ocaml-modules/lwt-watcher/default.nix b/pkgs/development/ocaml-modules/lwt-watcher/default.nix
index 23caa894736a..db94ce3d62d1 100644
--- a/pkgs/development/ocaml-modules/lwt-watcher/default.nix
+++ b/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/pkgs/development/ocaml-modules/magic-mime/default.nix b/pkgs/development/ocaml-modules/magic-mime/default.nix
index 15628bcf26c1..a48260ed38d6 100644
--- a/pkgs/development/ocaml-modules/magic-mime/default.nix
+++ b/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/pkgs/development/ocaml-modules/magick/default.nix b/pkgs/development/ocaml-modules/magick/default.nix
deleted file mode 100644
index 87c43fb68693..000000000000
--- a/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/pkgs/development/ocaml-modules/markup/default.nix b/pkgs/development/ocaml-modules/markup/default.nix
index 8d35ae641a6a..65e1459d9e3a 100644
--- a/pkgs/development/ocaml-modules/markup/default.nix
+++ b/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/pkgs/development/ocaml-modules/mccs/default.nix b/pkgs/development/ocaml-modules/mccs/default.nix
index beadceff02b0..50abdf631db8 100644
--- a/pkgs/development/ocaml-modules/mccs/default.nix
+++ b/pkgs/development/ocaml-modules/mccs/default.nix
@@ -13,7 +13,7 @@ buildDunePackage rec {
 
   useDune2 = true;
 
-  buildInputs = [
+  propagatedBuildInputs = [
     cudf
   ];
 
diff --git a/pkgs/development/ocaml-modules/mirage-logs/default.nix b/pkgs/development/ocaml-modules/mirage-logs/default.nix
index 2a7670ce3722..7aabd51b819a 100644
--- a/pkgs/development/ocaml-modules/mirage-logs/default.nix
+++ b/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/pkgs/development/ocaml-modules/mirage-profile/default.nix b/pkgs/development/ocaml-modules/mirage-profile/default.nix
index c6ca730bf3c5..ef856e021273 100644
--- a/pkgs/development/ocaml-modules/mirage-profile/default.nix
+++ b/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/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/pkgs/development/ocaml-modules/mlgmpidl/default.nix
index d12329b811e6..33f9f2d8e6b0 100644
--- a/pkgs/development/ocaml-modules/mlgmpidl/default.nix
+++ b/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/pkgs/development/ocaml-modules/nonstd/default.nix b/pkgs/development/ocaml-modules/nonstd/default.nix
index 82b1feed540b..696cdff52196 100644
--- a/pkgs/development/ocaml-modules/nonstd/default.nix
+++ b/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/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix b/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
index b4410981afbd..f2336cf88bbb 100644
--- a/pkgs/development/ocaml-modules/ocaml-libvirt/default.nix
+++ b/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/pkgs/development/ocaml-modules/odn/default.nix b/pkgs/development/ocaml-modules/odn/default.nix
deleted file mode 100644
index 66fc5d1f1872..000000000000
--- a/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/pkgs/development/ocaml-modules/odoc-parser/default.nix b/pkgs/development/ocaml-modules/odoc-parser/default.nix
index 7a2b5abd974b..9e4e4bc8d1de 100644
--- a/pkgs/development/ocaml-modules/odoc-parser/default.nix
+++ b/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/pkgs/development/ocaml-modules/opium_kernel/default.nix b/pkgs/development/ocaml-modules/opium_kernel/default.nix
index c7bfe1e7306a..6b51443df232 100644
--- a/pkgs/development/ocaml-modules/opium_kernel/default.nix
+++ b/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/pkgs/development/ocaml-modules/owl-base/default.nix b/pkgs/development/ocaml-modules/owl-base/default.nix
index b767b1db24c8..189359cd1c86 100644
--- a/pkgs/development/ocaml-modules/owl-base/default.nix
+++ b/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/pkgs/development/ocaml-modules/pcap-format/default.nix b/pkgs/development/ocaml-modules/pcap-format/default.nix
index f8bb6f4f6b2d..ae093cc7817e 100644
--- a/pkgs/development/ocaml-modules/pcap-format/default.nix
+++ b/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/pkgs/development/ocaml-modules/pipebang/default.nix b/pkgs/development/ocaml-modules/pipebang/default.nix
index 251aeb8de8ec..e2bd4d3ec5c8 100644
--- a/pkgs/development/ocaml-modules/pipebang/default.nix
+++ b/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/pkgs/development/ocaml-modules/piqi-ocaml/default.nix b/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
index 4f2e4693357f..8c0276bc9a7a 100644
--- a/pkgs/development/ocaml-modules/piqi-ocaml/default.nix
+++ b/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/pkgs/development/ocaml-modules/ppx_cstubs/default.nix b/pkgs/development/ocaml-modules/ppx_cstubs/default.nix
index f4794eea76ed..f2c844ea0482 100644
--- a/pkgs/development/ocaml-modules/ppx_cstubs/default.nix
+++ b/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/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix b/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix
index 6f23af44b949..43cc2992c2a0 100644
--- a/pkgs/development/ocaml-modules/ppx_deriving_protobuf/default.nix
+++ b/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/pkgs/development/ocaml-modules/routes/default.nix b/pkgs/development/ocaml-modules/routes/default.nix
index a83d0db5d84d..36476e587ffa 100644
--- a/pkgs/development/ocaml-modules/routes/default.nix
+++ b/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/pkgs/development/ocaml-modules/shared-memory-ring/default.nix b/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
index 3a96d4adee4c..17dd6183c0da 100644
--- a/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
+++ b/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/pkgs/development/ocaml-modules/ulex/default.nix b/pkgs/development/ocaml-modules/ulex/default.nix
index 9a5848db3f7b..d08f2c4c0ae3 100644
--- a/pkgs/development/ocaml-modules/ulex/default.nix
+++ b/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;