From d2c0f03037085ad7cd22dcaf6dadab9b914be52a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 12 Feb 2018 15:12:36 +0100 Subject: [PATCH] gnu: Add r-shinydashboard. * gnu/packages/web.scm (r-shinydashboard): New variable. Co-authored-by: Raoul Jean Pierre Bonnal --- gnu/packages/web.scm | 45 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 1497b38021..e40d5b6ba2 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -3,7 +3,8 @@ ;;; Copyright © 2013 Aljosha Papsch ;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2014, 2015, 2016 Mark H Weaver -;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus +;;; Copyright © 2018 Raoul Jean Pierre Bonnal ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015, 2016, 2017 Eric Bavier ;;; Copyright © 2015 Eric Dvorsak @@ -85,6 +86,7 @@ #:use-module (gnu packages imagemagick) #:use-module (gnu packages libidn) #:use-module (gnu packages libunistring) + #:use-module (gnu packages lisp) #:use-module (gnu packages lua) #:use-module (gnu packages markup) #:use-module (gnu packages ncurses) @@ -5418,6 +5420,47 @@ extensive prebuilt widgets make it possible to build beautiful, responsive, and powerful applications with minimal effort.") (license l:artistic2.0))) +(define-public r-shinydashboard + (package + (name "r-shinydashboard") + (version "0.6.1") + (source (origin + (method url-fetch) + (uri (cran-uri "shinydashboard" version)) + (sha256 + (base32 + "14zi7g5wrngy6lwi9xpvaid7727m6rfdijbb89al9likfhjqzqqy")))) + (build-system r-build-system) + ;; The directory inst/AdminLTE/ contains a minified JavaScript file. + ;; Regenerate it from the included sources. + (arguments + `(#:modules ((guix build utils) + (guix build r-build-system) + (ice-9 popen)) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'generate-minified-javascript + (lambda _ + (with-directory-excursion "inst/AdminLTE" + (delete-file "app.min.js") + (let ((minified (open-pipe* OPEN_READ "uglify-js" "app.js"))) + (call-with-output-file "app.min.js" + (lambda (port) + (dump-port minified port)))))))))) + (propagated-inputs + `(("r-htmltools" ,r-htmltools) + ("r-shiny" ,r-shiny))) + (native-inputs + `(("uglify-js" ,uglify-js))) + (home-page "http://rstudio.github.io/shinydashboard/") + (synopsis "Create dashboards with shiny") + (description "This package provides an extension to the Shiny web +application framework for R, making it easy to create attractive dashboards.") + ;; This package includes software that was released under the Expat + ;; license, but the whole package is released under GPL version 2 or + ;; later. + (license l:gpl2+))) + (define-public r-crosstalk (package (name "r-crosstalk")