summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-06-25 15:07:37 +0200
committerJulien Lepiller <julien@lepiller.eu>2021-06-27 15:15:41 +0200
commit364b56124b88398c199aacbfd4fdfc9a1583e634 (patch)
treea88c7361b94322db21ab917d7fce97921adfa419 /gnu
parente366b94f9fd1338a94e80e83d0b060fac65ad2f4 (diff)
downloadguix-364b56124b88398c199aacbfd4fdfc9a1583e634.tar.gz
gnu: Add ocaml-cohttp.
* gnu/packages/ocaml.scm (ocaml-cohttp): New variable.

Signed-off-by: Julien Lepiller <julien@lepiller.eu>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/ocaml.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 560d8d2036..6a9151594b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7086,6 +7086,44 @@ up to OCaml 4.08.")
     (synopsis "RFC3986 URI/URL parsing library")
     (description "This package adds S-exp support to @code{ocaml-uri}.")))
 
+(define-public ocaml-cohttp
+  (package
+    (name "ocaml-cohttp")
+    (version "4.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/mirage/ocaml-cohttp")
+              (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32
+            "02d7417yy1i62by368w3wyw3756047pbrw69spcvz3cd1z7vqaci"))))
+    (build-system dune-build-system)
+    (arguments
+     '(#:package "cohttp"
+       #:test-target "cohttp_test/src"))
+    (propagated-inputs
+      `(("ocaml-re" ,ocaml-re)
+        ("ocaml-uri" ,ocaml-uri)
+        ("ocaml-uri-sexp" ,ocaml-uri-sexp)
+        ("ocaml-sexplib0" ,ocaml-sexplib0)
+        ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
+        ("ocaml-stringext" ,ocaml-stringext)
+        ("ocaml-base64" ,ocaml-base64)))
+    (native-inputs
+      `(("ocaml-fmt" ,ocaml-fmt)
+        ("ocaml-jsonm" ,ocaml-jsonm)
+        ("ocaml-alcotest" ,ocaml-alcotest)))
+    (home-page "https://github.com/mirage/ocaml-cohttp")
+    (synopsis "OCaml library for HTTP clients and servers")
+    (description
+      "Cohttp is an OCaml library for creating HTTP daemons.  It has a portable
+HTTP parser, and implementations using various asynchronous programming
+libraries.")
+    (license license:isc)))
+
 (define-public js-of-ocaml
   (package
     (name "js-of-ocaml")