diff --git a/pkgs/development/ocaml-modules/httpcats/default.nix b/pkgs/development/ocaml-modules/httpcats/default.nix new file mode 100644 index 000000000000..64b81403b8ce --- /dev/null +++ b/pkgs/development/ocaml-modules/httpcats/default.nix @@ -0,0 +1,57 @@ +{ + fetchFromGitHub, + buildDunePackage, + lib, + logs, + miou, + fmt, + h2, + h1, + ca-certs, + bstr, + tls-miou-unix, + dns-client-miou-unix, + happy-eyeballs-miou-unix, + mirage-crypto-rng-miou-unix, + alcotest, + digestif, +}: + +buildDunePackage (finalAttrs: { + pname = "httpcats"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "robur-coop"; + repo = "httpcats"; + tag = "v${finalAttrs.version}"; + hash = "sha256-t3gSfv73XYntle1dd4k9bv893pGStk1NHz62mAvcHAs="; + }; + + propagatedBuildInputs = [ + h2 + h1 + ca-certs + bstr + tls-miou-unix + dns-client-miou-unix + happy-eyeballs-miou-unix + ]; + + doCheck = true; + checkInputs = [ + logs + fmt + mirage-crypto-rng-miou-unix + alcotest + digestif + ]; + + meta = { + inherit (finalAttrs.src.meta) homepage; + description = "A simple HTTP client / server using h1, h2, and miou"; + changelog = "https://github.com/robur-coop/httpcats/blob/${finalAttrs.src.tag}/CHANGES.md"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ rpqt ]; + }; +}) diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 7d636a8f1652..a73509d8cd22 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -825,6 +825,8 @@ let httpaf-lwt-unix = callPackage ../development/ocaml-modules/httpaf/lwt-unix.nix { }; + httpcats = callPackage ../development/ocaml-modules/httpcats { }; + httpun = callPackage ../development/ocaml-modules/httpun { }; httpun-eio = callPackage ../development/ocaml-modules/httpun/eio.nix { };