From 685b423e45a7fa6500d53681e279ad9964977717 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:44:46 +0300 Subject: [PATCH] ocamlPackages.lwt: fix for OCaml >= 5 --- pkgs/development/ocaml-modules/lwt/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/ocaml-modules/lwt/default.nix b/pkgs/development/ocaml-modules/lwt/default.nix index 8004cfcd4bb..cf631fd08e4 100644 --- a/pkgs/development/ocaml-modules/lwt/default.nix +++ b/pkgs/development/ocaml-modules/lwt/default.nix @@ -1,5 +1,5 @@ { lib, fetchFromGitHub, libev, buildDunePackage -, cppo, dune-configurator, ocplib-endian +, ocaml, cppo, dune-configurator, ocplib-endian }: buildDunePackage rec { @@ -15,6 +15,11 @@ buildDunePackage rec { sha256 = "sha256-XstKs0tMwliCyXnP0Vzi5WC27HKJGnATUYtbbQmH1TE="; }; + postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "5.0") '' + substituteInPlace src/unix/dune \ + --replace "libraries bigarray lwt" "libraries lwt" + ''; + nativeBuildInputs = [ cppo ]; buildInputs = [ dune-configurator ]; propagatedBuildInputs = [ libev ocplib-endian ];