diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index 707c855b4944..6e30c7f50d09 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -3,20 +3,19 @@ fetchFromGitHub, buildDunePackage, ocaml, + fetchpatch, ounit, qtest, qcheck, num, camlp-streams, - doCheck ? lib.versionAtLeast ocaml.version "4.08", + doCheck ? true, }: buildDunePackage (finalAttrs: { pname = "batteries"; version = "3.10.0"; - minimalOCamlVersion = "4.05"; - src = fetchFromGitHub { owner = "ocaml-batteries-team"; repo = "batteries-included"; @@ -24,6 +23,11 @@ buildDunePackage (finalAttrs: { hash = "sha256-cD0O4kEDE58yCYnUuS83O1CJNHJuCGVhvKJSKQeQGkc="; }; + patches = lib.optional (lib.versionAtLeast ocaml.version "5.5") (fetchpatch { + url = "https://github.com/ocaml-batteries-team/batteries-included/commit/f6e091266599aea93c8a94115cf08f50e88c5dd0.patch"; + hash = "sha256-6CUcq24x4fnumduK4BJ5cVQ5DHPbVLyLUxl57q2JVtw="; + }); + nativeCheckInputs = [ qtest ]; checkInputs = [ ounit