diff options
author | Ben Woodcroft <donttrustben@gmail.com> | 2018-02-05 11:47:54 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-08-05 17:15:44 +0100 |
commit | a12a65617ecf68d1705c3ac6883ff9774b2e9d4e (patch) | |
tree | a8e1b8fb63f94f63a101daedb0f7305604996f35 | |
parent | 1290647d33abff7669e09bdc7e5ded2c81d4a661 (diff) | |
download | guix-a12a65617ecf68d1705c3ac6883ff9774b2e9d4e.tar guix-a12a65617ecf68d1705c3ac6883ff9774b2e9d4e.tar.gz |
gnu: Add duktape.
-rw-r--r-- | gnu/packages/javascript.scm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm index 3a9e88ad08..5331c2f6da 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -440,3 +440,40 @@ 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 duktape + (package + (name "duktape") + (version "1.3.1") + (source + (origin + (method url-fetch) + ;; Use the GitHub source for ease of updating. + (uri (string-append "https://github.com/svaarala/duktape/releases/download/v" + version "/duktape-" version ".tar.xz")) + (sha256 + (base32 + "0rd9wz5716qhzqwwj26i2x5m8dd020rvaf2i08sa4jxrl6nk3cil")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; Tests require many dependencies including v8. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + ;; Installing is simply copying source code files so they can be + ;; embedded elsewhere. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (src (string-append out "/src"))) + (install-file "src/duktape.c" src) + (install-file "src/duktape.h" src))))))) + (synopsis "Embeddable JavaScript engine") + (description + "Duktape is an embeddable Javascript engine, with a focus on portability +and compact footprint. Duktape is easy to integrate into a C/C++ project: add +@code{duktape.c}, @code{duktape.h}, and @code{duk_config.h} to your build, and +use the Duktape API to call Ecmascript functions from C code and vice versa.") + (home-page "http://duktape.org") + (license license:expat))) |