aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-12-15 10:12:30 +0100
committerRicardo Wurmus <rekado@elephly.net>2023-12-15 16:13:07 +0100
commit2efa72be4616f47d84559923e6a7df3451e3672b (patch)
tree24794f9218f5364e9dcaaf45b82f81bb798006ea /gnu
parent888139880337cac798804779544128816df3617d (diff)
downloadguix-2efa72be4616f47d84559923e6a7df3451e3672b.tar
guix-2efa72be4616f47d84559923e6a7df3451e3672b.tar.gz
gnu: r-interactivedisplay: Add missing JavaScript sources.
* gnu/packages/bioconductor.scm (r-interactivedisplay)[source]: Update list of minified JavaScript files to delete. [arguments]: Use minify-build-system to process JavaScript files. [native-inputs]: Add js-d3-v2; relabel js-datatables as js-datatables-1.10; add js-datatables-1.9. Change-Id: If8b6d9378680e9f69d71be56ce28add70b1a4564
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioconductor.scm70
1 files changed, 43 insertions, 27 deletions
diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm
index 51efd6ffa3..9da5ac91c8 100644
--- a/gnu/packages/bioconductor.scm
+++ b/gnu/packages/bioconductor.scm
@@ -8288,7 +8288,6 @@ methylation data at the genome scale.")
microarray data, using nearest neighbor averaging.")
(license license:gpl2+)))
-;; TODO: check javascript
(define-public r-interactivedisplay
(package
(name "r-interactivedisplay")
@@ -8301,37 +8300,46 @@ microarray data, using nearest neighbor averaging.")
"0w81c5kc48gjavln50ysgr3vaf8s4fb6632ckzb1q225j9ik2gia"))
(snippet
'(for-each delete-file
- '("inst/www/js/jquery.js"
+ '("inst/www/js/d3.v2.js"
+ "inst/www/js/jquery.js"
"inst/www/js/jquery.min.js"
- "inst/www/js/jquery.dataTables.min.js")))))
+ "inst/www/js/jquery.dataTables.min.js"
+ "inst/www/js/jquery.dataTables.nightly.js")))))
(properties `((upstream-name . "interactiveDisplay")))
(build-system r-build-system)
(arguments
(list
- #:modules '((guix build utils)
- (guix build r-build-system)
- (srfi srfi-1))
+ #:modules
+ '((guix build r-build-system)
+ (guix build minify-build-system)
+ (guix build utils)
+ (ice-9 match))
+ #:imported-modules
+ `(,@%r-build-system-modules
+ (guix build minify-build-system))
#:phases
- '(modify-phases %standard-phases
- (add-after 'unpack 'process-javascript
- (lambda* (#:key inputs #:allow-other-keys)
- (call-with-values
- (lambda ()
- (unzip2
- `((,(assoc-ref inputs "js-jquery-1.8.2")
- "inst/www/js/jquery.js")
- (,(assoc-ref inputs "js-jquery-1.9.1")
- "inst/www/js/jquery.min.js")
- (,(search-input-file inputs
- "/share/javascript/jquery.dataTables.min.js")
- "inst/www/js/jquery.dataTables.min.js"))))
- (lambda (sources targets)
- (for-each (lambda (source target)
- (format #true "Processing ~a --> ~a~%"
- source target)
- (invoke "esbuild" source "--minify"
- (string-append "--outfile=" target)))
- sources targets))))))))
+ #~(modify-phases (@ (guix build r-build-system) %standard-phases)
+ (add-after 'unpack 'process-javascript
+ (lambda* (#:key inputs #:allow-other-keys)
+ (with-directory-excursion "inst/"
+ (for-each (match-lambda
+ ((source . target)
+ (minify source #:target target)))
+ `((,(assoc-ref inputs "js-jquery-1.8.2")
+ . "www/js/jquery.js")
+ (,(assoc-ref inputs "js-jquery-1.9.1")
+ . "www/js/jquery.min.js")
+ (,(search-input-file inputs
+ "/share/javascript/jquery.dataTables.min.js")
+ . "www/js/jquery.dataTables.min.js")
+ (,(string-append (assoc-ref inputs "js-datatables-1.9")
+ "/share/javascript/jquery.dataTables.min.js")
+ . "www/js/jquery.dataTables.min.js")
+ (,(string-append (assoc-ref inputs "js-datatables-1.10")
+ "/share/javascript/jquery.dataTables.min.js")
+ . "www/js/jquery.dataTables.nightly.js")
+ (,(assoc-ref inputs "js-d3-v2")
+ . "www/js/d3.v2.js")))))))))
(propagated-inputs
(list r-annotationdbi
r-biocgenerics
@@ -8347,7 +8355,15 @@ microarray data, using nearest neighbor averaging.")
(native-inputs
`(("esbuild" ,esbuild)
("r-knitr" ,r-knitr)
- ("js-datatables" ,js-datatables)
+ ("js-d3-v2"
+ ,(origin
+ (method url-fetch)
+ (uri "https://web.archive.org/web/20230428092426id_/https://d3js.org/d3.v2.js")
+ (sha256
+ (base32
+ "1m57mxhcynfaz6gz3v0aph5i6hx5jf455jdygyl8yzs9r2dpp5vr"))))
+ ("js-datatables-1.9" ,js-datatables-1.9)
+ ("js-datatables-1.10" ,js-datatables)
("js-jquery-1.8.2"
,(origin
(method url-fetch)