summary refs log tree commit diff
diff options
context:
space:
mode:
authorPierre Neidhardt <mail@ambrevar.xyz>2021-01-07 12:31:41 +0100
committerPierre Neidhardt <mail@ambrevar.xyz>2021-01-07 14:21:25 +0100
commitb509a071943d73f832a93af51d344785f49c5e8f (patch)
treeb45e3735881c9b1d723e8ebb15f191480ccad12b
parent0d3f2716a8b8b64fc4126e1f3e987e05cb9f6bac (diff)
downloadguix-b509a071943d73f832a93af51d344785f49c5e8f.tar.gz
gnu: Add duktape.
* gnu/packages/javascript.scm (duktape): New variable.
-rw-r--r--gnu/packages/javascript.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 7bb2629a1e..8434836c6f 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2017, 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2021 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -623,3 +624,31 @@ 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)))
+
+(define-public duktape
+  (package
+    (name "duktape")
+    (version "2.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://duktape.org/duktape-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "19szwxzvl2g65fw95ggvb8h0ma5bd9vvnnccn59hwnc4dida1x4n"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:tests? #f                      ; No tests.
+       #:make-flags (list "-f" "Makefile.sharedlibrary"
+                          (string-append "INSTALL_PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://duktape.org/")
+    (synopsis "Small 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 @file{duktape.c}, @file{duktape.h}, and @file{duk_config.h} to
+your build, and use the Duktape API to call ECMAScript functions from C code
+and vice versa.")
+    (license license:expat)))