1{
2 lib,
3 fetchFromGitHub,
4 buildDunePackage,
5 ocaml,
6 dune-configurator,
7 either,
8 seq,
9 gen,
10 iter,
11 qcheck-core,
12 uutf,
13 yojson,
14}:
15
16buildDunePackage rec {
17 version = "3.16";
18 pname = "containers";
19
20 minimalOCamlVersion = "4.08";
21
22 src = fetchFromGitHub {
23 owner = "c-cube";
24 repo = "ocaml-containers";
25 rev = "v${version}";
26 hash = "sha256-WaHAZRLjaEJUba/I2r3Yof/iUqA3PFUuVbzm88izG1k=";
27 };
28
29 buildInputs = [ dune-configurator ];
30 propagatedBuildInputs = [
31 either
32 seq
33 ];
34
35 checkInputs = [
36 gen
37 iter
38 qcheck-core
39 uutf
40 yojson
41 ];
42
43 doCheck = lib.versionAtLeast ocaml.version "4.08";
44
45 meta = {
46 homepage = "https://github.com/c-cube/ocaml-containers";
47 description = "Modular standard library focused on data structures";
48 longDescription = ''
49 Containers is a standard library (BSD license) focused on data structures,
50 combinators and iterators, without dependencies on unix. Every module is
51 independent and is prefixed with 'CC' in the global namespace. Some modules
52 extend the stdlib (e.g. CCList provides safe map/fold_right/append, and
53 additional functions on lists).
54
55 It also features optional libraries for dealing with strings, and
56 helpers for unix and threads.
57 '';
58 license = lib.licenses.bsd2;
59 };
60}