1{
2 lib,
3 fetchFromGitHub,
4 nix-update-script,
5 buildDunePackage,
6 base,
7 ppx_sexp_conv,
8}:
9
10buildDunePackage rec {
11 pname = "tdigest";
12 version = "2.2.0";
13
14 src = fetchFromGitHub {
15 owner = "SGrondin";
16 repo = pname;
17 rev = version;
18 sha256 = "sha256-Z2rOaiNGvVDbRwf5XfoNIcenQdrE3fxHnfzyi6Ki2Ic=";
19 };
20
21 minimalOCamlVersion = "4.14";
22
23 # base v0.17 compatibility
24 patches = [ ./tdigest.patch ];
25
26 propagatedBuildInputs = [
27 base
28 ppx_sexp_conv
29 ];
30
31 passthru.updateScript = nix-update-script { };
32
33 meta = with lib; {
34 homepage = "https://github.com/SGrondin/${pname}";
35 description = "OCaml implementation of the T-Digest algorithm";
36 license = licenses.mit;
37 maintainers = with maintainers; [ niols ];
38 };
39}