gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / javascript.scm
index e7dcd79..a935d32 100644 (file)
@@ -1,9 +1,10 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2018, 2020, 2021 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.
 ;;;
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages lisp)
+  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages web)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system trivial)
-  #:use-module (guix build-system minify))
+  #:use-module (guix build-system minify)
+  #:use-module (guix utils))
+
+(define-public cjson
+  (package
+    (name "cjson")
+    (version "1.7.14")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/DaveGamble/cJSON")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "1rlnailhjm180zb6pc17jwphjwivw8kfpqgixjfgq4iyryq46sah"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DENABLE_CJSON_UTILS=On")))
+    (home-page "https://github.com/DaveGamble/cJSON")
+    (synopsis "JSON parser written in ANSI C")
+    (description "This library provides a portable embeddable JSON parser.")
+    (license license:expat)))
+
+(define-public js-context-menu
+  (package
+    (name "js-context-menu")
+    (version "0.6.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/zorkow/context-menu")
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1q063l6477z285j6h5wvccp6iswvlp0jmb96sgk32sh0lf7nhknh"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (chdir (assoc-ref %build-inputs "source"))
+         (let ((target (string-append %output "/share/javascript/context-menu")))
+           (apply invoke (string-append (assoc-ref %build-inputs "esbuild")
+                                        "/bin/esbuild")
+                  "--bundle"
+                  "--tsconfig=tsconfig.json"
+                  (string-append "--outdir=" target)
+                  (find-files "ts" "\\.ts$"))))))
+    (native-inputs
+     `(("esbuild" ,esbuild)))
+    (home-page "https://github.com/zorkow/context-menu")
+    (synopsis "Generic context menu")
+    (description "This package provides a reimplementation of the MathJax
+context menu in TypeScript.")
+    (license license:asl2.0)))
 
 (define-public font-mathjax
   (package
     (version "2.7.2")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://github.com/mathjax/MathJax/archive/"
-             version ".tar.gz"))
-       (file-name (string-append name "-" version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/mathjax/MathJax")
+              (commit version)))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1r72di4pg4i6pfhcskkxqmf1158m81ki6a7lbw6nz4zh7xw23hy4"))))
+         "127j12g7v2hx6k7r00b8cp49s7nkrwhxy6l8p03pw34xpxbgbimm"))))
     (build-system trivial-build-system)
     (arguments
      `(#:modules ((guix build utils))
        (begin
          (use-modules (guix build utils)
                       (ice-9 match))
-         (set-path-environment-variable
-          "PATH" '("bin") (map (match-lambda
-                                 ((_ . input)
-                                  input))
-                               %build-inputs))
          (let ((install-directory (string-append %output "/share/fonts/mathjax")))
            (mkdir-p install-directory)
-           (invoke "tar" "-C" install-directory "-xvf"
-                   (assoc-ref %build-inputs "source")
-                   ,(string-append "MathJax-" version "/fonts")
-                   "--strip" "2")))))
-    (native-inputs
-     `(("gzip" ,gzip)
-       ("tar" ,tar)))
+           (copy-recursively (string-append (assoc-ref %build-inputs "source")
+                                            "/fonts")
+                             install-directory)))))
     (home-page "https://www.mathjax.org/")
     (synopsis "Fonts for MathJax")
     (description "This package contains the fonts required for MathJax.")
           (list (assoc-ref %build-inputs "glibc-utf8-locales")))
          (setenv "LANG" "en_US.UTF-8")
          (let ((install-directory (string-append %output "/share/javascript/mathjax")))
-           (invoke "tar" "xvf" (assoc-ref %build-inputs "source")
-                   ,(string-append "MathJax-" (package-version font-mathjax)
-                                   "/unpacked")
-                   "--strip" "2")
+           (copy-recursively (string-append (assoc-ref %build-inputs "source") "/unpacked")
+                             "MathJax-unpacked")
            (mkdir-p install-directory)
            (symlink (string-append (assoc-ref %build-inputs "font-mathjax")
                                    "/share/fonts/mathjax")
            (for-each
             (lambda (file)
               (let ((installed (string-append install-directory
-                                              ;; remove prefix "."
-                                              (string-drop file 1))))
+                                              ;; remove prefix "./MathJax-unpacked"
+                                              (string-drop file 18))))
                 (format #t "~a -> ~a~%" file installed)
                 (cond
                  ((string-match "\\.js$" file)
@@ -139,50 +188,107 @@ plugins or software to be installed on the browser.  So the page author can
 write web documents that include mathematics and be confident that readers will
 be able to view it naturally and easily.")))
 
+(define-public js-commander
+  (package
+    (name "js-commander")
+    (version "6.2.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/tj/commander.js")
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "126m25s6mxpxmdj4aw5awz06b47r8r798lcf1c5bnmmh39cik5i1"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (chdir (assoc-ref %build-inputs "source"))
+         (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild")
+                                       "/bin/esbuild"))
+               (target (string-append %output "/share/javascript/commander")))
+           (invoke esbuild
+                   "--bundle"
+                   "--minify"
+                   "--tsconfig=tsconfig.json"
+                   "--platform=node"
+                   (string-append "--outfile=" target "/index.min.js")
+                   "index.js")))))
+    (native-inputs
+     `(("esbuild" ,esbuild)))
+    (home-page "https://github.com/tj/commander.js")
+    (synopsis "Library for node.js command-line interfaces")
+    (description "Commander.js aims to be the complete solution for node.js
+command-line interfaces.  ")
+    (license license:expat)))
+
+(define-public js-xmldom-sre
+  ;; This commit corresponds to the untagged release 0.1.32
+  (let ((commit "3c79325bc2c9e5d27e3ba44b680fa8c5dd6a381d")
+        (revision "1"))
+    (package
+      (name "js-xmldom-sre")
+      (version "0.1.32")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/zorkow/xmldom/")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0a88v0id3mjflpvjqhv8a28br0xvaaszxbf7alg6pxfbnkb69yyq"))))
+      (build-system trivial-build-system)
+      (arguments
+       `(#:modules ((guix build utils))
+         #:builder
+         (begin
+           (use-modules (guix build utils))
+           (chdir (assoc-ref %build-inputs "source"))
+           (let ((esbuild (string-append (assoc-ref %build-inputs "esbuild")
+                                         "/bin/esbuild"))
+                 (target (string-append %output "/share/javascript/xmldom-sre")))
+             (invoke esbuild
+                     "--bundle"
+                     "--minify"
+                     "--platform=node"
+                     (string-append "--outfile=" target "/dom-parser.min.js")
+                     "dom-parser.js")))))
+      (native-inputs
+       `(("esbuild" ,esbuild)))
+      (home-page "https://github.com/zorkow/xmldom/")
+      (synopsis "DOM parser and XML serializer")
+      (description "This is a fork of the xmldom library.  It allows the use
+of wicked-good-xpath together with xmldom.")
+      ;; One of these licenses may be selected.
+      (license (list license:expat
+                     license:lgpl2.0)))))
+
 (define-public js-respond
   (package
     (name "js-respond")
     (version "1.4.2")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/scottjehl/Respond/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/scottjehl/Respond")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0ds1ya2a185jp93mdn07159c2x8zczwi960ykrawpp62bwk2n93d"))))
-    (build-system trivial-build-system)
+                "00xid731rirc7sdy1gc8qal3v9g0agr2qx15hm4x97l1lcbylyn2"))))
+    (build-system minify-build-system)
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder
-       (begin
-         (use-modules (guix build utils)
-                      (ice-9 match)
-                      (ice-9 popen)
-                      (srfi srfi-26))
-         (set-path-environment-variable
-          "PATH" '("bin") (map (match-lambda
-                                 ((_ . input)
-                                  input))
-                               %build-inputs))
-         (let ((install-directory (string-append %output
-                                                 "/share/javascript/respond/")))
-           (invoke "tar" "xvf"
-                   (assoc-ref %build-inputs "source")
-                   "--strip" "1")
-           (mkdir-p install-directory)
-           (let* ((file "src/respond.js")
-                  (installed (string-append install-directory "respond.min.js")))
-             (let ((minified (open-pipe* OPEN_READ "uglify-js" file)))
-               (call-with-output-file installed
-                 (cut dump-port minified <>)))))
-         #t)))
+     `(#:javascript-files '("src/matchmedia.addListener.js"
+                            "src/matchmedia.polyfill.js"
+                            "src/respond.js")))
     (home-page "https://github.com/scottjehl/Respond")
-    (native-inputs
-     `(("uglify-js" ,uglify-js)
-       ("source" ,source)
-       ("gzip" ,gzip)
-       ("tar" ,tar)))
     (synopsis "Polyfill for min/max-width CSS3 Media Queries")
     (description "The goal of this script is to provide a fast and lightweight
 script to enable responsive web designs in browsers that don't support CSS3
@@ -194,13 +300,14 @@ Media Queries.")
     (name "js-html5shiv")
     (version "3.7.3")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/aFarkas/html5shiv/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/aFarkas/html5shiv")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0inlbpxpqzdyi24lqagzf7l24zxg0y02xcpqs2h4npjscazzw7hg"))))
+                "0y1c5nyq0brl9fjdihhax33vks4s1ij9iv113879sg3zflmgqpd0"))))
     (build-system minify-build-system)
     (home-page "https://github.com/aFarkas/html5shiv")
     (synopsis "Enable HTML5 sectioning elements in legacy browsers")
@@ -223,7 +330,7 @@ Explorer 6-9, Safari 4.x (and iPhone 3.x), and Firefox 3.x.")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
-                      (url "https://github.com/douglascrockford/JSON-js.git")
+                      (url "https://github.com/douglascrockford/JSON-js")
                       (commit commit)))
                 (file-name (string-append name "-" version "-checkout"))
                 (sha256
@@ -264,13 +371,14 @@ provided by ES5.  @code{JSONPath} is used to represent the links.")
     (name "js-strftime")
     (version "0.10.0")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/samsonjs/strftime/"
-                                  "archive/v" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url"https://github.com/samsonjs/strftime")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1iya43w7y26y2dp9l4d40bhjc4scb5a9mng5ng5c8hsqr82f1375"))))
+                "131nmlivazwxyba25kh9lda99749fq4xsyin6lzfalaaydviby4p"))))
     (build-system minify-build-system)
     (arguments
      `(#:javascript-files '("strftime.js")))
@@ -287,13 +395,14 @@ well as some other extensions from Ruby.")
     (name "js-highlight")
     (version "9.12.0")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/isagalaev/highlight.js/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/isagalaev/highlight.js")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1jjn9mj7fwq4zpr6is438bscf03b3q8jkj0k5c3fc6pkmjnhw939"))))
+                "12qz22qjpd6svj58pwgcwg2x2rzhihfdrxg6lgj39nfpaln6dris"))))
     (build-system minify-build-system)
     (arguments
      `(#:javascript-files '("src/highlight.js")))
@@ -308,14 +417,14 @@ detection.")
 (define-public js-datatables
   (package
     (name "js-datatables")
-    (version "1.10.15")
+    (version "1.10.19")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://datatables.net/releases/DataTables-"
                                   version ".zip"))
               (sha256
                (base32
-                "1y9xqyqyz7x1ls3ska71pshl2hpiy3qnw1f7wygyslbhy4ssgf57"))))
+                "0cff8a1g7pjwbjdqq0yzqd963ar7pfi4splmm6rwdzganr77rkhb"))))
     (build-system minify-build-system)
     (arguments
      `(#:javascript-files '("media/js/dataTables.bootstrap.js"
@@ -329,21 +438,44 @@ Javascript library, adding sorting, paging and filtering abilities to plain
 HTML tables with minimal effort.")
     (license license:expat)))
 
+(define-public js-requirejs
+  (package
+    (name "js-requirejs")
+    (version "2.3.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/requirejs/requirejs")
+                     (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0cvd5y2mb3h6yil3niqn3gjqrzixdsxcz4rvc2f0hg4kzp5y0w86"))))
+    (build-system minify-build-system)
+    (arguments `(#:javascript-files '("require.js")))
+    (home-page "https://github.com/requirejs/requirejs/")
+    (synopsis "File and module loader for JavaScript")
+    (description "RequireJS loads plain JavaScript files as well as more
+defined modules.  It is optimized for in-browser use, including in a Web
+Worker, but it can be used in other JavaScript environments.")
+    (license license:expat)))
+
 (define-public js-selectize
   (package
     (name "js-selectize")
-    (version "0.12.4")
+    (version "0.12.6")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/selectize/selectize.js/"
-                                  "archive/v" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/selectize/selectize.js")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0756p49aaz34mw2dx8k1gxf210mngfrri25vkba0j7wihd2af8gn"))))
+                "15gichl8wi6yxag2ps723nxrgyan15976dzsnvw9h9py8sbyyzjn"))))
     (build-system minify-build-system)
     (arguments `(#:javascript-files '("src/selectize.js")))
-    (home-page "http://selectize.github.io/selectize.js/")
+    (home-page "https://selectize.github.io/selectize.js/")
     (synopsis "Hybrid widget between a textbox and <select> box")
     (description "Selectize is the hybrid of a textbox and @code{<select>}
 box.  It's jQuery based and it has autocomplete and native-feeling keyboard
@@ -353,15 +485,16 @@ navigation; it is useful for tagging, contact lists, etc.")
 (define-public js-es5-shim
   (package
     (name "js-es5-shim")
-    (version "4.5.9")
+    (version "4.5.13")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/es-shims/es5-shim/"
-                                  "archive/v" version ".tar.gz"))
-              (file-name (string-append name "-" version ".tar.gz"))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/es-shims/es5-shim")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "0yfndyijz0ykddzprpvfjb2453gzpn528klmwycwbqc1bqd3m1hl"))))
+                "142w384fbyllq4yggv173g82lw3wix4jqcg6hkhx1ymq89vvnpmh"))))
     (build-system minify-build-system)
     (arguments `(#:javascript-files
                  '("es5-sham.js"
@@ -381,13 +514,14 @@ means that these shams cause many ES5 methods to silently fail.")
     (name "js-filesaver")
     (version "1.3.8")
     (source (origin
-              (method url-fetch)
-              (uri (string-append "https://github.com/eligrey/FileSaver.js/"
-                                  "archive/" version ".tar.gz"))
-              (file-name (string-append name "-" version))
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/eligrey/FileSaver.js")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1rkhfqs5plaj628kzj7qgm5qahy4v7ihygifidqr6g6265mil97h"))))
+                "0gvqk0hnr8fig0n4da7vj7q6z31bcyv52916xz3rbmdj3pgpiv1d"))))
     (build-system minify-build-system)
     (arguments
      `(#:phases
@@ -401,6 +535,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/")
@@ -417,32 +557,32 @@ external server.")
 (define-public mujs
   (package
     (name "mujs")
-    (version "1.0.5")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://git.ghostscript.com/mujs.git")
-                    (commit version)))
-              (file-name (string-append name "-" version "-checkout"))
-              (sha256
-               (base32
-                "0pkv26jxwgv5ax0ylfmi4h96h79hj4gvr95218ns8wngnmgr1ny6"))))
+    (version "1.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ccxvii/mujs")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0ivqz06fq8v36p2gkjh64vgv0gm7nghds0n42vrv7vm46phdffvb"))))
     (build-system gnu-build-system)
     (arguments
-     '(#:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (delete 'configure)  ; no configure
-         (add-after 'install 'install-shared-library
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
-               (install-file "build/release/libmujs.so"
-                             (string-append out "/lib"))))))
-       #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out"))
-                          (string-append "CC=gcc"))
+         (delete 'configure)  ; no configure script
+         (replace 'install
+           (lambda* (#:key (make-flags '()) #:allow-other-keys)
+             (apply invoke "make" "install-shared" make-flags))))
+       #:make-flags
+       (list ,(string-append "VERSION=" version)
+             ,(string-append "CC=" (cc-for-target))
+             (string-append "prefix=" (assoc-ref %outputs "out")))
        #:tests? #f))                    ; no tests
     (inputs
      `(("readline" ,readline)))
-    (home-page "https://artifex.com/mujs/")
+    (home-page "https://mujs.com/")
     (synopsis "JavaScript interpreter written in C")
     (description "MuJS is a lightweight Javascript interpreter designed for
 embedding in other software to extend them with scripting capabilities.  MuJS
@@ -453,3 +593,62 @@ 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 "2021-03-27")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://bellard.org/quickjs/quickjs-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "06pywwpmfwjz225h59wf90q96a2fd66qfcw5xa6m6y9k9k7glnx4"))))
+    (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)))
+
+(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)))