2022-12-17 10:02:37 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, qcheck, num, camlp-streams
|
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-12-17 10:02:37 +00:00
|
|
|
version = "3.6.0";
|
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-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-D/0h0/70V8jmzHIUR6i2sT2Jz9/+tfR2dQgp4Bxtimc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ qtest ];
|
|
|
|
checkInputs = [ qcheck ];
|
2022-12-17 10:02:37 +00:00
|
|
|
propagatedBuildInputs = [ camlp-streams num ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
strictDeps = true;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
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 = {
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://ocaml-batteries-team.github.io/batteries-included/hdoc2/";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|