summaryrefslogtreecommitdiff
path: root/gnu/packages/cran.scm
diff options
context:
space:
mode:
authorHong.Li@mdc-berlin.de <Hong.Li@mdc-berlin.de>2021-11-29 23:53:55 +0000
committerRicardo Wurmus <rekado@elephly.net>2021-11-30 16:46:18 +0100
commit5bdf1b655117f4d7b8071ed08366157b0f655122 (patch)
tree89f2777bc7ec4e58cfd1220cad16b5fe0f72adb6 /gnu/packages/cran.scm
parent21bf500ee95d985c99ab28bbf2a83c30c75763b2 (diff)
downloadguix-patches-5bdf1b655117f4d7b8071ed08366157b0f655122.tar
guix-patches-5bdf1b655117f4d7b8071ed08366157b0f655122.tar.gz
gnu: Add r-rbokeh.
* gnu/packages/cran.scm (r-rbokeh): New variable. Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
Diffstat (limited to 'gnu/packages/cran.scm')
-rw-r--r--gnu/packages/cran.scm71
1 files changed, 71 insertions, 0 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index c10e3f9ecb..504da4e3da 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -32073,6 +32073,77 @@ code for a gist, list gist commits, and get rate limit information when
authenticated.")
(license license:expat)))
+(define-public r-rbokeh
+ (package
+ (name "r-rbokeh")
+ (version "0.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "rbokeh" version))
+ (sha256
+ (base32
+ "1h2fpzqf17pw9d09r1g1iyxsj5qma4fsk8vnar7f1z4fjyypvi6q"))
+ (snippet
+ '(for-each delete-file '("inst/htmlwidgets/lib/bokehjs/bokeh-widgets.min.js"
+ "inst/htmlwidgets/lib/bokehjs/bokeh.min.js")))))
+ (properties `((upstream-name . "rbokeh")))
+ (build-system r-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'process-javascript
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "inst/htmlwidgets/lib/bokehjs"
+ (let ((mapping
+ `((,(assoc-ref inputs "js-bokeh-widgets")
+ . "bokeh-widgets.min.js")
+ (,(assoc-ref inputs "js-bokeh")
+ . "bokeh.min.js"))))
+ (for-each (lambda (source target)
+ (format #true "Processing ~a --> ~a~%"
+ source target)
+ (invoke "esbuild" source "--minify"
+ (string-append "--outfile=" target)))
+ (map car mapping)
+ (map cdr mapping)))))))))
+ (propagated-inputs
+ `(("r-digest" ,r-digest)
+ ("r-gistr" ,r-gistr)
+ ("r-hexbin" ,r-hexbin)
+ ("r-htmlwidgets" ,r-htmlwidgets)
+ ("r-jsonlite" ,r-jsonlite)
+ ("r-lazyeval" ,r-lazyeval)
+ ("r-magrittr" ,r-magrittr)
+ ("r-maps" ,r-maps)
+ ("r-pryr" ,r-pryr)
+ ("r-scales" ,r-scales)))
+ ;; Version 0.12.15 is mentioned in lib/htmlwidgets/rbokeh.yaml.
+ (native-inputs
+ `(("esbuild" ,esbuild)
+ ("js-bokeh-widgets"
+ ,(origin
+ (method url-fetch)
+ (uri "https://unpkg.com/bokehjs@0.12.15/build/js/bokeh-widgets.js")
+ (sha256
+ (base32
+ "07v9lrkfcbdznpb10qqwi4m660zp65g85vlnfw7kn83zmkxkhhxy"))))
+ ("js-bokeh"
+ ,(origin
+ (method url-fetch)
+ (uri "https://unpkg.com/bokehjs@0.12.15/build/js/bokeh.js")
+ (sha256
+ (base32
+ "1pq0059aad7d2jv50nv9449p3w0gbkxkl0mhblc76m5d9qjqav2q"))))
+ ("r-knitr" ,r-knitr)))
+ (home-page "https://cran.r-project.org/web/packages/rbokeh/")
+ (synopsis "R interface for the Bokeh visualization library")
+ (description
+ "This package provides a native R plotting library that provides a
+flexible declarative interface for creating interactive web-based graphics,
+backed by the @url{https://bokeh.pydata.org/, Bokeh visualization library}.")
+ (license license:expat)))
+
(define-public r-fauxpas
(package
(name "r-fauxpas")