summaryrefslogtreecommitdiff
path: root/gnu/packages/fonts.scm
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2017-06-03 01:42:15 +0530
committerArun Isaac <arunisaac@systemreboot.net>2017-06-05 19:16:05 +0530
commit6bce59552fa46b3b7773229fb014a3f2510f9734 (patch)
tree2a0c9504c4a81dea95cb78d2783f53f24056003e /gnu/packages/fonts.scm
parent044daaabe6ebfcff5d820d1c270925aeb307c388 (diff)
downloadpatches-6bce59552fa46b3b7773229fb014a3f2510f9734.tar
patches-6bce59552fa46b3b7773229fb014a3f2510f9734.tar.gz
gnu: Add font-mathjax.
* gnu/packages/fonts.scm (font-mathjax): New variable.
Diffstat (limited to 'gnu/packages/fonts.scm')
-rw-r--r--gnu/packages/fonts.scm40
1 files changed, 40 insertions, 0 deletions
diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 73d76a461f..59e60dc292 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2017 Brendan Tildesley <brendan.tildesley@openmailbox.org>
+;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1227,3 +1228,42 @@ Ensuring readability and clarity at both large and small sizes, these icons
have been optimized for beautiful display on all common platforms and display
resolutions.")
(license license:asl2.0)))
+
+(define-public font-mathjax
+ (package
+ (name "font-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)
+ (ice-9 match))
+ (set-path-environment-variable
+ "PATH" '("bin") (map (match-lambda
+ ((_ . input)
+ input))
+ %build-inputs))
+ (let ((install-directory (string-append %output "/share/fonts/mathjax")))
+ (mkdir-p install-directory)
+ (zero? (system* "tar" "-C" install-directory "-xvf"
+ (assoc-ref %build-inputs "source")
+ "MathJax-2.7.1/fonts" "--strip" "2"))))))
+ (native-inputs
+ `(("gzip" ,gzip)
+ ("tar" ,tar)))
+ (home-page "https://www.mathjax.org/")
+ (synopsis "Fonts for MathJax")
+ (description "This package contains the fonts required for MathJax.")
+ (license license:asl2.0)))