From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:43946) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVJXJ-0004Aa-Az for guix-patches@gnu.org; Thu, 14 Nov 2019 13:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVJXH-0001xo-V6 for guix-patches@gnu.org; Thu, 14 Nov 2019 13:08:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54623) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iVJXH-0001xe-RD for guix-patches@gnu.org; Thu, 14 Nov 2019 13:08:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iVJXH-00076w-KV for guix-patches@gnu.org; Thu, 14 Nov 2019 13:08:03 -0500 Subject: [bug#38211] [PATCH 3/9] gnu: Add restinio. References: <20191114180422.5592-1-mail@ambrevar.xyz> In-Reply-To: <20191114180422.5592-1-mail@ambrevar.xyz> Resent-Message-ID: From: Pierre Neidhardt Date: Thu, 14 Nov 2019 19:07:02 +0100 Message-Id: <20191114180708.6942-1-mail@ambrevar.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38211@debbugs.gnu.org * gnu/packages/networking.scm (restinio): New variable. --- gnu/packages/networking.scm | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 87cabee645..53822c427e 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -33,6 +33,7 @@ ;;; Copyright © 2019 Brice Waegeneire ;;; Copyright © 2019 Tonton ;;; Copyright © 2019 Alex Griffin +;;; Copyright © 2019 Jan Wielkiewicz ;;; ;;; 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") -- 2.23.0