gnu: r-shinydashboard: Update to 0.7.2.

* gnu/packages/cran.scm (r-shinydashboard): Update to 0.7.2.
[native-inputs]: Remove node-uglify-js; add esbuild.
[arguments]: Remove modules; use esbuild in build phase
'generate-minified-javascript.
This commit is contained in:
Ricardo Wurmus 2021-11-01 17:52:15 +00:00
parent bce8638f06
commit d4c9449f12
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC

View File

@ -2262,36 +2262,35 @@ supports interactive trees, to enable rich, editable trees in Shiny.")
(define-public r-shinydashboard (define-public r-shinydashboard
(package (package
(name "r-shinydashboard") (name "r-shinydashboard")
(version "0.7.1") (version "0.7.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (cran-uri "shinydashboard" version)) (uri (cran-uri "shinydashboard" version))
(sha256 (sha256
(base32 (base32
"0khac8b27q3swdw07kl609hm0fjfjsjv591b388q99mqqr2rk92i")))) "0hrqkwlpb8rnmp5j74p134g4c4cl16icmwc2ip6k1634fa2y8vm5"))))
(build-system r-build-system) (build-system r-build-system)
;; The directory inst/AdminLTE/ contains a minified JavaScript file. ;; The directory inst/AdminLTE/ contains a minified JavaScript file.
;; Regenerate it from the included sources. ;; Regenerate it from the included sources.
(arguments (arguments
`(#:modules ((guix build utils) `(#:phases
(guix build r-build-system)
(ice-9 popen))
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'generate-minified-javascript (add-after 'unpack 'generate-minified-javascript
(lambda _ (lambda _
(with-directory-excursion "inst/AdminLTE" (with-directory-excursion "inst/AdminLTE"
(delete-file "app.min.js") (let ((target "app.min.js")
(let ((minified (open-pipe* OPEN_READ "uglifyjs" "app.js"))) (source "app.js"))
(call-with-output-file "app.min.js" (format #t "Processing ~a --> ~a~%"
(lambda (port) source target)
(dump-port minified port)))))))))) (delete-file target)
(invoke "esbuild" source "--minify"
(string-append "--outfile=" target)))))))))
(propagated-inputs (propagated-inputs
`(("r-htmltools" ,r-htmltools) `(("r-htmltools" ,r-htmltools)
("r-promises" ,r-promises) ("r-promises" ,r-promises)
("r-shiny" ,r-shiny))) ("r-shiny" ,r-shiny)))
(native-inputs (native-inputs
`(("uglifyjs" ,node-uglify-js))) `(("esbuild" ,esbuild)))
(home-page "https://rstudio.github.io/shinydashboard/") (home-page "https://rstudio.github.io/shinydashboard/")
(synopsis "Create dashboards with shiny") (synopsis "Create dashboards with shiny")
(description "This package provides an extension to the Shiny web (description "This package provides an extension to the Shiny web