1 { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, qcheck, num, ounit
2 , doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64
5 if lib.versionOlder ocaml.version "4.02"
6 then throw "batteries is not available for OCaml ${ocaml.version}"
9 stdenv.mkDerivation rec {
10 pname = "ocaml${ocaml.version}-batteries";
13 src = fetchFromGitHub {
14 owner = "ocaml-batteries-team";
15 repo = "batteries-included";
17 sha256 = "sha256-lLlpsg1v7mYFJ61rTdLV2v8/McK1R4HDTTuyka48aBw=";
20 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
21 checkInputs = [ qtest ounit qcheck ];
22 propagatedBuildInputs = [ num ];
24 strictDeps = !doCheck;
29 createFindlibDestdir = true;
32 homepage = "http://batteries.forge.ocamlcore.org/";
33 description = "OCaml Batteries Included";
35 A community-driven effort to standardize on an consistent, documented,
36 and comprehensive development platform for the OCaml programming
39 license = lib.licenses.lgpl21Plus;
40 inherit (ocaml.meta) platforms;
42 lib.maintainers.maggesi