From ff910956e9ff28596537c604453c12c4bef5fd44 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 6 Oct 2023 07:17:26 +0200 Subject: [PATCH 1/3] =?UTF-8?q?ocamlPackages.kafka=5Flwt:=20disable=20for?= =?UTF-8?q?=20OCaml=20=E2=89=A5=205.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/kafka/default.nix | 2 -- pkgs/development/ocaml-modules/kafka/lwt.nix | 7 ++++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/kafka/default.nix b/pkgs/development/ocaml-modules/kafka/default.nix index 7636942033a9..28c380a4616d 100644 --- a/pkgs/development/ocaml-modules/kafka/default.nix +++ b/pkgs/development/ocaml-modules/kafka/default.nix @@ -5,8 +5,6 @@ buildDunePackage rec { pname = "kafka"; version = "0.5"; - useDune2 = true; - src = fetchurl { url = "https://github.com/didier-wenzek/ocaml-kafka/releases/download/${version}/kafka-${version}.tbz"; sha256 = "0m9212yap0a00hd0f61i4y4fna3141p77qj3mm7jl1h4q60jdhvy"; diff --git a/pkgs/development/ocaml-modules/kafka/lwt.nix b/pkgs/development/ocaml-modules/kafka/lwt.nix index a6cef66b2761..da931d6e8bff 100644 --- a/pkgs/development/ocaml-modules/kafka/lwt.nix +++ b/pkgs/development/ocaml-modules/kafka/lwt.nix @@ -1,13 +1,18 @@ { buildDunePackage +, ocaml +, lib , kafka , lwt , cmdliner }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "kafka_lwt is not available for OCaml ${ocaml.version}" + buildDunePackage rec { pname = "kafka_lwt"; - inherit (kafka) version useDune2 src; + inherit (kafka) version src; buildInputs = [ cmdliner ]; From bbb8c88974f7d0eab87840826d75b4d8da3c3528 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 6 Oct 2023 07:17:32 +0200 Subject: [PATCH 2/3] ocamlPackages.containers-data: disable tests with OCaml 5.0 --- pkgs/development/ocaml-modules/containers/data.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/containers/data.nix b/pkgs/development/ocaml-modules/containers/data.nix index 470ed354f25e..98b6ec750640 100644 --- a/pkgs/development/ocaml-modules/containers/data.nix +++ b/pkgs/development/ocaml-modules/containers/data.nix @@ -1,4 +1,5 @@ { buildDunePackage, containers +, ocaml , dune-configurator , gen, iter, qcheck-core , mdx @@ -7,7 +8,9 @@ buildDunePackage { pname = "containers-data"; - inherit (containers) src version doCheck; + inherit (containers) src version; + + doCheck = containers.doCheck && ocaml.meta.branch != "5.0"; buildInputs = [ dune-configurator ]; nativeCheckInputs = [ mdx.bin ]; From fa23afc15e0267cc2875c51a3de4c0408e7367fc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 6 Oct 2023 07:17:37 +0200 Subject: [PATCH 3/3] =?UTF-8?q?ocamlPackages.lwt:=205.6.1=20=E2=86=92=205.?= =?UTF-8?q?7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/lwt/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 4033336ae119..167df30ae353 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -4,7 +4,7 @@ buildDunePackage rec { pname = "lwt"; - version = "5.6.1"; + version = "5.7.0"; minimalOCamlVersion = "4.08"; @@ -12,16 +12,9 @@ buildDunePackage rec { owner = "ocsigen"; repo = "lwt"; rev = version; - sha256 = "sha256-XstKs0tMwliCyXnP0Vzi5WC27HKJGnATUYtbbQmH1TE="; + hash = "sha256-o0wPK6dPdnsr/LzwcSwbIGcL85wkDjdFuEcAxuS/UEs="; }; - postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") '' - substituteInPlace src/core/dune \ - --replace "(libraries bytes)" "" - substituteInPlace src/unix/dune \ - --replace "libraries bigarray lwt" "libraries lwt" - ''; - nativeBuildInputs = [ cppo ]; buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ libev ocplib-endian ];