guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3).


From: Brendan Tildesley
Subject: [bug#42885] [PATCH 2/4] gnu: Add mathjax-bin (MathJax 3).
Date: Sun, 16 Aug 2020 17:03:16 +1000

* gnu/packages/javascript.scm: (mathjax-bin): New variable
---
 gnu/packages/javascript.scm | 40 +++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/javascript.scm b/gnu/packages/javascript.scm
index d5ff5bffee..d6a66a1482 100644
--- a/gnu/packages/javascript.scm
+++ b/gnu/packages/javascript.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2017, 2018 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 © 2020 Brendan Tildesley <mail@brendan.scot>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -128,6 +129,45 @@ 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 mathjax-bin
+  (package
+    (name "mathjax")
+    (version "3.0.5")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/mathjax/MathJax";)
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1zd0chn0cjahi28qv3nzshwljz2hgmj6lizyvvd8qs89gsx0z3h9"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils)
+                      (ice-9 match))
+         (let ((install-directory (string-append %output 
"/lib/node_modules/mathjax")))
+           (mkdir-p install-directory)
+           (copy-recursively (string-append (assoc-ref %build-inputs "source"))
+                             install-directory)))))
+    (home-page "https://www.mathjax.org/";)
+    (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath 
(prebuilt)")
+    (description "MathJax is a JavaScript display engine for LaTeX, MathML,
+and AsciiMath notation that works in all modern browsers.  It requires no
+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.
+
+The package is derived from not the true source but the built version of
+MathJax 3 for distribution by upstream. This package should eventually be
+replaced my a package built directly from the source at
+https://github.com/mathjax/MathJax-src.";)
+    (license license:asl2.0)))
+
 (define-public js-respond
   (package
     (name "js-respond")
-- 
2.28.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]