summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/containers/default.nix
blob: b12b6e8c265796b1aa8c99dc615cc5b8d237d149 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib, fetchFromGitHub, buildDunePackage, ocaml
, iter, result, uchar
, gen, mdx, ounit, qcheck, uutf
}:

buildDunePackage rec {
  version = "2.7";
  pname = "containers";

  src = fetchFromGitHub {
    owner = "c-cube";
    repo = "ocaml-containers";
    rev = "v${version}";
    sha256 = "1nsxfgn1g1vpqihb9gd6gsab0bcm70nf9z84cp441c8wsc57hi6a";
  };

  buildInputs = [ iter ];

  checkInputs = lib.optionals doCheck [ gen mdx.bin ounit qcheck uutf ];

  propagatedBuildInputs = [ result uchar ];

  doCheck = true;

  meta = {
    homepage = https://github.com/c-cube/ocaml-containers;
    description = "A modular standard library focused on data structures";
    longDescription = ''
      Containers is a standard library (BSD license) focused on data structures,
      combinators and iterators, without dependencies on unix. Every module is
      independent and is prefixed with 'CC' in the global namespace. Some modules
      extend the stdlib (e.g. CCList provides safe map/fold_right/append, and
      additional functions on lists).

      It also features optional libraries for dealing with strings, and
      helpers for unix and threads.
    '';
    license = lib.licenses.bsd2;
  };
}