2021-04-26 19:14:03 +00:00
|
|
|
{ buildDunePackage
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ocaml
|
|
|
|
, hpack
|
|
|
|
, angstrom
|
|
|
|
, faraday
|
|
|
|
, base64
|
|
|
|
, psq
|
|
|
|
, httpaf
|
|
|
|
, 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
|
|
|
|
;
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
duneVersion = "3";
|
2022-09-22 12:36:57 +00:00
|
|
|
minimalOCamlVersion = "4.06";
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
angstrom
|
|
|
|
faraday
|
|
|
|
base64
|
|
|
|
psq
|
|
|
|
hpack
|
|
|
|
httpaf
|
|
|
|
];
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
# Tests fail with ≤ 4.07
|
2022-09-09 14:08:57 +00:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2021-04-26 19:14:03 +00:00
|
|
|
preCheck = ''
|
|
|
|
ln -s "${http2-frame-test-case}" lib_test/http2-frame-test-case
|
|
|
|
'';
|
2023-02-09 11:40:11 +00:00
|
|
|
checkInputs = [
|
2021-04-26 19:14:03 +00:00
|
|
|
alcotest
|
|
|
|
yojson
|
|
|
|
hex
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = hpack.meta // {
|
|
|
|
description = "A high-performance, memory-efficient, and scalable HTTP/2 library for OCaml";
|
|
|
|
};
|
|
|
|
}
|