diff --git a/pkgs/development/ocaml-modules/conduit/lwt-unix.nix b/pkgs/development/ocaml-modules/conduit/lwt-unix.nix index deba1080bb19..1f7dfd7ce616 100644 --- a/pkgs/development/ocaml-modules/conduit/lwt-unix.nix +++ b/pkgs/development/ocaml-modules/conduit/lwt-unix.nix @@ -1,4 +1,5 @@ { + lib, buildDunePackage, conduit-lwt, ppx_sexp_conv, @@ -30,7 +31,7 @@ buildDunePackage { lwt_ssl ]; - doCheck = true; + doCheck = !lib.versionAtLeast lwt.version "6.0.0"; checkInputs = [ lwt_log ssl diff --git a/pkgs/development/ocaml-modules/lambda-term/default.nix b/pkgs/development/ocaml-modules/lambda-term/default.nix index 04bcf1aee022..0b4a63746990 100644 --- a/pkgs/development/ocaml-modules/lambda-term/default.nix +++ b/pkgs/development/ocaml-modules/lambda-term/default.nix @@ -3,7 +3,6 @@ fetchFromGitHub, buildDunePackage, zed, - lwt_log, lwt_react, mew_vi, uucp, @@ -23,7 +22,6 @@ buildDunePackage (finalAttrs: { propagatedBuildInputs = [ zed - lwt_log lwt_react mew_vi uucp diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index b30ce1352313..754cbb3c5bff 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -7,15 +7,13 @@ dune-configurator, ocplib-endian, ppxlib, - version ? if lib.versionAtLeast ppxlib.version "0.36" then "5.9.2" else "5.9.1", + version ? if lib.versionAtLeast ppxlib.version "0.36" then "6.1.1" else "5.9.1", }: buildDunePackage { pname = "lwt"; inherit version; - minimalOCamlVersion = "4.08"; - src = fetchFromGitHub { owner = "ocsigen"; repo = "lwt"; @@ -24,6 +22,7 @@ buildDunePackage { { "5.9.1" = "sha256-oPYLFugMTI3a+hmnwgUcoMgn5l88NP1Roq0agLhH/vI="; "5.9.2" = "sha256-pzowRN1wwaF2iMfMPE7RCtA2XjlaXC3xD0yznriVfu8="; + "6.1.1" = "sha256-EMlA+mh66bfVNqDcmuaW7GoEEu6xQhCRjZx7t7pHuGo="; } ."${version}"; }; diff --git a/pkgs/development/ocaml-modules/lwt_eio/default.nix b/pkgs/development/ocaml-modules/lwt_eio/default.nix index 2fa9aed6cca1..c84d716c507f 100644 --- a/pkgs/development/ocaml-modules/lwt_eio/default.nix +++ b/pkgs/development/ocaml-modules/lwt_eio/default.nix @@ -2,6 +2,7 @@ lib, buildDunePackage, fetchurl, + fetchpatch, eio, lwt, }: @@ -16,6 +17,11 @@ buildDunePackage rec { hash = "sha256-dlJnhHh4VNO60NZJZqc1HS8wPR95WhdeBJTK37pPbCE="; }; + patches = lib.optional (lib.versionAtLeast lwt.version "6.0.0") (fetchpatch { + url = "https://github.com/ocaml-multicore/lwt_eio/commit/5f8bf1e7af33590683ee45151894d7b9a20607f0.patch"; + hash = "sha256-5A3Bh+xOXo79Rw145hYqYv42li30M0TKLW+qu/dC0KQ="; + }); + propagatedBuildInputs = [ eio lwt diff --git a/pkgs/development/ocaml-modules/lwt_log/default.nix b/pkgs/development/ocaml-modules/lwt_log/default.nix index 4bcd3524e849..1e1a5ba2377a 100644 --- a/pkgs/development/ocaml-modules/lwt_log/default.nix +++ b/pkgs/development/ocaml-modules/lwt_log/default.nix @@ -5,17 +5,15 @@ lwt, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "lwt_log"; version = "1.1.2"; - minimalOCamlVersion = "4.03"; - src = fetchFromGitHub { owner = "aantron"; - repo = pname; - rev = version; - sha256 = "sha256-ODTD3KceEnrEzD01CeuNg4BNKOtKZEpYaDIB+RIte1U="; + repo = "lwt_log"; + tag = finalAttrs.version; + hash = "sha256-ODTD3KceEnrEzD01CeuNg4BNKOtKZEpYaDIB+RIte1U="; }; propagatedBuildInputs = [ lwt ]; @@ -25,5 +23,6 @@ buildDunePackage rec { homepage = "https://github.com/aantron/lwt_log"; license = lib.licenses.lgpl21; maintainers = [ lib.maintainers.vbgl ]; + broken = lib.versionAtLeast lwt.version "6.0.0"; }; -} +}) diff --git a/pkgs/development/ocaml-modules/ocsigen-server/default.nix b/pkgs/development/ocaml-modules/ocsigen-server/default.nix index 170f0e3fa873..1d53de47f70e 100644 --- a/pkgs/development/ocaml-modules/ocsigen-server/default.nix +++ b/pkgs/development/ocaml-modules/ocsigen-server/default.nix @@ -20,7 +20,6 @@ ca-certs, cohttp, cohttp-lwt-unix, - lwt_log, re, logs-syslog, cryptokit, @@ -78,7 +77,6 @@ buildDunePackage (finalAttrs: { cohttp-lwt-unix cryptokit ipaddr - lwt_log lwt_ssl re logs-syslog diff --git a/pkgs/development/ocaml-modules/ocsipersist/lib.nix b/pkgs/development/ocaml-modules/ocsipersist/lib.nix index d88841190bc8..339e1c11d0f6 100644 --- a/pkgs/development/ocaml-modules/ocsipersist/lib.nix +++ b/pkgs/development/ocaml-modules/ocsipersist/lib.nix @@ -1,20 +1,37 @@ { lib, buildDunePackage, + applyPatches, + fetchpatch, fetchFromGitHub, lwt_ppx, lwt, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "ocsipersist-lib"; version = "2.0.0"; - src = fetchFromGitHub { - owner = "ocsigen"; - repo = "ocsipersist"; - tag = version; - hash = "sha256-7CKKwJxqxUpCMNs4xGbsMZ6Qud9AnczBStTXS+N21DU="; + src = applyPatches { + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "ocsipersist"; + tag = finalAttrs.version; + hash = "sha256-7CKKwJxqxUpCMNs4xGbsMZ6Qud9AnczBStTXS+N21DU="; + }; + + patches = [ + # Migrate to logs + (fetchpatch { + url = "https://github.com/ocsigen/ocsipersist/commit/1fc0088b4dc2226f01863dd25f8ed56528c5543d.patch"; + hash = "sha256-WR7SW8jAAo47AIQ7UMQNF8FTXgj6FbxIqFjrLhu7wFs="; + excludes = [ + "*.opam" + "dune-project" + ]; + }) + ]; }; buildInputs = [ lwt_ppx ]; @@ -26,4 +43,4 @@ buildDunePackage rec { maintainers = [ lib.maintainers.vbgl ]; homepage = "https://github.com/ocsigen/ocsipersist/"; }; -} +}) diff --git a/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix b/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix index 3d7c001c306f..ae37d0a2ce0b 100644 --- a/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix +++ b/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix @@ -1,7 +1,7 @@ { buildDunePackage, ocsipersist, - lwt_log, + logs, pgocaml, xml-light, }: @@ -11,7 +11,7 @@ buildDunePackage { inherit (ocsipersist) version src; propagatedBuildInputs = [ - lwt_log + logs ocsipersist pgocaml ]; diff --git a/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix b/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix index 429f56f46ef2..aed27a3d03b7 100644 --- a/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix +++ b/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix @@ -1,7 +1,7 @@ { buildDunePackage, ocsipersist, - lwt_log, + logs, ocaml_sqlite3, ocsigen_server, }: @@ -11,7 +11,7 @@ buildDunePackage { inherit (ocsipersist) version src; propagatedBuildInputs = [ - lwt_log + logs ocaml_sqlite3 ocsipersist ]; diff --git a/pkgs/development/ocaml-modules/tezt/default.nix b/pkgs/development/ocaml-modules/tezt/default.nix index 665373b769c0..c77951e6f250 100644 --- a/pkgs/development/ocaml-modules/tezt/default.nix +++ b/pkgs/development/ocaml-modules/tezt/default.nix @@ -31,5 +31,6 @@ buildDunePackage rec { meta = { description = "Test framework for unit tests, integration tests, and regression tests"; license = lib.licenses.mit; + broken = lib.versionAtLeast lwt.version "6.0.0"; }; } diff --git a/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix b/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix index c05039ce967e..f5a8a60a6861 100644 --- a/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix +++ b/pkgs/development/tools/ocaml/js_of_ocaml/lwt.nix @@ -1,9 +1,11 @@ { + lib, buildDunePackage, js_of_ocaml-ppx, js_of_ocaml, lwt, lwt_log, + loggerSupport ? !lib.versionAtLeast lwt.version "6.0.0", }: buildDunePackage { @@ -16,6 +18,6 @@ buildDunePackage { propagatedBuildInputs = [ js_of_ocaml lwt - lwt_log - ]; + ] + ++ lib.optional loggerSupport lwt_log; }