1{
2 lib,
3 fetchurl,
4 buildDunePackage,
5 repr,
6 ppx_repr,
7 fmt,
8 logs,
9 mtime,
10 stdlib-shims,
11 cmdliner,
12 progress,
13 semaphore-compat,
14 optint,
15 alcotest,
16 crowbar,
17 re,
18 lru,
19}:
20
21buildDunePackage rec {
22 pname = "index";
23 version = "1.6.2";
24
25 src = fetchurl {
26 url = "https://github.com/mirage/index/releases/download/${version}/index-${version}.tbz";
27 hash = "sha256-k4iDUJik7UTuztBw7YaFXASd8SqYMR1JgLm3JOyriGA=";
28 };
29
30 # Compatibility with logs 0.8.0
31 postPatch = ''
32 substituteInPlace test/unix/dune --replace-warn logs.fmt 'logs.fmt logs.threaded'
33 '';
34
35 minimalOCamlVersion = "4.08";
36
37 buildInputs = [
38 stdlib-shims
39 ];
40 propagatedBuildInputs = [
41 cmdliner
42 fmt
43 logs
44 mtime
45 ppx_repr
46 progress
47 repr
48 semaphore-compat
49 optint
50 lru
51 ];
52
53 checkInputs = [
54 alcotest
55 crowbar
56 re
57 ];
58 doCheck = true;
59
60 meta = with lib; {
61 description = "Platform-agnostic multi-level index";
62 homepage = "https://github.com/mirage/index";
63 license = licenses.mit;
64 maintainers = with maintainers; [ vbgl ];
65 };
66}