aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2019-11-14 18:23:00 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2019-12-01 13:37:16 +0100
commit13d79b64719a6dc76129b62a98d62eb86a422d20 (patch)
treeb00d363ac57beb8fbd40141bd08794e2feb3423f
parent27bcdfcd65c0333abd2cd7cb412053b78eaaa70c (diff)
downloadpatches-13d79b64719a6dc76129b62a98d62eb86a422d20.tar
patches-13d79b64719a6dc76129b62a98d62eb86a422d20.tar.gz
gnu: Add restinio.
* gnu/packages/networking.scm (restinio): New variable.
-rw-r--r--gnu/packages/networking.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 3ab5e71828..96fbefbddd 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2019 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2019 Tonton <tonton@riseup.net>
;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
+;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -72,6 +73,7 @@
#:use-module (gnu packages check)
#:use-module (gnu packages code)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages crypto)
#:use-module (gnu packages curl)
#:use-module (gnu packages dejagnu)
@@ -95,6 +97,7 @@
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages pretty-print)
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -2520,6 +2523,54 @@ communication over HTTP.")
(home-page "https://github.com/Corvusoft/restbed")
(license license:agpl3+))))
+(define fmt-restinio
+ (package
+ (inherit fmt)
+ (arguments
+ '(#:configure-flags '("-DCMAKE_CXX_FLAGS=-fPIC")))))
+
+(define-public restinio
+ (package
+ (name "restinio")
+ (version "0.6.0.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Stiffstream/restinio.git")
+ (commit (string-append "v." version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c25kpx652nng8m1sqf5an2c3c4g3k6zj85mkkaxzk88iwfzq1s8"))))
+ (build-system cmake-build-system)
+ (inputs ; TODO: Need to force-keep references on some inputs, e.g. boost.
+ `(("zlib" ,zlib)
+ ("catch2" ,catch-framework2)
+ ("openssl" ,openssl)
+ ("boost" ,boost)
+ ("pcre" ,pcre)
+ ("pcre2" ,pcre2)
+ ("sobjectizer" ,sobjectizer)))
+ (propagated-inputs
+ `(("asio", asio)
+ ("fmt" ,fmt-restinio)
+ ("http-parser", http-parser)))
+ (arguments
+ `(#:configure-flags '("-DRESTINIO_INSTALL=on")
+ #:tests? #f ; TODO: The tests are called from the root CMakelist, need RESTINIO_TEST=on.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'change-directory
+ (lambda _
+ (chdir "dev/restinio")
+ #t)))))
+ (home-page "https://stiffstream.com/en/products/restinio.html")
+ (synopsis "C++14 library that gives you an embedded HTTP/Websocket server")
+ (description "RESTinio is a header-only C++14 library that gives you an embedded
+HTTP/Websocket server. It is based on standalone version of ASIO
+and targeted primarily for asynchronous processing of HTTP-requests.")
+ (license license:bsd-3)))
+
(define-public opendht
(package
(name "opendht")