gnu: font-mathjax: Don't use unstable tarball.
* gnu/packages/javascript.scm (font-mathjax)[source]: Download using git-fetch. [arguments]: Adjust for change in source. [native-inputs]: Remove gzip, tar. (js-mathjax)[source]: Adjust for change in source.
This commit is contained in:
parent
504b9ba7f9
commit
89c756012c
|
@ -2,7 +2,7 @@
|
||||||
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
|
||||||
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -40,14 +40,14 @@ (define-public font-mathjax
|
||||||
(version "2.7.2")
|
(version "2.7.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri (string-append
|
(uri (git-reference
|
||||||
"https://github.com/mathjax/MathJax/archive/"
|
(url "https://github.com/mathjax/MathJax")
|
||||||
version ".tar.gz"))
|
(commit version)))
|
||||||
(file-name (string-append name "-" version ".tar.gz"))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1r72di4pg4i6pfhcskkxqmf1158m81ki6a7lbw6nz4zh7xw23hy4"))))
|
"127j12g7v2hx6k7r00b8cp49s7nkrwhxy6l8p03pw34xpxbgbimm"))))
|
||||||
(build-system trivial-build-system)
|
(build-system trivial-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((guix build utils))
|
`(#:modules ((guix build utils))
|
||||||
|
@ -55,20 +55,11 @@ (define-public font-mathjax
|
||||||
(begin
|
(begin
|
||||||
(use-modules (guix build utils)
|
(use-modules (guix build utils)
|
||||||
(ice-9 match))
|
(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")))
|
(let ((install-directory (string-append %output "/share/fonts/mathjax")))
|
||||||
(mkdir-p install-directory)
|
(mkdir-p install-directory)
|
||||||
(invoke "tar" "-C" install-directory "-xvf"
|
(copy-recursively (string-append (assoc-ref %build-inputs "source")
|
||||||
(assoc-ref %build-inputs "source")
|
"/fonts")
|
||||||
,(string-append "MathJax-" version "/fonts")
|
install-directory)))))
|
||||||
"--strip" "2")))))
|
|
||||||
(native-inputs
|
|
||||||
`(("gzip" ,gzip)
|
|
||||||
("tar" ,tar)))
|
|
||||||
(home-page "https://www.mathjax.org/")
|
(home-page "https://www.mathjax.org/")
|
||||||
(synopsis "Fonts for MathJax")
|
(synopsis "Fonts for MathJax")
|
||||||
(description "This package contains the fonts required for MathJax.")
|
(description "This package contains the fonts required for MathJax.")
|
||||||
|
@ -96,10 +87,8 @@ (define-public js-mathjax
|
||||||
(list (assoc-ref %build-inputs "glibc-utf8-locales")))
|
(list (assoc-ref %build-inputs "glibc-utf8-locales")))
|
||||||
(setenv "LANG" "en_US.UTF-8")
|
(setenv "LANG" "en_US.UTF-8")
|
||||||
(let ((install-directory (string-append %output "/share/javascript/mathjax")))
|
(let ((install-directory (string-append %output "/share/javascript/mathjax")))
|
||||||
(invoke "tar" "xvf" (assoc-ref %build-inputs "source")
|
(copy-recursively (string-append (assoc-ref %build-inputs "source") "/unpacked")
|
||||||
,(string-append "MathJax-" (package-version font-mathjax)
|
"MathJax-unpacked")
|
||||||
"/unpacked")
|
|
||||||
"--strip" "2")
|
|
||||||
(mkdir-p install-directory)
|
(mkdir-p install-directory)
|
||||||
(symlink (string-append (assoc-ref %build-inputs "font-mathjax")
|
(symlink (string-append (assoc-ref %build-inputs "font-mathjax")
|
||||||
"/share/fonts/mathjax")
|
"/share/fonts/mathjax")
|
||||||
|
@ -108,8 +97,8 @@ (define-public js-mathjax
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (file)
|
(lambda (file)
|
||||||
(let ((installed (string-append install-directory
|
(let ((installed (string-append install-directory
|
||||||
;; remove prefix "."
|
;; remove prefix "./MathJax-unpacked"
|
||||||
(string-drop file 1))))
|
(string-drop file 18))))
|
||||||
(format #t "~a -> ~a~%" file installed)
|
(format #t "~a -> ~a~%" file installed)
|
||||||
(cond
|
(cond
|
||||||
((string-match "\\.js$" file)
|
((string-match "\\.js$" file)
|
||||||
|
|
Loading…
Reference in a new issue