-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtex.scm
114 lines (111 loc) · 4.33 KB
/
tex.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
(define-module (tex)
#:use-module ((fonts) #:select (lcdf-typetools))
#:use-module (gnu packages tex)
#:use-module ((guix build-system python) #:select (python-build-system))
#:use-module (guix build-system trivial)
#:use-module (guix build-system texlive)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix svn-download)
#:use-module ((gnu packages python) #:select (python-wrapper))
#:use-module ((gnu packages fontutils) #:select (fontforge))
#:use-module ((guix licenses) #:prefix license:))
(define-public texlive-latex-moderncv
(package
(name "texlive-latex-moderncv")
(version "2.0.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/xdanaux/moderncv")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1slgjsyiagglpzx4fqwmhbq6bnz40ii5kl8g2vbh144nnlql0smj"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (guix build utils))
(let ((target (string-append (assoc-ref %outputs "out")
"/share/texmf-dist/tex/latex/moderncv")))
(mkdir-p target)
(copy-recursively (assoc-ref %build-inputs "source") target)
#t))))
(home-page "https://ctan.org/pkg/moderncv")
(synopsis "A modern curriculum vitae class")
(description
"The class provides facilities for typesetting modern curriculums
vitae, both in a classic and in a casual style. It is fairly
customizable, allowing you to define your own style by changing the
colours, the fonts, etc.")
(license license:lppl1.3+)))
(define-public texlive-latex-fontawesome
(package
(name "texlive-latex-fontawesome")
(version "4.6.3")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/xdanaux/fontawesome-latex")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0m5fm1hj747braq7g7j8zbld7fq71ikdw5glva3w54yzqkgwcx6k"))))
(inputs
`(("fontforge" ,fontforge)
("lcdf-typetools" ,lcdf-typetools)
("texlive-bin" ,texlive-bin)
("texlive-latex-type1cm" ,texlive-latex-type1cm)))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'build
(lambda _
(invoke "python" "generate_tex_bindings.py" ,version)
#t))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
;; install fonts
(let* ((font-dir
(lambda (dir)
(string-append
(assoc-ref %outputs "out")
"/share/texmf-dist/fonts/" dir "/fontawesome")))
(tfm `("tfm" ,(font-dir "tfm/public")))
(enc `("enc" ,(font-dir "enc/pdftex/public")))
(otf `("otf" ,(font-dir "opentype/public")))
(mmap `("map" ,(font-dir "map/dvips")))
(t1 `("pfb" ,(font-dir "type1/public"))))
(for-each
(lambda (p)
(let ((re (car p))
(dir (cadr p)))
(for-each (lambda (f) (install-file f dir))
(find-files "." (string-append ".*\\." re "$")))))
(list tfm enc otf mmap t1)))
;; install tex and fd
(let ((dest
(string-append
(assoc-ref outputs "out")
"/share/texmf-dist/tex/latex/fontawesome")))
(for-each (lambda (f) (install-file f dest))
(find-files "." ".*\\.(tex|sty|fd)$")))
#t))
(delete 'check)
(delete 'wrap))))
(home-page "http://www.ctan.org/pkg/fontawesome")
(synopsis
"Font containing web-related icons")
(description
"The package offers access to the large number of web-related
icons provided by the included
http://fortawesome.github.io/Font-Awesome/font. The package requires
the package, fontspec, if run with XeTeX or LuaTeX.")
(license license:lppl1.3+)))