summary refs log tree commit diff
path: root/gnu/packages/javascript.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-12-29 17:37:17 +0100
committerMarius Bakke <marius@gnu.org>2020-12-29 17:37:17 +0100
commita22e75c073c785a3a71c952d97fb7ab87dfd282d (patch)
treec0ef12b8c271c9de37bcce9287b67adf8628ed93 /gnu/packages/javascript.scm
parentbbe4ed65ed5fe7dc8ed9d226042852387cee3b1e (diff)
parent789bf7fcc241d010cb583dc76c366110bfca8b35 (diff)
downloadguix-a22e75c073c785a3a71c952d97fb7ab87dfd282d.tar.gz
Merge branch 'master' into ungrafting
Diffstat (limited to 'gnu/packages/javascript.scm')
-rw-r--r--gnu/packages/javascript.scm39
1 files changed, 38 insertions, 1 deletions
diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index 48bde160cd..c4bce1c42e 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; 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>
@@ -27,6 +27,7 @@
   #:use-module (gnu packages compression)
   #: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)
@@ -56,6 +57,42 @@
     (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
     (name "font-mathjax")