aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2018-02-05 11:47:54 +0100
committerChristopher Baines <mail@cbaines.net>2018-12-28 11:21:18 +0000
commitdb84778147f756ccfc5ad7d5f489035706244769 (patch)
treea394cf0a1c02562723aa5fbeac116a35ef0e54d8
parentba9bad34fb88c4eaba23228efa59b93b247044b1 (diff)
downloadguix-db84778147f756ccfc5ad7d5f489035706244769.tar
guix-db84778147f756ccfc5ad7d5f489035706244769.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 8731a44927..c778683e26 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -449,3 +449,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)))