Subject: bug#27049: closed (Re: bug#27049: [PATCH 2/2] gnu: Add js-mathjax.)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 05 Jun 2017 13:49:02 +0000

Your bug report

#27049: [PATCH] gnu: Add mathjax.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
27049: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27049
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#27049: [PATCH 2/2] gnu: Add js-mathjax.
From: Arun Isaac <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Mon, 05 Jun 2017 19:18:04 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

Pushed!

Subject: [PATCH] gnu: Add mathjax.
From: Arun Isaac <[email-masked]>
To: [email-masked]
Cc: Arun Isaac <[email-masked]>
Date: Wed, 24 May 2017 03:13:26 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

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

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index bcc20bfdd..84fa3c12f 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -4584,3 +4584,43 @@ allocations, it does not buffer data, it can be interrupted at anytime.
 Depending on your architecture, it only requires about 40 bytes of data per
 message stream (in a web server that is per connection).")
     (license l:expat)))
+
+(define-public mathjax
+  (package
+    (name "mathjax")
+    (version "2.7.1")
+    (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"))
+       (sha256
+        (base32
+         "0sbib5lk0jrvbq6s72ag6ss3wjlz5wnk07ddxij1kp96yg3c1d1b"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+
+         (let ((install-dir (string-append %output "/share/webapps/mathjax"))
+               (tar (string-append (assoc-ref %build-inputs "tar") "/bin/tar"))
+               (path (string-append (assoc-ref %build-inputs "gzip") "/bin")))
+           (mkdir-p install-dir)
+           (chdir install-dir)
+           (setenv "PATH" path)
+           (system* tar "xvf" (assoc-ref %build-inputs "source") "--strip" "1")))))
+    (native-inputs
+     `(("gzip" ,gzip)
+       ("tar" ,tar)))
+    (home-page "https://www.mathjax.org/")
+    (synopsis "JavaScript display engine for LaTeX, MathML, and AsciiMath")
+    (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.")
+    (license l:asl2.0)))
-- 
2.12.2