Subject: [bug#49867] [PATCH 01/31] gnu: Add ocaml-cohttp-lwt.

From: pukkamustard <[email-masked]>
Date: Mon, 9 Aug 2021 06:59:42 +0000

* gnu/packages/ocaml.scm (ocaml-cohttp-lwt): New variable.
---
 gnu/packages/ocaml.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 112751ddec..6518f21f5e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7323,6 +7323,30 @@ HTTP parser, and implementations using various asynchronous programming
 libraries.")
     (license license:isc)))
 
+(define-public ocaml-cohttp-lwt
+  (package
+    (inherit ocaml-cohttp)
+    (name "ocaml-cohttp-lwt")
+    (arguments `(#:package "cohttp-lwt"
+                 #:test-target "."))
+    (propagated-inputs
+     `(("ocaml-cohttp" ,ocaml-cohttp)
+       ("ocaml-lwt" ,ocaml-lwt)
+       ("ocaml-sexplib0" ,ocaml-sexplib0)
+       ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+       ("ocaml-logs" ,ocaml-logs)
+       ("ocaml-uri" ,ocaml-uri)))
+    (synopsis "OCaml library for HTTP clients and servers using the Lwt
+concurrency library")
+    (description "This is a portable implementation of HTTP that uses the Lwt
+concurrency library to multiplex IO.  It implements as much of the logic in an
+OS-independent way as possible, so that more specialised modules can be
+tailored for different targets.  For example, you can install
+@code{ocaml-cohttp-lwt-unix} or @code{ocaml-cohttp-lwt-jsoo} for a Unix or
+JavaScript backend, or @code{ocaml-cohttp-mirage} for the MirageOS unikernel
+version of the library.  All of these implementations share the same IO logic
+from this module.")))
+
 (define-public js-of-ocaml
   (package
     (name "js-of-ocaml")
-- 
2.32.0