2022-03-30 09:31:56 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, qcheck, num, ounit
|
2021-09-28 08:13:01 +00:00
|
|
|
, doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
if lib.versionOlder ocaml.version "4.02"
|
2021-12-24 04:21:11 +00:00
|
|
|
then throw "batteries is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ocaml${ocaml.version}-batteries";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "3.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-24 04:21:11 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ocaml-batteries-team";
|
|
|
|
repo = "batteries-included";
|
|
|
|
rev = "v${version}";
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "sha256-lLlpsg1v7mYFJ61rTdLV2v8/McK1R4HDTTuyka48aBw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
2022-03-30 09:31:56 +00:00
|
|
|
checkInputs = [ qtest ounit qcheck ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ num ];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = !doCheck;
|
|
|
|
|
2021-09-28 08:13:01 +00:00
|
|
|
inherit doCheck;
|
2020-09-25 04:45:31 +00:00
|
|
|
checkTarget = "test";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://batteries.forge.ocamlcore.org/";
|
|
|
|
description = "OCaml Batteries Included";
|
|
|
|
longDescription = ''
|
|
|
|
A community-driven effort to standardize on an consistent, documented,
|
|
|
|
and comprehensive development platform for the OCaml programming
|
|
|
|
language.
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
2021-12-24 04:21:11 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [
|
2021-01-15 22:18:51 +00:00
|
|
|
lib.maintainers.maggesi
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|