aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/javascript.scm
diff options
context:
space:
mode:
authorBonfaceKilz2020-06-04 20:13:14 +0300
committerBonfaceKilz2020-06-04 20:13:14 +0300
commit043a3655bcb9d14d2f2580e506674e7682682034 (patch)
tree5dbc4659b5dc35ebd4c72f00096627d81153c5c0 /gn/packages/javascript.scm
parent697fdd4b85f4b6d2e709667ea2fc47b39b16969b (diff)
downloadguix-bioinformatics-043a3655bcb9d14d2f2580e506674e7682682034.tar.gz
gn(javascript): use d3.js from a cdn
Diffstat (limited to 'gn/packages/javascript.scm')
-rw-r--r--gn/packages/javascript.scm22
1 files changed, 19 insertions, 3 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm
index 76ed9e5..be2c993 100644
--- a/gn/packages/javascript.scm
+++ b/gn/packages/javascript.scm
@@ -1431,6 +1431,19 @@ experience.")
(arguments `(#:javascript-files '("src/md5.js")))
(build-system minify-build-system)))
+(define d3-tip-js
+ (let ((version "0.9.1"))
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://cdnjs.cloudflare.com/ajax/libs/d3-tip/"
+ version
+ "/d3-tip.js"))
+ (file-name "d3-tip.js")
+ (sha256
+ (base32
+ "1y6vq5vs46k806cj1d6nr8z220ndl9bsycd01d8xfmhkwn3rn0x2")))))
+
(define-public javascript-d3-tip
(package
(name "javascript-d3-tip")
@@ -1453,12 +1466,15 @@ experience.")
(use-modules (guix build utils))
(let* ((out (assoc-ref %outputs "out"))
(targetdir (string-append out "/share/genenetwork2/javascript/d3-tip"))
- (source (assoc-ref %build-inputs "source")))
+ (source (assoc-ref %build-inputs "source"))
+ (distfile (assoc-ref %build-inputs "distfile")))
(mkdir-p targetdir)
- (copy-file (string-append source "/index.js") (string-append targetdir "/d3-tip.js"))
+ (copy-file distfile (string-append targetdir "/d3-tip.js"))
(copy-file (string-append source "/examples/example-styles.css")
(string-append targetdir "/d3-tip.css"))))))
- (native-inputs `(("source" ,source)))
+ (native-inputs `(("source" ,source)
+ ("distfile" ,d3-tip-js)
+ ))
(home-page "http://labratrevenge.com/d3-tip")
(synopsis "Tooltips for d3.js visualizations")
(description