diff options
author | sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> | 2021-04-25 16:46:11 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-04-26 08:31:53 +0200 |
commit | f4c229058da13060c3a1f6fdf67d238cbe4882a7 (patch) | |
tree | 0ae4e7eac418cf0c97752dafb8ec0b101cf67dc4 | |
parent | 4d538804081498a807b9a0e22ae11c54a0251eba (diff) | |
download | nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.tar nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.tar.gz nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.tar.bz2 nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.tar.lz nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.tar.xz nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.tar.zst nixlib-f4c229058da13060c3a1f6fdf67d238cbe4882a7.zip |
ocamlPackages.h2: init at 0.8.0
-rw-r--r-- | pkgs/development/ocaml-modules/h2/default.nix | 59 | ||||
-rw-r--r-- | pkgs/top-level/ocaml-packages.nix | 2 |
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/h2/default.nix b/pkgs/development/ocaml-modules/h2/default.nix new file mode 100644 index 000000000000..dd96e0ecc441 --- /dev/null +++ b/pkgs/development/ocaml-modules/h2/default.nix @@ -0,0 +1,59 @@ +{ 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 + useDune2 + ; + + minimumOCamlVersion = "4.06"; + + propagatedBuildInputs = [ + angstrom + faraday + base64 + psq + hpack + httpaf + ]; + + # Tests fail with 4.06 + doCheck = lib.versionAtLeast ocaml.version "4.07"; + preCheck = '' + ln -s "${http2-frame-test-case}" lib_test/http2-frame-test-case + ''; + checkInputs = [ + alcotest + yojson + hex + ]; + + meta = hpack.meta // { + description = "A high-performance, memory-efficient, and scalable HTTP/2 library for OCaml"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 30ebf6680bb9..56d992a92637 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -401,6 +401,8 @@ let inherit (pkgs) gsl; }; + h2 = callPackage ../development/ocaml-modules/h2 { }; + hacl_x25519 = callPackage ../development/ocaml-modules/hacl_x25519 { }; herelib = callPackage ../development/ocaml-modules/herelib { }; |