guix-patches
[Top][All Lists]
Advanced

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

bug#27049: [PATCH] gnu: Add mathjax.


From: Arun Isaac
Subject: bug#27049: [PATCH] gnu: Add mathjax.
Date: Wed, 24 May 2017 03:13:26 +0530

* 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






reply via email to

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