Archived
1
0
Fork 0

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
This commit is contained in:
Ricardo Wurmus 2023-12-15 10:12:30 +01:00
parent 8881398803
commit 2efa72be46
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -8288,7 +8288,6 @@ methylation data at the genome scale.")
microarray data, using nearest neighbor averaging.") microarray data, using nearest neighbor averaging.")
(license license:gpl2+))) (license license:gpl2+)))
;; TODO: check javascript
(define-public r-interactivedisplay (define-public r-interactivedisplay
(package (package
(name "r-interactivedisplay") (name "r-interactivedisplay")
@ -8301,37 +8300,46 @@ microarray data, using nearest neighbor averaging.")
"0w81c5kc48gjavln50ysgr3vaf8s4fb6632ckzb1q225j9ik2gia")) "0w81c5kc48gjavln50ysgr3vaf8s4fb6632ckzb1q225j9ik2gia"))
(snippet (snippet
'(for-each delete-file '(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.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"))) (properties `((upstream-name . "interactiveDisplay")))
(build-system r-build-system) (build-system r-build-system)
(arguments (arguments
(list (list
#:modules '((guix build utils) #:modules
(guix build r-build-system) '((guix build r-build-system)
(srfi srfi-1)) (guix build minify-build-system)
(guix build utils)
(ice-9 match))
#:imported-modules
`(,@%r-build-system-modules
(guix build minify-build-system))
#:phases #:phases
'(modify-phases %standard-phases #~(modify-phases (@ (guix build r-build-system) %standard-phases)
(add-after 'unpack 'process-javascript (add-after 'unpack 'process-javascript
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(call-with-values (with-directory-excursion "inst/"
(lambda () (for-each (match-lambda
(unzip2 ((source . target)
(minify source #:target target)))
`((,(assoc-ref inputs "js-jquery-1.8.2") `((,(assoc-ref inputs "js-jquery-1.8.2")
"inst/www/js/jquery.js") . "www/js/jquery.js")
(,(assoc-ref inputs "js-jquery-1.9.1") (,(assoc-ref inputs "js-jquery-1.9.1")
"inst/www/js/jquery.min.js") . "www/js/jquery.min.js")
(,(search-input-file inputs (,(search-input-file inputs
"/share/javascript/jquery.dataTables.min.js") "/share/javascript/jquery.dataTables.min.js")
"inst/www/js/jquery.dataTables.min.js")))) . "www/js/jquery.dataTables.min.js")
(lambda (sources targets) (,(string-append (assoc-ref inputs "js-datatables-1.9")
(for-each (lambda (source target) "/share/javascript/jquery.dataTables.min.js")
(format #true "Processing ~a --> ~a~%" . "www/js/jquery.dataTables.min.js")
source target) (,(string-append (assoc-ref inputs "js-datatables-1.10")
(invoke "esbuild" source "--minify" "/share/javascript/jquery.dataTables.min.js")
(string-append "--outfile=" target))) . "www/js/jquery.dataTables.nightly.js")
sources targets)))))))) (,(assoc-ref inputs "js-d3-v2")
. "www/js/d3.v2.js")))))))))
(propagated-inputs (propagated-inputs
(list r-annotationdbi (list r-annotationdbi
r-biocgenerics r-biocgenerics
@ -8347,7 +8355,15 @@ microarray data, using nearest neighbor averaging.")
(native-inputs (native-inputs
`(("esbuild" ,esbuild) `(("esbuild" ,esbuild)
("r-knitr" ,r-knitr) ("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" ("js-jquery-1.8.2"
,(origin ,(origin
(method url-fetch) (method url-fetch)