aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorEfraim Flashner2019-09-23 03:12:59 -0500
committerEfraim Flashner2019-09-23 03:12:59 -0500
commit340a0c58497109205b39d7ec8e5f0802678d6ca7 (patch)
tree5c946d6eaff53668ab83ea9b940274b6b1a3cffc /gn/packages
parent5c265404c86664323229b641b0faa71c1b6b9b9c (diff)
downloadguix-bioinformatics-340a0c58497109205b39d7ec8e5f0802678d6ca7.tar.gz
gn: Add javascript-chroma, js-chroma.
* gn/packages/javascript.scm (javascript-chroma, js-chroma): New variables.
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/javascript.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm
index 4997a32..c79d307 100644
--- a/gn/packages/javascript.scm
+++ b/gn/packages/javascript.scm
@@ -705,3 +705,46 @@ timestamps in your document intelligently. (e.g \"3 hours ago\").")
(arguments
`(#:javascript-files '("distribute/nouislider.js")))
(build-system minify-build-system)))
+
+(define-public javascript-chroma
+ (package
+ (name "javascript-chroma")
+ (version "1.1.1") ; Aug. 15, 2015
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gka/chroma.js")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "184bd2cddd9b5ynj2ygr5p7xkrrxnmnjyq5ljyw6g4aqqk4pb0mr"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let* ((out (assoc-ref %outputs "out"))
+ (targetdir (string-append out "/share/genenetwork2/javascript/chroma"))
+ (source (assoc-ref %build-inputs "source")))
+ (install-file (string-append source "/chroma.js") targetdir)
+ (install-file (string-append source "/chroma.min.js") targetdir)))))
+ (native-inputs `(("source" ,source)))
+ (home-page "https://vis4.net/chromajs/")
+ (synopsis "Javascript library for color conversions")
+ (description
+ "chroma.js is a small-ish zero-dependency JavaScript library for all kinds
+of color conversions and color scales. chroma.js can also help you generate
+nice colors using various methods, for instance to be used in color palette for
+maps or data visualization.")
+ (license (list license:bsd-3 license:asl2.0))))
+
+(define-public js-chroma
+ (package
+ (inherit javascript-chroma)
+ (name "js-chroma")
+ (arguments
+ `(#:javascript-files '("chroma.js")))
+ (build-system minify-build-system)))