aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/javascript.scm
diff options
context:
space:
mode:
authorPjotr Prins2024-04-04 11:14:18 -0500
committerPjotr Prins2024-04-04 11:14:18 -0500
commit914ae94d48bd8a7619102263eb654a764877dbc6 (patch)
tree798e9511c5b511a88b2ee5070fe99dba0eae2cd3 /gn/packages/javascript.scm
parent1a6522f3a5a7d0990e50fe5dd91f286f62e083e7 (diff)
downloadguix-bioinformatics-914ae94d48bd8a7619102263eb654a764877dbc6.tar.gz
Add recent javascript-d3 library
Diffstat (limited to 'gn/packages/javascript.scm')
-rw-r--r--gn/packages/javascript.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm
index f92ada9..d8c9af9 100644
--- a/gn/packages/javascript.scm
+++ b/gn/packages/javascript.scm
@@ -894,6 +894,46 @@ visualization components and a data-driven approach to DOM manipulation.")
(install-file "d3.min.js" targetdir)
(install-file "LICENSE" (string-append out "/share/doc/d3js-" ,version))))))))
+(define-public javascript-d3js-7
+ (package
+ (name "javascript-d3js-7")
+ (version "7.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ ;; note that D3 no longer provides a prebuilt JS file - except through CDS
+ (uri (string-append "https://files.genenetwork.org/software/d3.v" version ".min.js.gz"))
+ (sha256
+ (base32 "0k7g40zb65s12z1zchvimj5xibkrqff5sylbrhcwmwpcplpigid7"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((out (assoc-ref %outputs "out"))
+ (module-name "d3js-7")
+ (gzip (string-append (assoc-ref %build-inputs "gzip")
+ "/bin/gzip"))
+ (targetdir (string-append out "/share/genenetwork2/javascript/" module-name))
+ (jsname (string-append "d3.v" "7.9.0" ".min.js"))
+ (gzname (string-append jsname ".gz"))
+ (source (assoc-ref %build-inputs "source")))
+ (mkdir-p targetdir)
+ (copy-file (pk source) (pk (string-append targetdir "/" gzname)))
+ (invoke gzip "-fd" (string-append targetdir "/" gzname))))))
+ (native-inputs
+ `(("source" ,source)
+ ("gzip" ,gzip)))
+ (home-page "https://d3js.org/")
+ (synopsis "JavaScript library for visualizing data")
+ (description "D3.js is a JavaScript library for manipulating documents based
+on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3's
+emphasis on web standards gives you the full capabilities of modern browsers
+without tying yourself to a proprietary framework, combining powerful
+visualization components and a data-driven approach to DOM manipulation.")
+ (license license:bsd-3)))
+
(define-public javascript-d3js-multi
(package
(name "javascript-d3js-multi")