From 77e2312306c6684cdfc72f90e6be1a008e5e676f Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Sun, 16 Aug 2020 16:14:02 +1000 Subject: [PATCH 2/4] gnu: Add mathjax-3. * gnu/packages/javascript.scm: (mathjax-3): 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..57e8302094 100644 --- a/gnu/packages/javascript.scm +++ b/gnu/packages/javascript.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2018 Nicolas Goaziou +;;; Copyright © 2020 Brendan Tildesley ;;; ;;; 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-3 + (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