From d8c71fd91f93e95dc61f36095620f3ec83362ab0 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 2 Sep 2020 11:54:00 +0300 Subject: gnu: js-filesaver: Also install unminified version. * gnu/packages/javascript.scm (js-filesaver)[arguments]: Add phase to install unminified javascript file. --- gnu/packages/javascript.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gnu/packages/javascript.scm') diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index d5ff5bffee..fbc7388f3d 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -393,6 +393,12 @@ means that these shams cause many ES5 methods to silently fail.") (lambda _ (substitute* "src/FileSaver.js" (("export ") "")) + #t)) + (add-after 'install 'install-unminified-version + (lambda* (#:key outputs #:allow-other-keys) + (install-file "src/FileSaver.js" + (string-append (assoc-ref outputs "out") + "/share/javascript")) #t))))) (home-page "https://eligrey.com/blog/saving-generated-files-on-the-client-side/") -- cgit v1.3 From 4a2cb3fa0e6384d7ad9f4cc7ca1fb46f63ebdb41 Mon Sep 17 00:00:00 2001 From: Ryan Prior Date: Mon, 14 Sep 2020 01:13:31 +0000 Subject: gnu: Add quickjs. * gnu/packages/javascript.scm (quickjs): New variable. Signed-off-by: Mathieu Othacehe --- gnu/packages/javascript.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gnu/packages/javascript.scm') diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index fbc7388f3d..0e61cf10ff 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -447,3 +447,34 @@ to use, and is very similar to Lua. There is no need to interact with byzantine C++ template mechanisms, or worry about marking and unmarking garbage collection roots, or wrestle with obscure build systems.") (license license:isc))) + +(define-public quickjs + (package + (name "quickjs") + (version "2020-09-06") + (source (origin + (method url-fetch) + (uri (string-append "https://bellard.org/quickjs/quickjs-" + version ".tar.xz")) + (sha256 + (base32 + "05vpnnzmws7plnwsnk2brwf7whyj84l5xl0iahi1xdn6rpla6880")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list "prefix=" + (string-append "DESTDIR=" %output)) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'check + (lambda _ + (invoke "make" "microbench")))))) + (home-page "https://bellard.org/quickjs/") + (synopsis "Small embeddable Javascript engine") + (description "QuickJS supports the ES2020 specification including modules, +asynchronous generators, proxies, BigInt and BigDecimal. It can compile +Javascript sources to executables with no external dependency. It includes a +command line interpreter with contextual colorization implemented in +Javascript and a small built-in standard library with C library wrappers.") + (license license:expat))) -- cgit v1.3