diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2021-06-24 10:25:54 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2021-06-24 13:50:33 +0200 |
commit | 16abea6ff14d375c2264b4cac28305ea63e336c3 (patch) | |
tree | fde8cf2a330c2c70b9229a2e651ca1807e81cc76 /gnu/packages/cran.scm | |
parent | 27302fd88002f2c6453faccf912745cbc06f44fe (diff) |
gnu: Add r-gganimate.
* gnu/packages/cran.scm (r-gganimate): New variable.
Diffstat (limited to 'gnu/packages/cran.scm')
-rw-r--r-- | gnu/packages/cran.scm | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index f8c2258c34..f888bbcfab 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -103,6 +103,7 @@ #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages version-control) + #:use-module (gnu packages video) #:use-module (gnu packages web) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) @@ -29402,3 +29403,51 @@ complex functions.") (description "The Gaussian hypergeometric function for complex numbers.") (license license:gpl2))) + +(define-public r-gganimate + (package + (name "r-gganimate") + (version "1.0.7") + (source + (origin + (method url-fetch) + (uri (cran-uri "gganimate" version)) + (sha256 + (base32 + "046v6j92xxgaghsnh88dy5h8x040qsfa8csvhp4dmsfmrrf0dz0f")))) + (properties `((upstream-name . "gganimate"))) + (build-system r-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'absolute-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "R/renderers.R" + (("'ffmpeg'") + (string-append "'" (assoc-ref inputs "ffmpeg") "/bin/ffmpeg'")))))))) + (inputs + ;; For video output. + `(("ffmpeg" ,ffmpeg))) + (propagated-inputs + `(("r-ggplot2" ,r-ggplot2) + ("r-glue" ,r-glue) + ("r-plyr" ,r-plyr) + ("r-progress" ,r-progress) + ("r-rlang" ,r-rlang) + ("r-scales" ,r-scales) + ("r-stringi" ,r-stringi) + ("r-tweenr" ,r-tweenr) + ;; For GIF/SVG output. gifski is faster, but depends on Rust. + ("r-magick" ,r-magick) + ;; For HTML output. + ("r-base64enc" ,r-base64enc) + ("r-htmltools" ,r-htmltools))) + (native-inputs `(("r-knitr" ,r-knitr))) + (home-page "https://gganimate.com") + (synopsis "Grammar of Animated Graphics") + (description + "This package extends the grammar of graphics as implemented by +@code{ggplot2} to include the description of animation. It does this by +providing a range of new grammar classes that can be added to the plot object +in order to customise how it should change with time.") + (license license:expat))) |