From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Add r-servr. Date: Mon, 21 Sep 2015 11:22:26 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdxJA-0004ik-8M for guix-devel@gnu.org; Mon, 21 Sep 2015 05:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdxJ4-0000KL-7j for guix-devel@gnu.org; Mon, 21 Sep 2015 05:22:48 -0400 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:54101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdxJ3-0000KD-Q2 for guix-devel@gnu.org; Mon, 21 Sep 2015 05:22:42 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id 4F9EC280730 for ; Mon, 21 Sep 2015 11:22:40 +0200 (CEST) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y2RuSs8H_mF0 for ; Mon, 21 Sep 2015 11:22:33 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Mon, 21 Sep 2015 11:22:33 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: "guix-devel@gnu.org" --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-Add-r-httpuv.patch" >From 604b5b4abd59a47df56ac372a7a79328131802a2 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 21 Sep 2015 11:20:32 +0200 Subject: [PATCH 1/3] gnu: Add r-httpuv. * gnu/packages/web.scm (r-httpuv): New variable. --- gnu/packages/web.scm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 3e89a72..25b12a6 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -33,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system cmake) + #:use-module (guix build-system r) #:use-module (gnu packages) #:use-module (gnu packages apr) #:use-module (gnu packages asciidoc) @@ -54,7 +55,8 @@ #:use-module (gnu packages curl) #:use-module (gnu packages perl) #:use-module (gnu packages texinfo) - #:use-module (gnu packages tls)) + #:use-module (gnu packages tls) + #:use-module (gnu packages statistics)) (define-public httpd (package @@ -2860,3 +2862,27 @@ web browsing, used for automating interaction with websites.") /robots.txt file to forbid conforming robots from accessing parts of their web site.") (home-page "http://search.cpan.org/~gaas/WWW-RobotRules/"))) + +(define-public r-httpuv + (package + (name "r-httpuv") + (version "1.3.3") + (source (origin + (method url-fetch) + (uri (cran-uri "httpuv" version)) + (sha256 + (base32 + "0aibs0hf38n8f6xxx4g2i2lzd6l5h92m5pscx2z834sdvhnladxv")))) + (build-system r-build-system) + (native-inputs `(("r-rcpp" ,r-rcpp))) + (home-page "https://github.com/rstudio/httpuv") + (synopsis "HTTP and WebSocket server library for R") + (description + "The httpuv package provides low-level socket and protocol support for +handling HTTP and WebSocket requests directly from within R. It is primarily +intended as a building block for other packages, rather than making it +particularly easy to create complete web applications using httpuv alone.") + ;; This package includes third-party code that was originally released + ;; under different licenses. Full licensing information can be obtained + ;; here: https://github.com/rstudio/httpuv/blob/master/LICENSE + (license l:gpl3+))) -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0002-gnu-Add-r-jsonlite.patch" >From 5bfe35715fec8d11b9dcb2f8187e597f44b2577a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 21 Sep 2015 11:20:55 +0200 Subject: [PATCH 2/3] gnu: Add r-jsonlite. * gnu/packages/web.scm (r-jsonlite): New variable. --- gnu/packages/web.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 25b12a6..493aa0f 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -2886,3 +2886,27 @@ particularly easy to create complete web applications using httpuv alone.") ;; under different licenses. Full licensing information can be obtained ;; here: https://github.com/rstudio/httpuv/blob/master/LICENSE (license l:gpl3+))) + +(define-public r-jsonlite + (package + (name "r-jsonlite") + (version "0.9.17") + (source (origin + (method url-fetch) + (uri (cran-uri "jsonlite" version)) + (sha256 + (base32 + "07s11m8z43dh5pyci5rpjqj5js69q8prjar42qhhxbvdmcrjk4z7")))) + (build-system r-build-system) + (home-page "http://arxiv.org/abs/1403.2805") + (synopsis "Robust, high performance JSON parser and generator for R") + (description + "The jsonlite package provides a fast JSON parser and generator optimized +for statistical data and the web. It offers flexible, robust, high +performance tools for working with JSON in R and is particularly powerful for +building pipelines and interacting with a web API. In addition to converting +JSON data from/to R objects, jsonlite contains functions to stream, validate, +and prettify JSON data. The unit tests included with the package verify that +all edge cases are encoded and decoded consistently for use with dynamic data +in systems and applications.") + (license l:expat))) -- 2.1.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0003-gnu-Add-r-servr.patch" >From 53d5e7719bc684f46b5f2315c1edf29f5eccbd29 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 21 Sep 2015 11:21:11 +0200 Subject: [PATCH 3/3] gnu: Add r-servr. * gnu/packages/web.scm (r-servr): New variable. --- gnu/packages/web.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 493aa0f..c423821 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -2910,3 +2910,28 @@ and prettify JSON data. The unit tests included with the package verify that all edge cases are encoded and decoded consistently for use with dynamic data in systems and applications.") (license l:expat))) + +(define-public r-servr + (package + (name "r-servr") + (version "0.2") + (source (origin + (method url-fetch) + (uri (cran-uri "servr" version)) + (sha256 + (base32 + "0gah99snaj8lk5zfzbxi3jwvpnlff9diz9gqv4qalfxpmb7fp6lc")))) + (build-system r-build-system) + (propagated-inputs + `(("r-httpuv" ,r-httpuv) + ("r-jsonlite" ,r-jsonlite) + ("r-mime" ,r-mime))) + (native-inputs + `(("r-rcpp" ,r-rcpp))) + (home-page "https://github.com/yihui/servr") + (synopsis "Simple HTTP server to serve static files or dynamic documents") + (description + "Servr provides an HTTP server in R to serve static files, or dynamic +documents that can be converted to HTML files (e.g., R Markdown) under a given +directory.") + (license l:expat))) -- 2.1.0 --=-=-=--