about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/h2/default.nix
blob: 12aebd57774d99e3a5b7e1cd762027d77a7ba14a (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
41
42
43
44
45
46
47
48
49
50
51
52
53
{ buildDunePackage
, fetchFromGitHub
, hpack
, angstrom
, faraday
, base64
, psq
, httpun-types
, alcotest
, yojson
, hex
}:

let
  http2-frame-test-case = fetchFromGitHub {
    owner = "http2jp";
    repo = "http2-frame-test-case";
    rev = "5c67db0d4d68e1fb7d3a241d6e01fc04d981f465";
    sha256 = "16yyb37f8mk9saw7ndjs5is67yq7qa6b6y7k0c75ibxi4n9aw1r3";
  };
in

buildDunePackage rec {
  pname = "h2";

  inherit (hpack)
    version
    src
    ;

  propagatedBuildInputs = [
    angstrom
    faraday
    base64
    psq
    hpack
    httpun-types
  ];

  doCheck = true;
  preCheck = ''
    ln -s "${http2-frame-test-case}" lib_test/http2-frame-test-case
  '';
  checkInputs = [
    alcotest
    yojson
    hex
  ];

  meta = hpack.meta // {
    description = "High-performance, memory-efficient, and scalable HTTP/2 library for OCaml";
  };
}