aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorEfraim Flashner2019-07-22 07:39:59 -0500
committerEfraim Flashner2019-07-22 07:41:42 -0500
commit6c708ab87fbb58ffd904b1b02087e38a6f39933a (patch)
tree9c9a0224b3b43d85499f3a9e27f3c7f0c33f463e /gn/packages
parenta41820f03ec635a91ebdaed5a6b8e38380d80801 (diff)
downloadguix-bioinformatics-6c708ab87fbb58ffd904b1b02087e38a6f39933a.tar.gz
gn: Add javascript-filesaver.
* gn/packages/javascript.scm (javascript-filesaver): New variable.
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/javascript.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm
index 8cd206f..465259a 100644
--- a/gn/packages/javascript.scm
+++ b/gn/packages/javascript.scm
@@ -507,3 +507,35 @@ simultaneously with more concise syntax.")
@code{canvas.toBlob()} and @code{canvas.toBlobHD()} methods in browsers that do
not natively support it.")
(license license:expat))))
+
+(define-public javascript-filesaver
+ (package
+ (name "javascript-filesaver")
+ (version "2.0.2") ; May 14, 2019
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eligrey/FileSaver.js")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ij3vmv8n2ia9kbyih3g479rj68xrsiq7l9s29vv1bdmmk41lpf3"))))
+ (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/filesaver"))
+ (source (assoc-ref %build-inputs "source"))
+ (dist (string-append source "/dist")))
+ (copy-recursively dist targetdir)))))
+ (native-inputs `(("source" ,source)))
+ (home-page "https://github.com/eligrey/FileSaver.js")
+ (synopsis "HTML5 saveAs() FileSaver implementation")
+ (description "FileSaver.js is the solution to saving files on the
+client-side, and is perfect for web apps that generates files on the client.")
+ (license license:expat)))