[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/124: gnu: Add r-profvis.
From: |
guix-commits |
Subject: |
02/124: gnu: Add r-profvis. |
Date: |
Wed, 10 Aug 2022 09:51:07 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 563aabf3ccd52a149fa767f6afba4a0b4ba476f2
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Tue Aug 9 23:35:09 2022 +0200
gnu: Add r-profvis.
* gnu/packages/cran.scm (r-profvis): New variable.
---
gnu/packages/cran.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index 605b722975..aef91cb60f 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -15931,6 +15931,71 @@ putative directions).")
library.")
(license license:artistic2.0)))
+(define-public r-profvis
+ (package
+ (name "r-profvis")
+ (version "0.3.7")
+ (source (origin
+ (method url-fetch)
+ (uri (cran-uri "profvis" version))
+ (sha256
+ (base32
+ "1f86m426pcf90l29hf4hkirzf8f38dihk52bxbdq2gvrrdili5s3"))
+ (modules '((guix build utils)))
+ (snippet
+ '(with-directory-excursion "inst/htmlwidgets/lib"
+ (for-each delete-file
+ (list "highlight/highlight.js" ;from rmarkdown
+ "jquery/jquery.min.js" ;version 1.12.4
+ "d3/d3.min.js")))))) ;version 3.5.6
+ (properties `((upstream-name . "profvis")))
+ (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/"
+ (copy-file
+ (search-input-file
+ inputs
"/site-library/rmarkdown/rmd/h/highlightjs/highlight.js")
+ "highlight/highlight.js")
+ (let ((mapping
+ `((,(assoc-ref inputs "js-jquery")
+ . "jquery/jquery.min.js")
+ (,(assoc-ref inputs "js-d3")
+ . "d3/d3.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)))))))))
+ (native-inputs
+ `(("esbuild" ,esbuild)
+ ("r-rmarkdown" ,r-rmarkdown)
+ ("js-d3"
+ ,(origin
+ (method url-fetch)
+ (uri "https://raw.githubusercontent.com/d3/d3/v3.5.6/d3.js")
+ (sha256
+ (base32
+ "17qlbwn7vgx335gciq6zp2ib6zg1r9lfa6p1bd9g0ds0xbcsbvgd"))))
+ ("js-jquery"
+ ,(origin
+ (method url-fetch)
+ (uri "https://code.jquery.com/jquery-1.12.4.js")
+ (sha256
+ (base32
+ "0x9mrc1668icvhpwzvgafm8xm11x9lfai9nwr66aw6pjnpwkc3s3"))))))
+ (propagated-inputs (list r-htmlwidgets r-stringr))
+ (home-page "https://rstudio.github.io/profvis/")
+ (synopsis "Interactive visualizations for profiling R code")
+ (description "This package provides interactive visualizations for
+profiling R code.")
+ (license license:gpl3)))
+
(define-public r-protviz
(package
(name "r-protviz")
- branch master updated (d9a0ccf13f -> 26bdefd172), guix-commits, 2022/08/10
- 02/124: gnu: Add r-profvis.,
guix-commits <=
- 13/124: gnu: r-tidyverse: Update to 1.3.2., guix-commits, 2022/08/10
- 09/124: gnu: r-datawizard: Update to 0.5.0., guix-commits, 2022/08/10
- 06/124: gnu: r-s2: Update to 1.1.0., guix-commits, 2022/08/10
- 07/124: gnu: r-bslib: Update to 0.4.0., guix-commits, 2022/08/10
- 05/124: gnu: r-rtweet: Update to 1.0.2., guix-commits, 2022/08/10
- 01/124: gnu: Add r-interp., guix-commits, 2022/08/10
- 10/124: gnu: r-v8: Update to 4.2.1., guix-commits, 2022/08/10
- 12/124: gnu: r-ggside: Update to 0.2.1., guix-commits, 2022/08/10
- 20/124: gnu: r-pls: Update to 2.8-1., guix-commits, 2022/08/10
- 40/124: gnu: r-snowfall: Update to 1.84-6.2., guix-commits, 2022/08/10