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/alcotest/default.nix10
-rw-r--r--pkgs/development/ocaml-modules/asn1-combinators/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/bap/default.nix9
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/bitstring/ppx.nix2
-rw-r--r--pkgs/development/ocaml-modules/bitv/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/bjack/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/brisk-reconciler/default.nix33
-rw-r--r--pkgs/development/ocaml-modules/bz2/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/camlpdf/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/caqti/default.nix13
-rw-r--r--pkgs/development/ocaml-modules/cmdliner/default.nix38
-rw-r--r--pkgs/development/ocaml-modules/coin/default.nix15
-rw-r--r--pkgs/development/ocaml-modules/cpdf/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/cstruct/lwt.nix2
-rw-r--r--pkgs/development/ocaml-modules/cstruct/ppx.nix2
-rw-r--r--pkgs/development/ocaml-modules/cstruct/sexp.nix2
-rw-r--r--pkgs/development/ocaml-modules/cstruct/unix.nix2
-rw-r--r--pkgs/development/ocaml-modules/csv/lwt.nix2
-rw-r--r--pkgs/development/ocaml-modules/ctypes/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/dssi/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/eliom/default.nix12
-rw-r--r--pkgs/development/ocaml-modules/erm_xml/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/expat/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/farfadet/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ffmpeg/base.nix4
-rw-r--r--pkgs/development/ocaml-modules/flex/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/fmt/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/fpath/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/frontc/default.nix33
-rw-r--r--pkgs/development/ocaml-modules/gen_js_api/default.nix41
-rw-r--r--pkgs/development/ocaml-modules/gen_js_api/ojs.nix21
-rw-r--r--pkgs/development/ocaml-modules/hacl-star/raw.nix3
-rw-r--r--pkgs/development/ocaml-modules/javalib/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lablgl/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lablgtk-extras/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ladspa/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/lastfm/default.nix32
-rw-r--r--pkgs/development/ocaml-modules/llvm/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/logs/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lua-ml/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/lwt/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/nocrypto/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/notty/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ocp-ocamlres/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-deriving/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-server/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-start/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ocsipersist/default.nix20
-rw-r--r--pkgs/development/ocaml-modules/ocsipersist/lib.nix27
-rw-r--r--pkgs/development/ocaml-modules/ocsipersist/pgsql.nix24
-rw-r--r--pkgs/development/ocaml-modules/ocsipersist/sqlite.nix23
-rw-r--r--pkgs/development/ocaml-modules/phylogenetics/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/ppxlib/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/ptime/default.nix10
-rw-r--r--pkgs/development/ocaml-modules/pure-splitmix/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/reactivedata/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/rebez/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/reperf/default.nix41
-rw-r--r--pkgs/development/ocaml-modules/samplerate/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/sawja/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/sedlex/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/sosa/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/sqlite3EZ/default.nix36
-rw-r--r--pkgs/development/ocaml-modules/toml/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/torch/default.nix1
-rw-r--r--pkgs/development/ocaml-modules/tsdl/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/uri/sexp.nix2
-rw-r--r--pkgs/development/ocaml-modules/uucp/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/uunf/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/vg/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/wasm/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/xmlm/default.nix2
-rw-r--r--pkgs/development/ocaml-modules/xmlplaylist/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/z3/default.nix7
-rw-r--r--pkgs/development/ocaml-modules/z3/ocamlfind.patch13
-rw-r--r--pkgs/development/ocaml-modules/zarith/default.nix2
78 files changed, 583 insertions, 200 deletions
diff --git a/pkgs/development/ocaml-modules/alcotest/default.nix b/pkgs/development/ocaml-modules/alcotest/default.nix
index bb1b18e3ec19f..c54deed737a73 100644
--- a/pkgs/development/ocaml-modules/alcotest/default.nix
+++ b/pkgs/development/ocaml-modules/alcotest/default.nix
@@ -1,18 +1,20 @@
 { lib, buildDunePackage, fetchurl
-, astring, cmdliner, fmt, uuidm, re, stdlib-shims, uutf
+, astring, cmdliner, fmt, uuidm, re, stdlib-shims, uutf, ocaml-syntax-shims
 }:
 
 buildDunePackage rec {
   pname = "alcotest";
-  version = "1.4.0";
+  version = "1.5.0";
 
   useDune2 = true;
 
   src = fetchurl {
-    url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-mirage-${version}.tbz";
-    sha256 = "sha256:1h9yp44snb6sgm5g1x3wg4gwjscic7i56jf0j8jr07355pxwrami";
+    url = "https://github.com/mirage/alcotest/releases/download/${version}/alcotest-js-${version}.tbz";
+    sha256 = "sha256-VCgZB+AteJld8kbcLhDtGCgoKUrSBZNHoeOhM1SEj2w=";
   };
 
+  nativeBuildInputs = [ ocaml-syntax-shims ];
+
   propagatedBuildInputs = [ astring cmdliner fmt uuidm re stdlib-shims uutf ];
 
   doCheck = true;
diff --git a/pkgs/development/ocaml-modules/asn1-combinators/default.nix b/pkgs/development/ocaml-modules/asn1-combinators/default.nix
index 3c8be666b66a1..8447c25cd7075 100644
--- a/pkgs/development/ocaml-modules/asn1-combinators/default.nix
+++ b/pkgs/development/ocaml-modules/asn1-combinators/default.nix
@@ -3,13 +3,11 @@
 }:
 
 buildDunePackage rec {
-  minimumOCamlVersion = "4.05";
+  minimalOCamlVersion = "4.08";
 
   pname = "asn1-combinators";
   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 = "sha256-ASreDYhp72IQY3UsHPjqAm9rxwL+0Q35r1ZojikbGpE=";
diff --git a/pkgs/development/ocaml-modules/bap/default.nix b/pkgs/development/ocaml-modules/bap/default.nix
index ea009083e8d17..5228727727658 100644
--- a/pkgs/development/ocaml-modules/bap/default.nix
+++ b/pkgs/development/ocaml-modules/bap/default.nix
@@ -10,18 +10,18 @@
 , z3
 }:
 
-if !lib.versionAtLeast ocaml.version "4.08"
+if lib.versionOlder ocaml.version "4.08"
 then throw "BAP is not available for OCaml ${ocaml.version}"
 else
 
 stdenv.mkDerivation rec {
   pname = "ocaml${ocaml.version}-bap";
-  version = "2.2.0";
+  version = "2.4.0";
   src = fetchFromGitHub {
     owner = "BinaryAnalysisPlatform";
     repo = "bap";
     rev = "v${version}";
-    sha256 = "0c53sps6ba9n5cjdmapi8ylzlpcc11pksijp9swzlwgxyz5d276f";
+    sha256 = "1xc8zfcwm40zihs3ajcrh2x32xd08qnygay03qy3qxhybr5hqngr";
   };
 
   sigs = fetchurl {
@@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
   '';
 
   disableIda = "--disable-ida";
+  disableGhidra = "--disable-ghidra";
 
   patches = [ ./curses_is_ncurses.patch ];
 
@@ -69,7 +70,7 @@ stdenv.mkDerivation rec {
     substituteInPlace oasis/elf-loader --replace bitstring.ppx ppx_bitstring
   '';
 
-  configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm.dev}/bin/llvm-config" ];
+  configureFlags = [ "--enable-everything ${disableIda} ${disableGhidra}" "--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/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
index 865518ec29c79..731f6e2636382 100644
--- a/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/pkgs/development/ocaml-modules/batteries/default.nix
@@ -2,7 +2,7 @@
 , doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64
 }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "batteries is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/bitstring/ppx.nix b/pkgs/development/ocaml-modules/bitstring/ppx.nix
index 4d391d3458dc1..9eb4c74f574c5 100644
--- a/pkgs/development/ocaml-modules/bitstring/ppx.nix
+++ b/pkgs/development/ocaml-modules/bitstring/ppx.nix
@@ -3,7 +3,7 @@
 , ounit
 }:
 
-if !lib.versionAtLeast ppxlib.version "0.18.0"
+if lib.versionOlder ppxlib.version "0.18.0"
 then throw "ppx_bitstring is not available with ppxlib-${ppxlib.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/bitv/default.nix b/pkgs/development/ocaml-modules/bitv/default.nix
index 07649f3655b86..a986a46f29354 100644
--- a/pkgs/development/ocaml-modules/bitv/default.nix
+++ b/pkgs/development/ocaml-modules/bitv/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, autoreconfHook, which, ocaml, findlib }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "bitv is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/bjack/default.nix b/pkgs/development/ocaml-modules/bjack/default.nix
new file mode 100644
index 0000000000000..fa03194bde4a7
--- /dev/null
+++ b/pkgs/development/ocaml-modules/bjack/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, libsamplerate, libjack2 }:
+
+buildDunePackage rec {
+  pname = "bjack";
+  version = "0.1.6";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "savonet";
+    repo = "ocaml-bjack";
+    rev = "v${version}";
+    sha256 = "1gf31a8i9byp6npn0x6gydcickn6sf5dnzmqr2c1b9jn2nl7334c";
+  };
+
+  buildInputs = [ dune-configurator ];
+  propagatedBuildInputs = [ libsamplerate libjack2 ];
+
+  meta = with lib; {
+    homepage = "https://github.com/savonet/ocaml-bjack";
+    description = "Blocking API for the jack audio connection kit";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/brisk-reconciler/default.nix b/pkgs/development/ocaml-modules/brisk-reconciler/default.nix
new file mode 100644
index 0000000000000..65d5abd6f4409
--- /dev/null
+++ b/pkgs/development/ocaml-modules/brisk-reconciler/default.nix
@@ -0,0 +1,33 @@
+{ buildDunePackage, fetchFromGitHub, lib, reason, ppxlib }:
+
+buildDunePackage rec {
+  pname = "brisk-reconciler";
+  version = "unstable-2020-12-02";
+
+  src = fetchFromGitHub {
+    owner = "briskml";
+    repo = "brisk-reconciler";
+    rev = "c9d5c4cf5dd17ff2da994de2c3b0f34c72778f70";
+    sha256 = "sha256-AAB4ZzBnwfwFXOAqX/sIT6imOl70F0YNMt96SWOOE9w=";
+  };
+
+  nativeBuildInputs = [ reason ];
+
+  buildInputs = [
+    ppxlib
+  ];
+
+  meta = with lib; {
+    description = "React.js-like reconciler implemented in OCaml/Reason";
+    longDescription = ''
+      Easily model any `tree-shaped state` with simple `stateful functions`.
+
+      Definitions:
+      * tree-shaped state: Any tree shaped-state like the DOM tree, app navigation state, or even rich text document!
+      * stateful functions: Functions that maintain state over time. Imagine that you can take any variable in your function and manage its value over the function's invocation. Now, imagine that any function invocation really creates its own "instance" of the function which will track this state separately from other invocations of this function.
+    '';
+    homepage = "https://github.com/briskml/brisk-reconciler";
+    maintainers = with maintainers; [ superherointj ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/bz2/default.nix b/pkgs/development/ocaml-modules/bz2/default.nix
index 4ac0262e1ee31..6d8b56ae232dd 100644
--- a/pkgs/development/ocaml-modules/bz2/default.nix
+++ b/pkgs/development/ocaml-modules/bz2/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitLab, ocaml, findlib, bzip2, autoreconfHook }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "bz2 is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/camlpdf/default.nix b/pkgs/development/ocaml-modules/camlpdf/default.nix
index 06456b9c930e0..cbcb67e2d295c 100644
--- a/pkgs/development/ocaml-modules/camlpdf/default.nix
+++ b/pkgs/development/ocaml-modules/camlpdf/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, which, ocaml, findlib }:
 
-if !lib.versionAtLeast ocaml.version "4.10"
+if lib.versionOlder ocaml.version "4.10"
 then throw "camlpdf is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/caqti/default.nix b/pkgs/development/ocaml-modules/caqti/default.nix
index e8367402cad2e..a4ac9dadad155 100644
--- a/pkgs/development/ocaml-modules/caqti/default.nix
+++ b/pkgs/development/ocaml-modules/caqti/default.nix
@@ -1,8 +1,10 @@
-{ lib, fetchFromGitHub, buildDunePackage, cppo, logs, ptime, uri }:
+{ lib, fetchFromGitHub, buildDunePackage
+, cppo, logs, ptime, uri, bigstringaf
+, re, cmdliner, alcotest }:
 
 buildDunePackage rec {
   pname = "caqti";
-  version = "1.7.0";
+  version = "1.8.0";
   useDune2 = true;
 
   minimumOCamlVersion = "4.04";
@@ -11,11 +13,14 @@ buildDunePackage rec {
     owner = "paurkedal";
     repo = "ocaml-${pname}";
     rev = "v${version}";
-    sha256 = "sha256-NGK38so6ZVCRbtV3ww1u31EFAjkHgDdsFfFUwc8ldm4=";
+    sha256 = "sha256-8uKlrq9j1Z3QzkCyoRIn2j6wCdGyo7BY7XlbFHN1xVE=";
   };
 
   nativeBuildInputs = [ cppo ];
-  propagatedBuildInputs = [ logs ptime uri ];
+  propagatedBuildInputs = [ logs ptime uri bigstringaf ];
+  checkInputs = [ re cmdliner alcotest ];
+
+  doCheck = true;
 
   meta = {
     description = "Unified interface to relational database libraries";
diff --git a/pkgs/development/ocaml-modules/cmdliner/default.nix b/pkgs/development/ocaml-modules/cmdliner/default.nix
index 9536cc25290e4..7797055610098 100644
--- a/pkgs/development/ocaml-modules/cmdliner/default.nix
+++ b/pkgs/development/ocaml-modules/cmdliner/default.nix
@@ -1,35 +1,27 @@
 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
 
-let
-  pname = "cmdliner";
-in
-
-assert lib.versionAtLeast ocaml.version "4.01.0";
-
-let param =
-  if lib.versionAtLeast ocaml.version "4.03" then {
-    version = "1.0.4";
-    sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw";
-  } else {
-    version = "1.0.2";
-    sha256 = "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1";
-  }
-; in
+assert (lib.versionAtLeast ocaml.version "4.03");
 
 stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-${pname}-${version}";
-  inherit (param) version;
+  pname = "cmdliner";
+  version = "1.0.4";
 
   src = fetchurl {
     url = "https://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
-    inherit (param) sha256;
+    sha256 = "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw";
   };
 
-  nativeBuildInputs = [ ocaml ocamlbuild findlib topkg ];
-  buildInputs = [ topkg ];
-  propagatedBuildInputs = [ result ];
-
-  inherit (topkg) buildPhase installPhase;
+  nativeBuildInputs = [ ocaml ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+  installTargets = "install install-doc";
+  installFlags = [
+    "LIBDIR=$(out)/lib/ocaml/${ocaml.version}/site-lib/${pname}"
+    "DOCDIR=$(out)/share/doc/${pname}"
+  ];
+  postInstall = ''
+    mv $out/lib/ocaml/${ocaml.version}/site-lib/${pname}/{opam,${pname}.opam}
+  '';
 
   meta = with lib; {
     homepage = "https://erratique.ch/software/cmdliner";
diff --git a/pkgs/development/ocaml-modules/coin/default.nix b/pkgs/development/ocaml-modules/coin/default.nix
index f2e0919bdee45..0ff2ce9404105 100644
--- a/pkgs/development/ocaml-modules/coin/default.nix
+++ b/pkgs/development/ocaml-modules/coin/default.nix
@@ -1,20 +1,19 @@
 { buildDunePackage
-, fetchzip
+, fetchurl
 , findlib
 , lib
-, menhir
 , ocaml
 , re
 }:
 
 buildDunePackage rec {
   pname = "coin";
-  version = "0.1.3";
+  version = "0.1.4";
   minimalOCamlVersion = "4.03";
 
-  src = fetchzip {
-    url = "https://github.com/mirage/coin/releases/download/v${version}/coin-v${version}.tbz";
-    sha256 = "06bfidvglyp9hzvr2xwbdx8wf26is2xrzc31fldzjf5ab0vd076p";
+  src = fetchurl {
+    url = "https://github.com/mirage/coin/releases/download/v${version}/coin-${version}.tbz";
+    sha256 = "sha256:0069qqswd1ik5ay3d5q1v1pz0ql31kblfsnv0ax0z8jwvacp3ack";
   };
 
   postPatch = ''
@@ -22,9 +21,7 @@ buildDunePackage rec {
       'ocaml} -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib '
   '';
 
-  useDune2 = true;
-
-  nativeBuildInputs = [ menhir findlib ];
+  nativeBuildInputs = [ findlib ];
   buildInputs = [ re ];
 
   strictDeps = true;
diff --git a/pkgs/development/ocaml-modules/cpdf/default.nix b/pkgs/development/ocaml-modules/cpdf/default.nix
index 3f60263736e8e..b1694885258a1 100644
--- a/pkgs/development/ocaml-modules/cpdf/default.nix
+++ b/pkgs/development/ocaml-modules/cpdf/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, ocaml, findlib, camlpdf, ncurses }:
 
-if !lib.versionAtLeast ocaml.version "4.10"
+if lib.versionOlder ocaml.version "4.10"
 then throw "cpdf is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/cstruct/lwt.nix b/pkgs/development/ocaml-modules/cstruct/lwt.nix
index df8941d1260d6..60e73449264fb 100644
--- a/pkgs/development/ocaml-modules/cstruct/lwt.nix
+++ b/pkgs/development/ocaml-modules/cstruct/lwt.nix
@@ -1,6 +1,6 @@
 { lib, buildDunePackage, cstruct, lwt }:
 
-if !lib.versionAtLeast (cstruct.version or "1") "3"
+if lib.versionOlder (cstruct.version or "1") "3"
 then cstruct
 else
 
diff --git a/pkgs/development/ocaml-modules/cstruct/ppx.nix b/pkgs/development/ocaml-modules/cstruct/ppx.nix
index 523a2c04f618e..6705602ef25bf 100644
--- a/pkgs/development/ocaml-modules/cstruct/ppx.nix
+++ b/pkgs/development/ocaml-modules/cstruct/ppx.nix
@@ -2,7 +2,7 @@
 , ounit, cppo, ppx_sexp_conv, cstruct-unix, cstruct-sexp
 }:
 
-if !lib.versionAtLeast (cstruct.version or "1") "3"
+if lib.versionOlder (cstruct.version or "1") "3"
 then cstruct
 else
 
diff --git a/pkgs/development/ocaml-modules/cstruct/sexp.nix b/pkgs/development/ocaml-modules/cstruct/sexp.nix
index b04810e48038a..69972ad34037f 100644
--- a/pkgs/development/ocaml-modules/cstruct/sexp.nix
+++ b/pkgs/development/ocaml-modules/cstruct/sexp.nix
@@ -1,6 +1,6 @@
 { lib, buildDunePackage, ocaml, alcotest, cstruct, sexplib }:
 
-if !lib.versionAtLeast (cstruct.version or "1") "3"
+if lib.versionOlder (cstruct.version or "1") "3"
 then cstruct
 else
 
diff --git a/pkgs/development/ocaml-modules/cstruct/unix.nix b/pkgs/development/ocaml-modules/cstruct/unix.nix
index 1ea27bb04de44..c3d280d785abc 100644
--- a/pkgs/development/ocaml-modules/cstruct/unix.nix
+++ b/pkgs/development/ocaml-modules/cstruct/unix.nix
@@ -1,6 +1,6 @@
 { lib, buildDunePackage, cstruct }:
 
-if !lib.versionAtLeast (cstruct.version or "1") "3"
+if lib.versionOlder (cstruct.version or "1") "3"
 then cstruct
 else
 
diff --git a/pkgs/development/ocaml-modules/csv/lwt.nix b/pkgs/development/ocaml-modules/csv/lwt.nix
index b0f771209aa61..c90dc019b9d4c 100644
--- a/pkgs/development/ocaml-modules/csv/lwt.nix
+++ b/pkgs/development/ocaml-modules/csv/lwt.nix
@@ -1,6 +1,6 @@
 { lib, buildDunePackage, ocaml, csv, ocaml_lwt }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "csv-lwt is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/ctypes/default.nix b/pkgs/development/ocaml-modules/ctypes/default.nix
index 833ea45a86923..6e9aa98e1cca5 100644
--- a/pkgs/development/ocaml-modules/ctypes/default.nix
+++ b/pkgs/development/ocaml-modules/ctypes/default.nix
@@ -1,18 +1,18 @@
 { lib, stdenv, fetchFromGitHub, ocaml, findlib, libffi, pkg-config, ncurses, integers, bigarray-compat }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "ctypes is not available for OCaml ${ocaml.version}"
 else
 
 stdenv.mkDerivation rec {
   pname = "ocaml${ocaml.version}-ctypes";
-  version = "0.18.0";
+  version = "0.20.0";
 
   src = fetchFromGitHub {
     owner = "ocamllabs";
     repo = "ocaml-ctypes";
     rev = version;
-    sha256 = "sha256-eu5RAuPYC97IM4XUsUw3HQ1BJlEHQ+eBpsdUE6hd+Q8=";
+    sha256 = "sha256-fr60H/hiSVjEg11qM8LF1Y5CotS3FEyFdCcIh0A0uI4=";
   };
 
   nativeBuildInputs = [ pkg-config ocaml findlib ];
diff --git a/pkgs/development/ocaml-modules/dssi/default.nix b/pkgs/development/ocaml-modules/dssi/default.nix
new file mode 100644
index 0000000000000..b8235cef96905
--- /dev/null
+++ b/pkgs/development/ocaml-modules/dssi/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, ladspa, alsa-lib }:
+
+buildDunePackage rec {
+  pname = "dssi";
+  version = "0.1.5";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "savonet";
+    repo = "ocaml-dssi";
+    rev = "v${version}";
+    sha256 = "1frbmx1aznwp60r6bkx1whqyr6mkflvd9ysmjg7s7b80mh0s4ix6";
+  };
+
+  buildInputs = [ dune-configurator ];
+  propagatedBuildInputs = [ ladspa alsa-lib ];
+
+  meta = with lib; {
+    homepage = "https://github.com/savonet/ocaml-dssi";
+    description = "Bindings for the DSSI API which provides audio synthesizers";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/eliom/default.nix b/pkgs/development/ocaml-modules/eliom/default.nix
index e3af173edc916..f3c587428a409 100644
--- a/pkgs/development/ocaml-modules/eliom/default.nix
+++ b/pkgs/development/ocaml-modules/eliom/default.nix
@@ -16,17 +16,18 @@
 , js_of_ocaml-tyxml
 , lwt_ppx
 , ocamlnet
+, ocsipersist
 }:
 
 stdenv.mkDerivation rec {
   pname = "eliom";
-  version = "8.9.0";
+  version = "9.4.0";
 
   src = fetchFromGitHub {
     owner = "ocsigen";
     repo = "eliom";
     rev = version;
-    sha256 = "sha256-VNxzpVpXEGlixyjadbW0GjL83jcKV5TWd46UReNYO6w=";
+    sha256 = "sha256:1yn8mqxv9yz51x81j8wv1jn7l7crm8azp1m2g4zn5nz2s4nmfv6q";
   };
 
   nativeBuildInputs = [
@@ -49,12 +50,17 @@ stdenv.mkDerivation rec {
     lwt_ppx
     lwt_react
     ocsigen_server
+    ocsipersist
     ppx_deriving
   ];
 
   strictDeps = true;
 
-  installPhase = "opaline -prefix $out -libdir $OCAMLFIND_DESTDIR";
+  installPhase = ''
+    runHook preInstall
+    opaline -prefix $out -libdir $OCAMLFIND_DESTDIR
+    runHook postInstall
+  '';
 
   setupHook = [ ./setup-hook.sh ];
 
diff --git a/pkgs/development/ocaml-modules/erm_xml/default.nix b/pkgs/development/ocaml-modules/erm_xml/default.nix
index ebf9cdaad69ac..d1f93f5726453 100644
--- a/pkgs/development/ocaml-modules/erm_xml/default.nix
+++ b/pkgs/development/ocaml-modules/erm_xml/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "erm_xml is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/expat/default.nix b/pkgs/development/ocaml-modules/expat/default.nix
index 6fb7927073d41..0bd6c733e6fbd 100644
--- a/pkgs/development/ocaml-modules/expat/default.nix
+++ b/pkgs/development/ocaml-modules/expat/default.nix
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  doCheck = !lib.versionAtLeast ocaml.version "4.06";
+  doCheck = lib.versionOlder ocaml.version "4.06";
   checkTarget = "testall";
 
   createFindlibDestdir = true;
diff --git a/pkgs/development/ocaml-modules/farfadet/default.nix b/pkgs/development/ocaml-modules/farfadet/default.nix
index 1ac5595a015b9..a02866e3b4f0c 100644
--- a/pkgs/development/ocaml-modules/farfadet/default.nix
+++ b/pkgs/development/ocaml-modules/farfadet/default.nix
@@ -2,7 +2,7 @@
 , faraday
 }:
 
-if !lib.versionAtLeast ocaml.version "4.3"
+if lib.versionOlder ocaml.version "4.3"
 then throw "farfadet is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/ffmpeg/base.nix b/pkgs/development/ocaml-modules/ffmpeg/base.nix
index 77a6ef01ac9ff..5dc5f612fd325 100644
--- a/pkgs/development/ocaml-modules/ffmpeg/base.nix
+++ b/pkgs/development/ocaml-modules/ffmpeg/base.nix
@@ -1,7 +1,7 @@
 { lib, fetchFromGitHub }:
 
 rec {
-  version = "1.1.0";
+  version = "1.1.3";
 
   useDune2 = true;
 
@@ -9,7 +9,7 @@ rec {
     owner = "savonet";
     repo = "ocaml-ffmpeg";
     rev = "v${version}";
-    sha256 = "13rc3d0n963a28my5ahv78r82rh450hvbsc74mb6ld0r9v210r0p";
+    sha256 = "1l40dfc0v3wn2drfq0mclrc1lrlpycdjrkrw4knkwpsg0za68v4c";
   };
 
   meta = with lib; {
diff --git a/pkgs/development/ocaml-modules/flex/default.nix b/pkgs/development/ocaml-modules/flex/default.nix
new file mode 100644
index 0000000000000..c9db2440e01cd
--- /dev/null
+++ b/pkgs/development/ocaml-modules/flex/default.nix
@@ -0,0 +1,22 @@
+{ buildDunePackage, fetchFromGitHub, lib, reason }:
+
+buildDunePackage rec {
+  pname = "flex";
+  version = "unstable-2020-09-12";
+
+  src = fetchFromGitHub {
+    owner = "jordwalke";
+    repo = "flex";
+    rev = "6ff12fe4f96749ffd3c0ea3d9962742767937b4a";
+    sha256 = "sha256-GomTOdlU5ZwElKK8CM4DEMr51YDIrFKmTxUCGMLL3c4=";
+  };
+
+  nativeBuildInputs = [ reason ];
+
+  meta = with lib; {
+    description = "Native Reason implementation of CSS Flexbox layout. An Yoga project port";
+    homepage = "https://github.com/jordwalke/flex";
+    maintainers = with maintainers; [ superherointj ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/fmt/default.nix b/pkgs/development/ocaml-modules/fmt/default.nix
index edf8d08eaabaa..4816cab57cfd3 100644
--- a/pkgs/development/ocaml-modules/fmt/default.nix
+++ b/pkgs/development/ocaml-modules/fmt/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, seq, stdlib-shims }:
 
-if !lib.versionAtLeast ocaml.version "4.05"
+if lib.versionOlder ocaml.version "4.05"
 then throw "fmt is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/fpath/default.nix b/pkgs/development/ocaml-modules/fpath/default.nix
index 53489f69cc3ef..84f25fed28406 100644
--- a/pkgs/development/ocaml-modules/fpath/default.nix
+++ b/pkgs/development/ocaml-modules/fpath/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, astring }:
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 then throw "fpath is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/frontc/default.nix b/pkgs/development/ocaml-modules/frontc/default.nix
index c05422497ee73..c4ec0908fb0db 100644
--- a/pkgs/development/ocaml-modules/frontc/default.nix
+++ b/pkgs/development/ocaml-modules/frontc/default.nix
@@ -1,26 +1,19 @@
-{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, ocaml, findlib }:
+{ lib, buildDunePackage, fetchFromGitHub, ocaml, menhir }:
 
-let
-  meta_file = fetchurl {
-    url = "https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/META";
-    sha256 = "0s2wsinycldk8y5p09xd0hsgbhckhy7bkghzl63bph6mwv64kq2d";
-  };
-in
-
-stdenv.mkDerivation rec {
-  pname = "ocaml${ocaml.version}-FrontC";
-  version = "3.4.1";
+buildDunePackage rec {
+  pname = "FrontC";
+  version = "4.1.0";
 
   src = fetchFromGitHub {
     owner = "BinaryAnalysisPlatform";
     repo = "FrontC";
-    rev = "V_${lib.replaceStrings ["."] ["_"] version}";
-    sha256 = "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak";
+    rev = "v${version}";
+    sha256 = "1mi1vh4qgscnb470qwidccaqd068j1bqlz6pf6wddk21paliwnqb";
   };
 
-  nativeBuildInputs = [ ocaml findlib ];
+  minimalOCamlVersion = "4.08";
 
-  strictDeps = true;
+  nativeBuildInputs = [ menhir ];
 
   meta = with lib; {
     inherit (src.meta) homepage;
@@ -29,14 +22,4 @@ stdenv.mkDerivation rec {
     license = licenses.lgpl21;
     maintainers = [ maintainers.maurer ];
   };
-
-  patches = [ (fetchpatch {
-      url = "https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/opam.patch";
-      sha256 = "0v4f6740jbj1kxg1y03dzfa3x3gsrhv06wpzdj30gl4ki5fvj4hs";
-    })
-  ];
-
-  makeFlags = [ "PREFIX=$(out)" "OCAML_SITE=$(OCAMLFIND_DESTDIR)" ];
-
-  postInstall = "cp ${meta_file} $OCAMLFIND_DESTDIR/FrontC/META";
 }
diff --git a/pkgs/development/ocaml-modules/gen_js_api/default.nix b/pkgs/development/ocaml-modules/gen_js_api/default.nix
new file mode 100644
index 0000000000000..e0474cdac6a89
--- /dev/null
+++ b/pkgs/development/ocaml-modules/gen_js_api/default.nix
@@ -0,0 +1,41 @@
+{ buildDunePackage
+, lib
+, ppxlib
+, fetchFromGitHub
+, ojs
+, js_of_ocaml-compiler
+, nodejs
+}:
+
+buildDunePackage rec {
+  pname = "gen_js_api";
+  version = "1.0.9";
+
+  src = fetchFromGitHub {
+    owner = "LexiFi";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1qx6if1avr484bl9x1h0cksdc6gqw5i4pwzdr27h46hppnnvi8y8";
+  };
+
+  minimalOCamlVersion = "4.08";
+
+  propagatedBuildInputs = [ ojs ppxlib ];
+  checkInputs = [ js_of_ocaml-compiler nodejs ];
+  doCheck = true;
+
+  meta = {
+    homepage = "https://github.com/LexiFi/gen_js_api";
+    description = "Easy OCaml bindings for JavaScript libraries";
+    longDescription = ''
+      gen_js_api aims at simplifying the creation of OCaml bindings for
+      JavaScript libraries. Authors of bindings write OCaml signatures for
+      JavaScript libraries and the tool generates the actual binding code with a
+      combination of implicit conventions and explicit annotations.
+
+      gen_js_api is to be used with the js_of_ocaml compiler.
+    '';
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.bcc32 ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/gen_js_api/ojs.nix b/pkgs/development/ocaml-modules/gen_js_api/ojs.nix
new file mode 100644
index 0000000000000..722f9fa7f6e15
--- /dev/null
+++ b/pkgs/development/ocaml-modules/gen_js_api/ojs.nix
@@ -0,0 +1,21 @@
+{ buildDunePackage
+, gen_js_api
+}:
+
+buildDunePackage rec {
+  pname = "ojs";
+
+  inherit (gen_js_api) version src;
+
+  doCheck = false; # checks depend on gen_js_api, which is a cycle
+
+  minimalOCamlVersion = "4.08";
+
+  meta = {
+    inherit (gen_js_api.meta) homepage license maintainers;
+    description = "Runtime Library for gen_js_api generated libraries";
+    longDescription = ''
+      To be used in conjunction with gen_js_api
+    '';
+  };
+}
diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix
index 58fa1eb00212d..07e4d99344f7e 100644
--- a/pkgs/development/ocaml-modules/hacl-star/raw.nix
+++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix
@@ -14,6 +14,9 @@ stdenv.mkDerivation rec {
 
   minimalOCamlVersion = "4.08";
 
+  # strictoverflow is disabled because it breaks aarch64-darwin
+  hardeningDisable = [ "strictoverflow" ];
+
   postPatch = ''
     patchShebangs ./
   '';
diff --git a/pkgs/development/ocaml-modules/javalib/default.nix b/pkgs/development/ocaml-modules/javalib/default.nix
index ccd3fa19a92cf..a12ade51c2ea9 100644
--- a/pkgs/development/ocaml-modules/javalib/default.nix
+++ b/pkgs/development/ocaml-modules/javalib/default.nix
@@ -8,7 +8,7 @@
 , extlib
 }:
 
-if !lib.versionAtLeast ocaml.version "4.04"
+if lib.versionOlder ocaml.version "4.04"
 then throw "javalib is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/lablgl/default.nix b/pkgs/development/ocaml-modules/lablgl/default.nix
index 85c27f93a0918..fa525dbba813d 100644
--- a/pkgs/development/ocaml-modules/lablgl/default.nix
+++ b/pkgs/development/ocaml-modules/lablgl/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut } :
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 then throw "lablgl is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix
index 736e345dfb35d..75b3940a1d506 100644
--- a/pkgs/development/ocaml-modules/lablgtk-extras/default.nix
+++ b/pkgs/development/ocaml-modules/lablgtk-extras/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitLab, ocaml, findlib, camlp4, config-file, lablgtk, xmlm }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 || lib.versionAtLeast ocaml.version "4.13"
 then throw "lablgtk-extras is not available for OCaml ${ocaml.version}"
 else
diff --git a/pkgs/development/ocaml-modules/ladspa/default.nix b/pkgs/development/ocaml-modules/ladspa/default.nix
new file mode 100644
index 0000000000000..b037a61a0fb4f
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ladspa/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, ladspaH }:
+
+buildDunePackage rec {
+  pname = "ladspa";
+  version = "0.2.2";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "savonet";
+    repo = "ocaml-ladspa";
+    rev = "v${version}";
+    sha256 = "1y83infjaz9apzyvaaqw331zqdysmn3bpidfab061v3bczv4jzbz";
+  };
+
+  buildInputs = [ dune-configurator ];
+  propagatedBuildInputs = [ ladspaH ];
+
+  meta = with lib; {
+    homepage = "https://github.com/savonet/ocaml-alsa";
+    description = "Bindings for the LADSPA API which provides audio effects";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/lastfm/default.nix b/pkgs/development/ocaml-modules/lastfm/default.nix
new file mode 100644
index 0000000000000..41bdac459b310
--- /dev/null
+++ b/pkgs/development/ocaml-modules/lastfm/default.nix
@@ -0,0 +1,32 @@
+{ lib
+, buildDunePackage
+, fetchFromGitHub
+, pkg-config
+, dune-configurator
+, xmlplaylist
+, ocaml_pcre
+, ocamlnet
+}:
+
+buildDunePackage rec {
+  pname = "lastfm";
+  version = "0.3.3";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "savonet";
+    repo = "ocaml-lastfm";
+    rev = "v${version}";
+    sha256 = "1sz400ny9h7fs20k7600q475q164x49ba30ls3q9y35rhm3g2y2b";
+  };
+
+  propagatedBuildInputs = [ xmlplaylist ocaml_pcre ocamlnet ];
+
+  meta = with lib; {
+    homepage = "https://github.com/savonet/ocaml-lastfm";
+    description = "OCaml API to lastfm radio and audioscrobbler";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/llvm/default.nix b/pkgs/development/ocaml-modules/llvm/default.nix
index 9ab3d906ab1ef..c0600df64f277 100644
--- a/pkgs/development/ocaml-modules/llvm/default.nix
+++ b/pkgs/development/ocaml-modules/llvm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, python2, cmake, libllvm, ocaml, findlib, ctypes }:
+{ stdenv, lib, python3, cmake, libllvm, ocaml, findlib, ctypes }:
 
 let version = lib.getVersion libllvm; in
 
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
 
   inherit (libllvm) src;
 
-  nativeBuildInputs = [ cmake python2 ocaml findlib ];
+  nativeBuildInputs = [ cmake python3 ocaml findlib ];
   buildInputs = [ ctypes ];
   propagatedBuildInputs = [ libllvm ];
 
diff --git a/pkgs/development/ocaml-modules/logs/default.nix b/pkgs/development/ocaml-modules/logs/default.nix
index 4359f09ebd324..adc7f255b1988 100644
--- a/pkgs/development/ocaml-modules/logs/default.nix
+++ b/pkgs/development/ocaml-modules/logs/default.nix
@@ -8,7 +8,7 @@ let
   webpage = "https://erratique.ch/software/${pname}";
 in
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 then throw "logs is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/lua-ml/default.nix b/pkgs/development/ocaml-modules/lua-ml/default.nix
index 586fc395064f1..523e453b7d488 100644
--- a/pkgs/development/ocaml-modules/lua-ml/default.nix
+++ b/pkgs/development/ocaml-modules/lua-ml/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, opaline }:
 
-if !lib.versionAtLeast ocaml.version "4.07"
+if lib.versionOlder ocaml.version "4.07"
 then throw "lua-ml is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix
index 96e3abc267461..5f1059395ab22 100644
--- a/pkgs/development/ocaml-modules/lwt/default.nix
+++ b/pkgs/development/ocaml-modules/lwt/default.nix
@@ -4,7 +4,7 @@
 , ocaml-syntax-shims
 }:
 
-let inherit (lib) optional versionAtLeast; in
+let inherit (lib) optional versionOlder; in
 
 buildDunePackage rec {
   pname = "lwt";
@@ -22,9 +22,9 @@ buildDunePackage rec {
   strictDeps = true;
 
   nativeBuildInputs = [ pkg-config cppo ]
-    ++ optional (!versionAtLeast ocaml.version "4.08") ocaml-syntax-shims;
+    ++ optional (versionOlder ocaml.version "4.08") ocaml-syntax-shims;
   buildInputs = [ dune-configurator ]
-    ++ optional (!versionAtLeast ocaml.version "4.07") ncurses;
+    ++ optional (versionOlder ocaml.version "4.07") ncurses;
   propagatedBuildInputs = [ libev mmap ocplib-endian seq result ];
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/nocrypto/default.nix b/pkgs/development/ocaml-modules/nocrypto/default.nix
index d179c8c1c9019..e34e3ae014627 100644
--- a/pkgs/development/ocaml-modules/nocrypto/default.nix
+++ b/pkgs/development/ocaml-modules/nocrypto/default.nix
@@ -15,7 +15,7 @@ let
   '';
 in
 
-if !versionAtLeast ocaml.version "4.08"
+if versionOlder ocaml.version "4.08"
 then throw "nocrypto is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/notty/default.nix b/pkgs/development/ocaml-modules/notty/default.nix
index 1598b2ee5cd35..2e53944a3068a 100644
--- a/pkgs/development/ocaml-modules/notty/default.nix
+++ b/pkgs/development/ocaml-modules/notty/default.nix
@@ -4,7 +4,7 @@
 
 with lib;
 
-if !versionAtLeast ocaml.version "4.05"
+if versionOlder ocaml.version "4.05"
 then throw "notty is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
index 763617be1328c..d084e7f8a62e3 100644
--- a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
+++ b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib, astring, pprint }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
index 480ea6daf203f..6ffeec9830485 100644
--- a/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-deriving/default.nix
@@ -9,7 +9,7 @@
 , num
 }:
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 then throw "ocsigen-deriving is not available of OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix
index 67ec458a122d5..daa64b7e30193 100644
--- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix
@@ -2,7 +2,7 @@
 , bigstringaf, lwt, cstruct, mirage-crypto, zarith, mirage-crypto-ec, ptime, mirage-crypto-rng, mtime, ca-certs
 , cohttp, cohttp-lwt-unix, hmap
 , lwt_log, ocaml_pcre, cryptokit, xml-light, ipaddr
-, pgocaml, camlzip, ocaml_sqlite3
+, camlzip
 , makeWrapper
 }:
 
@@ -17,7 +17,7 @@ let caml_ld_library_path =
 ; in
 
 buildDunePackage rec {
-  version = "4.0.1";
+  version = "5.0.1";
   pname = "ocsigenserver";
 
   useDune2 = true;
@@ -27,11 +27,11 @@ buildDunePackage rec {
     owner = "ocsigen";
     repo = "ocsigenserver";
     rev = version;
-    sha256 = "0pid4irkmdmx1d6n2rvcvx5mnljl3hazzdqc3bql72by35izfac6";
+    sha256 = "sha256:1vzza33hd41740dqrx4854rqpyd8wv7kwpsvvmlpck841i9lh8h5";
   };
 
   nativeBuildInputs = [ makeWrapper which ];
-  buildInputs = [ lwt_react pgocaml camlzip ocaml_sqlite3 ];
+  buildInputs = [ lwt_react camlzip ];
 
   propagatedBuildInputs = [ cohttp cohttp-lwt-unix cryptokit hmap ipaddr lwt_log lwt_ssl
     ocaml_pcre xml-light
diff --git a/pkgs/development/ocaml-modules/ocsigen-start/default.nix b/pkgs/development/ocaml-modules/ocsigen-start/default.nix
index 118138dc8fd00..4f439733740e2 100644
--- a/pkgs/development/ocaml-modules/ocsigen-start/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-start/default.nix
@@ -6,7 +6,7 @@
 
 stdenv.mkDerivation rec {
   pname = "ocaml${ocaml.version}-ocsigen-start";
-  version = "4.3.0";
+  version = "4.5.0";
 
   nativeBuildInputs = [ ocaml findlib eliom ];
   propagatedBuildInputs = [ pgocaml_ppx safepass ocsigen-toolkit yojson resource-pooling cohttp-lwt-unix ocamlnet ];
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
     owner = "ocsigen";
     repo = "ocsigen-start";
     rev = version;
-    sha256 = "0lkl59dwzyqq2lyr46fyjr27ms0fp9h59xfsn37faaavdd7v0h98";
+    sha256 = "sha256:1n94r8rbkzxbgcz5w135n6f2cwpc91bdvf7yslcdq4cn713rncmq";
   };
 
   preInstall = ''
diff --git a/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix b/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix
index 1b2dd72a2ec38..12a92c5be399c 100644
--- a/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix
+++ b/pkgs/development/ocaml-modules/ocsigen-toolkit/default.nix
@@ -5,7 +5,7 @@
 stdenv.mkDerivation rec {
  pname = "ocsigen-toolkit";
  name = "ocaml${ocaml.version}-${pname}-${version}";
- version = "3.0.1";
+ version = "3.1.1";
 
  propagatedBuildInputs = [ calendar js_of_ocaml-ppx_deriving_json eliom ];
  nativeBuildInputs = [ ocaml findlib opaline eliom ];
@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
     owner = "ocsigen";
     repo = pname;
     rev = version;
-    sha256 = "1yx50ja2wcs5vfy4rk9szgwccpnihkjn14i4ywchx4yr4ppr00fm";
+    sha256 = "sha256:1fm0vvccmjib9yj5m2760vhzb4z3392swlprp51az53g3vk4q218";
   };
 
   meta = {
diff --git a/pkgs/development/ocaml-modules/ocsipersist/default.nix b/pkgs/development/ocaml-modules/ocsipersist/default.nix
new file mode 100644
index 0000000000000..8006477dad96e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocsipersist/default.nix
@@ -0,0 +1,20 @@
+{ buildDunePackage, ocsipersist-lib
+, ocsipersist-pgsql
+, ocsipersist-sqlite
+}:
+
+buildDunePackage {
+  pname = "ocsipersist";
+  inherit (ocsipersist-lib) src version useDune2;
+
+  buildInputs = [
+    ocsipersist-pgsql
+    ocsipersist-sqlite
+  ];
+
+  propagatedBuildInputs = [ ocsipersist-lib ];
+
+  meta = ocsipersist-lib.meta // {
+    description = "Persistent key/value storage (for Ocsigen) using multiple backends";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ocsipersist/lib.nix b/pkgs/development/ocaml-modules/ocsipersist/lib.nix
new file mode 100644
index 0000000000000..a2abc5d9b399e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocsipersist/lib.nix
@@ -0,0 +1,27 @@
+{ lib, buildDunePackage, fetchFromGitHub
+, lwt_ppx, lwt
+}:
+
+buildDunePackage rec {
+  pname = "ocsipersist-lib";
+  version = "1.1.0";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "ocsigen";
+    repo = "ocsipersist";
+    rev = version;
+    sha256 = "sha256:1d6kdcfjvrz0dl764mnyxc477aa57rvmzkg154qc915w2y1nbz9a";
+  };
+
+  buildInputs = [ lwt_ppx ];
+  propagatedBuildInputs = [ lwt ];
+
+  meta = {
+    description = "Persistent key/value storage (for Ocsigen) - support library";
+    license = lib.licenses.lgpl21Only;
+    maintainers = [ lib.maintainers.vbgl ];
+    inherit (src.meta) homepage;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix b/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix
new file mode 100644
index 0000000000000..e93c8b4790359
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix
@@ -0,0 +1,24 @@
+{ buildDunePackage, ocsipersist-lib
+, lwt_log
+, ocsigen_server
+, pgocaml
+, xml-light
+}:
+
+buildDunePackage {
+  pname = "ocsipersist-pgsql";
+  inherit (ocsipersist-lib) version src useDune2;
+
+  propagatedBuildInputs = [
+    lwt_log
+    ocsigen_server
+    ocsipersist-lib
+    pgocaml
+    xml-light
+  ];
+
+  meta = ocsipersist-lib.meta // {
+    description = "Persistent key/value storage (for Ocsigen) using PostgreSQL";
+  };
+}
+
diff --git a/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix b/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix
new file mode 100644
index 0000000000000..2cfa30bc908e6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix
@@ -0,0 +1,23 @@
+{ buildDunePackage, ocsipersist-lib
+, lwt_log
+, ocaml_sqlite3
+, ocsigen_server
+, xml-light
+}:
+
+buildDunePackage {
+  pname = "ocsipersist-sqlite";
+  inherit (ocsipersist-lib) version src useDune2;
+
+  propagatedBuildInputs = [
+    lwt_log
+    ocaml_sqlite3
+    ocsigen_server
+    ocsipersist-lib
+    xml-light
+  ];
+
+  meta = ocsipersist-lib.meta // {
+    description = "Persistent key/value storage (for Ocsigen) using SQLite";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/phylogenetics/default.nix b/pkgs/development/ocaml-modules/phylogenetics/default.nix
index 1cb348a41656e..366ad9cc24acf 100644
--- a/pkgs/development/ocaml-modules/phylogenetics/default.nix
+++ b/pkgs/development/ocaml-modules/phylogenetics/default.nix
@@ -16,13 +16,11 @@
 
 buildDunePackage rec {
   pname = "phylogenetics";
-  version = "0.0.0";
-
-  useDune2 = true;
+  version = "0.1.0";
 
   src = fetchurl {
     url = "https://github.com/biocaml/phylogenetics/releases/download/v${version}/${pname}-${version}.tbz";
-    sha256 = "sha256:0knfh2s0jfnsc0vsq5yw5xla7m7i98xd0qv512dyh3jhkh7m00l9";
+    sha256 = "sha256:064ldljzh17h8pp0c27xd1pf6c50yhccw2g3hddzhk07a95q8v16";
   };
 
   # Ensure compatibility with printbox ≥ 0.6
diff --git a/pkgs/development/ocaml-modules/ppxlib/default.nix b/pkgs/development/ocaml-modules/ppxlib/default.nix
index c5b2dd762cedb..2b7feddfa89b2 100644
--- a/pkgs/development/ocaml-modules/ppxlib/default.nix
+++ b/pkgs/development/ocaml-modules/ppxlib/default.nix
@@ -49,7 +49,7 @@ let param = {
 }."${version}"; in
 
 if param ? max_version && lib.versionAtLeast ocaml.version param.max_version
-|| param ? min_version && !lib.versionAtLeast ocaml.version param.min_version
+|| param ? min_version && lib.versionOlder ocaml.version param.min_version
 then throw "ppxlib-${version} is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/ptime/default.nix b/pkgs/development/ocaml-modules/ptime/default.nix
index ac30876520a65..169cf4ce16f5a 100644
--- a/pkgs/development/ocaml-modules/ptime/default.nix
+++ b/pkgs/development/ocaml-modules/ptime/default.nix
@@ -1,14 +1,16 @@
-{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml
+{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, js_of_ocaml
 , jsooSupport ? true
 }:
 
 stdenv.mkDerivation rec {
-  version = "0.8.5";
+  version = "0.8.6";
   pname = "ocaml${ocaml.version}-ptime";
 
+  minimalOCamlVersion = "4.03";
+
   src = fetchurl {
     url = "https://erratique.ch/software/ptime/releases/ptime-${version}.tbz";
-    sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27";
+    sha256 = "sha256-gy/fUsfUHUZx1A/2sQMQIFMHl1V+QO3zHAsEnZT/lkI=";
   };
 
   nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
@@ -16,8 +18,6 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
 
-  propagatedBuildInputs = [ result ];
-
   buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport}";
 
   inherit (topkg) installPhase;
diff --git a/pkgs/development/ocaml-modules/pure-splitmix/default.nix b/pkgs/development/ocaml-modules/pure-splitmix/default.nix
new file mode 100644
index 0000000000000..228f8ad8c488b
--- /dev/null
+++ b/pkgs/development/ocaml-modules/pure-splitmix/default.nix
@@ -0,0 +1,22 @@
+{ lib, fetchFromGitHub, buildDunePackage }:
+
+buildDunePackage rec {
+  pname = "pure-splitmix";
+  version = "0.3";
+
+  src = fetchFromGitHub {
+    owner = "Lysxia";
+    repo = pname;
+    rev = version;
+    sha256 = "RUnsAB4hMV87ItCyGhc47bHGY1iOwVv9kco2HxnzqbU=";
+  };
+
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/Lysxia/pure-splitmix";
+    description = "Purely functional splittable PRNG";
+    license = licenses.mit;
+    maintainers = [ maintainers.ulrikstrid ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/reactivedata/default.nix b/pkgs/development/ocaml-modules/reactivedata/default.nix
index 23ebb3144d11d..9be32d28bab9a 100644
--- a/pkgs/development/ocaml-modules/reactivedata/default.nix
+++ b/pkgs/development/ocaml-modules/reactivedata/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, react, opaline }:
 
-if !lib.versionAtLeast ocaml.version "4.04"
+if lib.versionOlder ocaml.version "4.04"
 then throw "reactiveData is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/rebez/default.nix b/pkgs/development/ocaml-modules/rebez/default.nix
new file mode 100644
index 0000000000000..b82c2ba748278
--- /dev/null
+++ b/pkgs/development/ocaml-modules/rebez/default.nix
@@ -0,0 +1,22 @@
+{ buildDunePackage, fetchFromGitHub, lib, reason }:
+
+buildDunePackage rec {
+  pname = "rebez";
+  version = "unstable-2019-06-20";
+
+  src = fetchFromGitHub {
+    owner = "jchavarri";
+    repo = "rebez";
+    rev = "03fa3b707abb28fdd710eb9e57ba40d9cd6ae163";
+    sha256 = "sha256-khZSwtwW+mP/EvAvIZMQyOb6FgNR+gmzpBZoD9ZPkpY=";
+  };
+
+  nativeBuildInputs = [ reason ];
+
+  meta = with lib; {
+    description = "Cubic bezier implementation in Reason / OCaml";
+    homepage = "https://github.com/jchavarri/rebez/";
+    maintainers = with maintainers; [ superherointj ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/reperf/default.nix b/pkgs/development/ocaml-modules/reperf/default.nix
new file mode 100644
index 0000000000000..bcae9dc695cfb
--- /dev/null
+++ b/pkgs/development/ocaml-modules/reperf/default.nix
@@ -0,0 +1,41 @@
+{ buildDunePackage, fetchFromGitHub, lib, printbox-text, reason }:
+
+buildDunePackage rec {
+  pname = "reperf";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "bryphe";
+    repo = "reperf";
+    rev = "68ef2f96899c09e6ac7d929b0375f7a806aee067";
+    sha256 = "sha256-ASujTsH4eDAYLNalB9Xt1p3C8x+FI0kMldZBYaXMCWc=";
+  };
+
+  postPatch = ''
+    substituteInPlace src/dune --replace "printbox" "printbox-text"
+  '';
+
+  nativeBuildInputs = [ reason ];
+
+  buildInputs = [
+    printbox-text
+  ];
+
+  meta = with lib; {
+    description = "Native Reason + JSOO cross-platform performance benchmarking tools";
+    longDescription = ''
+      Inspired by the core_bench tools from Janestreet.
+
+      reperf helps with:
+      * Timing: time spent in a code block
+      * Call count: frequency of code-path calls
+      * Allocations: code-block impact to garbage collector
+
+      Supports benchmarks, which are test cases that exercise performance scenarios.
+      Outputs a JSON performance report, and compare it with previous iterations - and fail if a regression is detected.
+    '';
+    homepage = "https://github.com/bryphe/reperf";
+    maintainers = with maintainers; [ superherointj ];
+    license = licenses.mit;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/samplerate/default.nix b/pkgs/development/ocaml-modules/samplerate/default.nix
new file mode 100644
index 0000000000000..c101cfc0c2798
--- /dev/null
+++ b/pkgs/development/ocaml-modules/samplerate/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, libsamplerate }:
+
+buildDunePackage rec {
+  pname = "samplerate";
+  version = "0.1.6";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "savonet";
+    repo = "ocaml-samplerate";
+    rev = "v${version}";
+    sha256 = "0h0i9v9p9n2givv3wys8qrfi1i7vp8kq7lnkf14s7d3m4r8x4wrp";
+  };
+
+  buildInputs = [ dune-configurator ];
+  propagatedBuildInputs = [ libsamplerate ];
+
+  meta = with lib; {
+    homepage = "https://github.com/savonet/ocaml-samplerate";
+    description = "Interface for libsamplerate";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/sawja/default.nix b/pkgs/development/ocaml-modules/sawja/default.nix
index ec1b59c04077d..eaad7e7f1bbf6 100644
--- a/pkgs/development/ocaml-modules/sawja/default.nix
+++ b/pkgs/development/ocaml-modules/sawja/default.nix
@@ -5,7 +5,7 @@ let
   version = "1.5.11";
 in
 
-if !lib.versionAtLeast ocaml.version "4.07"
+if lib.versionOlder ocaml.version "4.07"
 then throw "${pname} is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/sedlex/default.nix b/pkgs/development/ocaml-modules/sedlex/default.nix
index b808145bcbbcb..685d4426cfc30 100644
--- a/pkgs/development/ocaml-modules/sedlex/default.nix
+++ b/pkgs/development/ocaml-modules/sedlex/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib, gen, ppx_tools_versioned, ocaml-migrate-parsetree }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "sedlex is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/sosa/default.nix b/pkgs/development/ocaml-modules/sosa/default.nix
index 141e2a50193df..623f21748a87c 100644
--- a/pkgs/development/ocaml-modules/sosa/default.nix
+++ b/pkgs/development/ocaml-modules/sosa/default.nix
@@ -2,7 +2,7 @@
 , findlib, ocaml, ocamlbuild
 }:
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "sosa is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix b/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
deleted file mode 100644
index 6009eaecce1d3..0000000000000
--- a/pkgs/development/ocaml-modules/sqlite3EZ/default.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, twt, ocaml_sqlite3 }:
-
-assert lib.versionAtLeast (lib.getVersion ocaml) "3.12";
-
-if lib.versionAtLeast ocaml.version "4.06"
-then throw "sqlite3EZ is not available for OCaml ${ocaml.version}"
-else
-
-stdenv.mkDerivation rec {
-  pname = "ocaml-sqlite3EZ";
-  version = "0.1.0";
-
-  src = fetchFromGitHub {
-    owner = "mlin";
-    repo = "ocaml-sqlite3EZ";
-    rev = "v${version}";
-    sha256 = "sha256-pKysvth0efxJeyJQY2Dnqarg7OtsKyyLnFV/1ZhsfDY=";
-  };
-
-  nativeBuildInputs = [ ocaml findlib ocamlbuild ];
-  buildInputs = [ twt ];
-
-  propagatedBuildInputs = [ ocaml_sqlite3 ];
-
-  strictDeps = true;
-
-  createFindlibDestdir = true;
-
-  meta = with lib; {
-    homepage = "https://github.com/mlin/ocaml-sqlite3EZ";
-    description = "A thin wrapper for sqlite3-ocaml with a simplified interface";
-    license = licenses.mit;
-    maintainers = [ maintainers.vbgl ];
-    platforms = ocaml.meta.platforms or [ ];
-  };
-}
diff --git a/pkgs/development/ocaml-modules/toml/default.nix b/pkgs/development/ocaml-modules/toml/default.nix
index dd765e3882352..b79d80016d9cc 100644
--- a/pkgs/development/ocaml-modules/toml/default.nix
+++ b/pkgs/development/ocaml-modules/toml/default.nix
@@ -4,15 +4,13 @@
 
 buildDunePackage rec {
   pname = "toml";
-  version = "6.0.0";
-
-  useDune2 = true;
+  version = "7.0.0";
 
   src = fetchFromGitHub {
     owner = "ocaml-toml";
     repo = "to.ml";
     rev = version;
-    sha256 = "08ywzqckllvwawl1wpgg7qzvx6jhq7d6vysa0d5hj7qdwq213ggm";
+    sha256 = "sha256-VEZQTFPwAGShCBGbKUiNOIY1zA/JdTpXU0ZIGNWopnQ=";
   };
 
   nativeBuildInputs = [ menhir ];
diff --git a/pkgs/development/ocaml-modules/torch/default.nix b/pkgs/development/ocaml-modules/torch/default.nix
index 7a0c6bdadeff8..c4c80dacc9f2f 100644
--- a/pkgs/development/ocaml-modules/torch/default.nix
+++ b/pkgs/development/ocaml-modules/torch/default.nix
@@ -56,5 +56,6 @@ buildDunePackage rec {
     description = "Ocaml bindings to Pytorch";
     maintainers = [ maintainers.bcdarwin ];
     license = licenses.asl20;
+    broken = lib.versionAtLeast pytorch.version "1.11";
   };
 }
diff --git a/pkgs/development/ocaml-modules/tsdl/default.nix b/pkgs/development/ocaml-modules/tsdl/default.nix
index a56cccbe0717a..3a1990326df9c 100644
--- a/pkgs/development/ocaml-modules/tsdl/default.nix
+++ b/pkgs/development/ocaml-modules/tsdl/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkg-config, ocb-stubblr }:
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 then throw "tsdl is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/uri/sexp.nix b/pkgs/development/ocaml-modules/uri/sexp.nix
index 83be70c364977..ba970b1d6c51e 100644
--- a/pkgs/development/ocaml-modules/uri/sexp.nix
+++ b/pkgs/development/ocaml-modules/uri/sexp.nix
@@ -1,6 +1,6 @@
 { lib, ocaml, buildDunePackage, uri, ounit, ppx_sexp_conv, sexplib0 }:
 
-if !lib.versionAtLeast ocaml.version "4.04"
+if lib.versionOlder ocaml.version "4.04"
 then throw "uri-sexp is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/uucp/default.nix b/pkgs/development/ocaml-modules/uucp/default.nix
index 9031087f50539..42705e20d3f5b 100644
--- a/pkgs/development/ocaml-modules/uucp/default.nix
+++ b/pkgs/development/ocaml-modules/uucp/default.nix
@@ -8,7 +8,7 @@ let
   doCheck = true;
 in
 
-if !(lib.versionAtLeast ocaml.version minimumOCamlVersion)
+if lib.versionOlder ocaml.version minimumOCamlVersion
 then builtins.throw "${pname} needs at least OCaml ${minimumOCamlVersion}"
 else
 
diff --git a/pkgs/development/ocaml-modules/uunf/default.nix b/pkgs/development/ocaml-modules/uunf/default.nix
index 12031c53927cf..b61a60c2a3754 100644
--- a/pkgs/development/ocaml-modules/uunf/default.nix
+++ b/pkgs/development/ocaml-modules/uunf/default.nix
@@ -5,7 +5,7 @@ let
   version = "14.0.0";
 in
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 then throw "${pname} is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/vg/default.nix b/pkgs/development/ocaml-modules/vg/default.nix
index 9dc7a4eeeeff6..35a0e51cb09a2 100644
--- a/pkgs/development/ocaml-modules/vg/default.nix
+++ b/pkgs/development/ocaml-modules/vg/default.nix
@@ -8,14 +8,14 @@
 with lib;
 
 let
-  inherit (lib) optionals versionAtLeast;
+  inherit (lib) optionals versionOlder;
 
   pname = "vg";
   version = "0.9.4";
   webpage = "https://erratique.ch/software/${pname}";
 in
 
-if !versionAtLeast ocaml.version "4.03"
+if versionOlder ocaml.version "4.03"
 then throw "vg is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/wasm/default.nix b/pkgs/development/ocaml-modules/wasm/default.nix
index ffe8479b67e95..5d53d6db4186c 100644
--- a/pkgs/development/ocaml-modules/wasm/default.nix
+++ b/pkgs/development/ocaml-modules/wasm/default.nix
@@ -1,6 +1,6 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
 
-if !lib.versionAtLeast ocaml.version "4.03"
+if lib.versionOlder ocaml.version "4.03"
 || lib.versionOlder "4.13" ocaml.version
 then throw "wasm is not available for OCaml ${ocaml.version}"
 else
diff --git a/pkgs/development/ocaml-modules/xmlm/default.nix b/pkgs/development/ocaml-modules/xmlm/default.nix
index f7aa1fdf113ee..d989b281cadd1 100644
--- a/pkgs/development/ocaml-modules/xmlm/default.nix
+++ b/pkgs/development/ocaml-modules/xmlm/default.nix
@@ -4,7 +4,7 @@ let
   webpage = "https://erratique.ch/software/${pname}";
 in
 
-if !lib.versionAtLeast ocaml.version "4.02"
+if lib.versionOlder ocaml.version "4.02"
 then throw "xmlm is not available for OCaml ${ocaml.version}"
 else
 
diff --git a/pkgs/development/ocaml-modules/xmlplaylist/default.nix b/pkgs/development/ocaml-modules/xmlplaylist/default.nix
new file mode 100644
index 0000000000000..a30172573506e
--- /dev/null
+++ b/pkgs/development/ocaml-modules/xmlplaylist/default.nix
@@ -0,0 +1,25 @@
+{ lib, buildDunePackage, fetchFromGitHub, dune-configurator, xmlm }:
+
+buildDunePackage rec {
+  pname = "xmlplaylist";
+  version = "0.1.5";
+
+  useDune2 = true;
+
+  src = fetchFromGitHub {
+    owner = "savonet";
+    repo = "ocaml-xmlplaylist";
+    rev = "v${version}";
+    sha256 = "1x5lbwkr2ip00x8vyfbl8936yy79j138vx8a16ix7g9p2j5qsfcq";
+  };
+
+  buildInputs = [ dune-configurator ];
+  propagatedBuildInputs = [ xmlm ];
+
+  meta = with lib; {
+    homepage = "https://github.com/savonet/ocaml-xmlplaylist";
+    description = "Module to parse various RSS playlist formats";
+    license = licenses.lgpl21Only;
+    maintainers = with maintainers; [ dandellion ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/z3/default.nix b/pkgs/development/ocaml-modules/z3/default.nix
index b17f29b435315..f2ece5550d785 100644
--- a/pkgs/development/ocaml-modules/z3/default.nix
+++ b/pkgs/development/ocaml-modules/z3/default.nix
@@ -1,17 +1,12 @@
 { stdenv, lib, ocaml, findlib, zarith, z3 }:
 
-if !lib.versionAtLeast ocaml.version "4.07"
+if lib.versionOlder ocaml.version "4.07"
 then throw "z3 is not available for OCaml ${ocaml.version}"
 else
 
 let z3-with-ocaml = (z3.override {
   ocamlBindings = true;
   inherit ocaml findlib zarith;
-}).overrideAttrs (o: {
-  patches = (o.patches or []) ++ [
-    # Fix build; see: https://github.com/Z3Prover/z3/issues/5776
-    ./ocamlfind.patch
-  ];
 }); in
 
 stdenv.mkDerivation {
diff --git a/pkgs/development/ocaml-modules/z3/ocamlfind.patch b/pkgs/development/ocaml-modules/z3/ocamlfind.patch
deleted file mode 100644
index d84907cf79385..0000000000000
--- a/pkgs/development/ocaml-modules/z3/ocamlfind.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/scripts/mk_util.py b/scripts/mk_util.py
-index 042e6af46..1e105b002 100644
---- a/scripts/mk_util.py
-+++ b/scripts/mk_util.py
-@@ -1995,7 +1995,7 @@ class MLComponent(Component):
- 
-             LIBZ3 = LIBZ3 + ' ' + ' '.join(map(lambda x: '-cclib ' + x, LDFLAGS.split()))
- 
--            stubs_install_path = '$$(%s printconf path)/stublibs' % OCAMLFIND
-+            stubs_install_path = '$$(%s printconf destdir)/stublibs' % OCAMLFIND
-             if not STATIC_LIB:
-                 loadpath = '-ccopt -L' + stubs_install_path
-                 dllpath = '-dllpath ' + stubs_install_path
diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix
index 95351caee307b..70f0be8c7af89 100644
--- a/pkgs/development/ocaml-modules/zarith/default.nix
+++ b/pkgs/development/ocaml-modules/zarith/default.nix
@@ -3,7 +3,7 @@
 , gmp
 }:
 
-if !lib.versionAtLeast ocaml.version "4.04"
+if lib.versionOlder ocaml.version "4.04"
 then throw "zarith is not available for OCaml ${ocaml.version}"
 else