Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, qcheck, num, camlp-streams
2, doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64
3}:
4
5if lib.versionOlder ocaml.version "4.02"
6then throw "batteries is not available for OCaml ${ocaml.version}"
7else
8
9stdenv.mkDerivation rec {
10 pname = "ocaml${ocaml.version}-batteries";
11 version = "3.6.0";
12
13 src = fetchFromGitHub {
14 owner = "ocaml-batteries-team";
15 repo = "batteries-included";
16 rev = "v${version}";
17 hash = "sha256-D/0h0/70V8jmzHIUR6i2sT2Jz9/+tfR2dQgp4Bxtimc=";
18 };
19
20 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
21 nativeCheckInputs = [ qtest ];
22 checkInputs = [ qcheck ];
23 propagatedBuildInputs = [ camlp-streams num ];
24
25 strictDeps = true;
26
27 inherit doCheck;
28 checkTarget = "test";
29
30 createFindlibDestdir = true;
31
32 meta = {
33 homepage = "https://ocaml-batteries-team.github.io/batteries-included/hdoc2/";
34 description = "OCaml Batteries Included";
35 longDescription = ''
36 A community-driven effort to standardize on an consistent, documented,
37 and comprehensive development platform for the OCaml programming
38 language.
39 '';
40 license = lib.licenses.lgpl21Plus;
41 inherit (ocaml.meta) platforms;
42 maintainers = [
43 lib.maintainers.maggesi
44 ];
45 };
46}