guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Add r-servr.


From: Ricardo Wurmus
Subject: [PATCH] Add r-servr.
Date: Mon, 21 Sep 2015 11:22:26 +0200

>From 604b5b4abd59a47df56ac372a7a79328131802a2 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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

>From 5bfe35715fec8d11b9dcb2f8187e597f44b2577a Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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

>From 53d5e7719bc684f46b5f2315c1edf29f5eccbd29 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]