aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:47:54 +0100
committerChristopher Baines <mail@cbaines.net>2018-05-18 11:54:03 +0100
commitd1dfa88f1e320b1839fbac7e9f1c636b032483a6 (patch)
tree411a2468e459971db3b3438dde981a77e30feb7d
parentd702f90eaebbdd92b9ebb740e346827a51fd5305 (diff)
downloadguix-d1dfa88f1e320b1839fbac7e9f1c636b032483a6.tar
guix-d1dfa88f1e320b1839fbac7e9f1c636b032483a6.tar.gz
gnu: Add duktape.
-rw-r--r--gnu/packages/javascript.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index e2742faa11..1973fadc56 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -438,3 +438,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)))