From 8ede16564f5479675b60cd3a82a2a59edb0c2184 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 Mar 2023 06:12:11 +0100 Subject: [PATCH] ocamlPackages.bigstring: use Dune 3 & fix for OCaml 5 --- pkgs/development/ocaml-modules/bigstring/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/ocaml-modules/bigstring/default.nix b/pkgs/development/ocaml-modules/bigstring/default.nix index f966e0b90b1b2..650522363d318 100644 --- a/pkgs/development/ocaml-modules/bigstring/default.nix +++ b/pkgs/development/ocaml-modules/bigstring/default.nix @@ -1,12 +1,16 @@ -{ lib, fetchFromGitHub, buildDunePackage }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml }: buildDunePackage rec { pname = "bigstring"; version = "0.3"; - useDune2 = true; + duneVersion = "3"; + minimalOCamlVersion = "4.03"; - minimumOCamlVersion = "4.03"; + # Ensure compatibility with OCaml ≥ 5.0 + preConfigure = lib.optional (lib.versionAtLeast ocaml.version "4.08") '' + substituteInPlace src/dune --replace '(libraries bytes bigarray)' "" + ''; src = fetchFromGitHub { owner = "c-cube";