[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/122: gnu: Add r-profvis.
From: |
guix-commits |
Subject: |
02/122: gnu: Add r-profvis. |
Date: |
Wed, 10 Aug 2022 07:51:42 -0400 (EDT) |
rekado pushed a commit to branch wip-r
in repository guix.
commit caca92827be87a1832fadd0a5afdd7dd57ea1b31
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 wip-r created (now 7730b7b587), guix-commits, 2022/08/10
- 01/122: gnu: Add r-interp., guix-commits, 2022/08/10
- 06/122: gnu: r-s2: Update to 1.1.0., guix-commits, 2022/08/10
- 03/122: gnu: Add r-urlchecker., guix-commits, 2022/08/10
- 02/122: gnu: Add r-profvis.,
guix-commits <=
- 15/122: gnu: r-htmltools: Update to 0.5.3., guix-commits, 2022/08/10
- 11/122: gnu: r-fontawesome: Update to 0.3.0., guix-commits, 2022/08/10
- 10/122: gnu: r-v8: Update to 4.2.1., guix-commits, 2022/08/10
- 16/122: gnu: r-htmltable: Update to 2.4.1., guix-commits, 2022/08/10
- 19/122: gnu: r-mbess: Update to 4.9.1., guix-commits, 2022/08/10
- 17/122: gnu: r-rstpm2: Update to 1.5.7., guix-commits, 2022/08/10
- 22/122: gnu: r-dendextend: Update to 1.16.0., guix-commits, 2022/08/10
- 24/122: gnu: r-timedate: Update to 4021.104., guix-commits, 2022/08/10
- 26/122: gnu: r-geometry: Update to 0.4.6.1., guix-commits, 2022/08/10
- 27/122: gnu: r-generics: Update to 0.1.3., guix-commits, 2022/08/10