[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/21: gnu: Add r-colourpicker.
From: |
guix-commits |
Subject: |
07/21: gnu: Add r-colourpicker. |
Date: |
Wed, 13 Mar 2019 08:18:12 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit c27927dbf5f55c088a017df6fb3976e4b4419e0e
Author: Ricardo Wurmus <address@hidden>
Date: Wed Mar 13 12:39:39 2019 +0100
gnu: Add r-colourpicker.
* gnu/packages/cran.scm (r-colourpicker): New variable.
---
gnu/packages/cran.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index a204389..c44749f 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -11180,6 +11180,85 @@ functions for both the end user and the developer.
Shinyjs can also be used
to easily call your own custom JavaScript functions from R.")
(license license:agpl3+)))
+;; This package includes minified JavaScript files. When upgrading please
+;; check that there are no new minified JavaScript files.
+(define-public r-colourpicker
+ (package
+ (name "r-colourpicker")
+ (version "1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "colourpicker" version))
+ (sha256
+ (base32
+ "0z3v2083g7kwdp21x9s2n1crfh24agpdq3yxkcdzc2awn2pwpnpi"))))
+ (build-system r-build-system)
+ (arguments
+ `(#:modules ((guix build utils)
+ (guix build r-build-system)
+ (srfi srfi-1)
+ (ice-9 popen))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'process-javascript
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "inst"
+ (call-with-values
+ (lambda ()
+ (unzip2
+ `((,(assoc-ref inputs "js-salvattore")
+ "examples/colourInput/www/salvattore.min.js")
+ (,(assoc-ref inputs "js-jquery")
+ "htmlwidgets/lib/jquery/jquery.min.js")
+ ("www/shared/colourpicker/js/colourpicker.js"
+ "www/shared/colourpicker/js/colourpicker.min.js"))))
+ (lambda (sources targets)
+ (for-each (lambda (source target)
+ (format #t "Processing ~a --> ~a~%"
+ source target)
+ (delete-file target)
+ (let ((minified (open-pipe* OPEN_READ
"uglify-js" source)))
+ (call-with-output-file target
+ (lambda (port)
+ (dump-port minified port)))))
+ sources targets))))
+ #t)))))
+ (propagated-inputs
+ `(("r-ggplot2" ,r-ggplot2)
+ ("r-htmltools" ,r-htmltools)
+ ("r-htmlwidgets" ,r-htmlwidgets)
+ ("r-jsonlite" ,r-jsonlite)
+ ("r-miniui" ,r-miniui)
+ ("r-shiny" ,r-shiny)
+ ("r-shinyjs" ,r-shinyjs)))
+ (native-inputs
+ `(("uglify-js" ,uglify-js)
+ ("js-jquery"
+ ,(origin
+ (method url-fetch)
+ (uri "https://code.jquery.com/jquery-3.3.1.js")
+ (sha256
+ (base32
+ "1b8zxrp6xwzpw25apn8j4qws0f6sr7qr7h2va5h1mjyfqvn29anq"))))
+ ("js-salvattore"
+ ,(origin
+ (method url-fetch)
+ (uri
"https://raw.githubusercontent.com/rnmp/salvattore/v1.0.9/dist/salvattore.js")
+ (sha256
+ (base32
+ "0lfrbx7l9w5x89jpc6njmd0pk7h8fpvg537vklai2vf7b1r2nnk5"))))))
+ (home-page "https://github.com/daattali/colourpicker")
+ (synopsis "Color picker tool for Shiny and for selecting colors in plots")
+ (description
+ "This package provides a color picker that can be used as an input in
+Shiny apps or Rmarkdown documents. The color picker supports alpha opacity,
+custom color palettes, and many more options. A plot color helper tool is
+available as an RStudio Addin, which helps you pick colors to use in your
+plots. A more generic color picker RStudio Addin is also provided to let you
+select colors to use in your R code.")
+ (license license:expat)))
+
(define-public r-minpack-lm
(package
(name "r-minpack-lm")
- branch master updated (2b6ab17 -> 0fbaf19), guix-commits, 2019/03/13
- 06/21: gnu: Add r-shinyjs., guix-commits, 2019/03/13
- 01/21: gnu: Add r-nbpseq., guix-commits, 2019/03/13
- 02/21: gnu: Add r-ebseq., guix-commits, 2019/03/13
- 11/21: gnu: Add r-icobra., guix-commits, 2019/03/13
- 12/21: gnu: Add r-mast., guix-commits, 2019/03/13
- 05/21: gnu: Add r-shinybs., guix-commits, 2019/03/13
- 20/21: gnu: Add r-bumphunter., guix-commits, 2019/03/13
- 09/21: gnu: Add r-nor1mix., guix-commits, 2019/03/13
- 07/21: gnu: Add r-colourpicker.,
guix-commits <=
- 04/21: gnu: Add r-ihw., guix-commits, 2019/03/13
- 08/21: gnu: Add r-ggextra., guix-commits, 2019/03/13
- 10/21: gnu: Add r-beanplot., guix-commits, 2019/03/13
- 15/21: gnu: Add r-scdd., guix-commits, 2019/03/13
- 16/21: gnu: Add r-scone., guix-commits, 2019/03/13
- 18/21: gnu: Add r-illuminaio., guix-commits, 2019/03/13
- 19/21: gnu: Add r-siggenes., guix-commits, 2019/03/13
- 03/21: gnu: Add r-lpsymphony., guix-commits, 2019/03/13
- 13/21: gnu: Add r-monocle., guix-commits, 2019/03/13
- 17/21: gnu: Add r-geoquery., guix-commits, 2019/03/13