1{
2 lib,
3 buildDunePackage,
4 fetchurl,
5}:
6buildDunePackage rec {
7 pname = "ancient";
8 version = "0.10.0";
9
10 minimalOCamlVersion = "4.12";
11
12 src = fetchurl {
13 url = "https://github.com/OCamlPro/ocaml-ancient/releases/download/${version}/ancient-${version}.tbz";
14 hash = "sha256-XeVUPrdg7QSV7V0Tz8Mkj5jvzKtYD9DON+tt9kkuCHM=";
15 };
16
17 doCheck = true;
18
19 meta = {
20 description = "Use data structures larger than available memory";
21 longDescription = ''
22 This module allows you to use in-memory data structures which are
23 larger than available memory and so are kept in swap. If you try this
24 in normal OCaml code, you'll find that the machine quickly descends
25 into thrashing as the garbage collector repeatedly iterates over
26 swapped memory structures. This module lets you break that
27 limitation. Of course the module doesn't work by magic :-) If your
28 program tries to access these large structures, they still need to be
29 swapped back in, but it is suitable for large, sparsely accessed
30 structures.
31
32 Secondly, this module allows you to share those structures between
33 processes. In this mode, the structures are backed by a disk file,
34 and any process that has read/write access that disk file can map that
35 file in and see the structures.
36 '';
37 homepage = "https://github.com/OCamlPro/ocaml-ancient";
38 changelog = "https://raw.githubusercontent.com/OCamlPro/ocaml-ancient/refs/tags/${version}/CHANGES.md";
39 license = lib.licenses.lgpl21Plus;
40 maintainers = with lib.maintainers; [ momeemt ];
41 };
42}