epiphany w/ gtk4 and webkitgtk 2.38
[jackhill/guix/guix.git] / tests / texlive.scm
CommitLineData
afbc9419 1;;; GNU Guix --- Functional package management for GNU
c9a37f57 2;;; Copyright © 2017, 2022 Ricardo Wurmus <rekado@elephly.net>
afbc9419
RW
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (test-texlive)
20 #:use-module (gnu packages tex)
21 #:use-module (guix import texlive)
22 #:use-module (guix tests)
6f918d69 23 #:use-module (guix tests http)
afbc9419
RW
24 #:use-module (guix build utils)
25 #:use-module (srfi srfi-1)
26 #:use-module (srfi srfi-64)
27 #:use-module (srfi srfi-26)
6f918d69 28 #:use-module (web client)
afbc9419
RW
29 #:use-module (ice-9 match))
30
31(test-begin "texlive")
32
f66da037
RW
33(define %fake-tlpdb
34 '(("stricttex"
35 . ((name
36 . "stricttex")
37 (shortdesc
38 . "Strictly balanced brackets and numbers in command names")
39 (longdesc
40 . "This is a small, LuaLaTeX-only package providing you with three,
41sometimes useful features: It allows you to make brackets [...] \"strict\",
42meaning that each [ must be balanced by a ]. It allows you to use numbers in
43command names, so that you can do stuff like \\newcommand\\pi12{\\pi_{12}}. It
44allows you to use numbers and primes in command names, so that you can do
45stuff like \\newcommand\\pi'12{\\pi '_{12}}.")
46 (docfiles
47 . ("texmf-dist/doc/lualatex/stricttex/README.md"
48 "texmf-dist/doc/lualatex/stricttex/stricttex.pdf"))
49 (runfiles
50 . ("texmf-dist/tex/lualatex/stricttex/stricttex.lua"
51 "texmf-dist/tex/lualatex/stricttex/stricttex.sty"))
52 (catalogue-license . "lppl1.3c")))
53 ("texsis"
54 . ((name
55 . "texsis")
56 (shortdesc
57 . "Plain TeX macros for Physicists")
58 (longdesc
59 . "TeXsis is a TeX macro package which provides useful features for
60typesetting research papers and related documents. For example, it includes
61support specifically for: Automatic numbering of equations, figures, tables
62and references; Simplified control of type sizes, line spacing, footnotes,
63running headlines and footlines, and tables of contents, figures and tables;
64Specialized document formats for research papers, preprints and \"e-prints\",
65conference proceedings, theses, books, referee reports, letters, and
66memoranda; Simplified means of constructing an index for a book or thesis;
67Easy to use double column formatting; Specialized environments for lists,
68theorems and proofs, centered or non-justified text, and listing computer
69code; Specialized macros for easily constructing ruled tables. TeXsis was
70originally developed for physicists, but others may also find it useful. It is
71completely compatible with Plain TeX.")
72 (depend . ("cm" "hyphen-base" "knuth-lib" "plain" "tex"))
73 (docfiles
74 . ("texmf-dist/doc/man/man1/texsis.1"
75 "texmf-dist/doc/man/man1/texsis.man1.pdf"
76 "texmf-dist/doc/otherformats/texsis/base/COPYING"
77 "texmf-dist/doc/otherformats/texsis/base/Example.tex"
78 "texmf-dist/doc/otherformats/texsis/base/Fonts.tex"
79 "texmf-dist/doc/otherformats/texsis/base/INSTALL"
80 "texmf-dist/doc/otherformats/texsis/base/Install.tex"
81 "texmf-dist/doc/otherformats/texsis/base/MANIFEST"
82 "texmf-dist/doc/otherformats/texsis/base/Manual.fgl"
83 "texmf-dist/doc/otherformats/texsis/base/Manual.ref"
84 "texmf-dist/doc/otherformats/texsis/base/Manual.tbl"
85 "texmf-dist/doc/otherformats/texsis/base/Manual.tex"
86 "texmf-dist/doc/otherformats/texsis/base/NEWS"
87 "texmf-dist/doc/otherformats/texsis/base/README"
88 "texmf-dist/doc/otherformats/texsis/base/TXSapxF.doc"
89 "texmf-dist/doc/otherformats/texsis/base/TXScover.doc"
90 "texmf-dist/doc/otherformats/texsis/base/TXSdcol.doc"
91 "texmf-dist/doc/otherformats/texsis/base/TXSdoc.doc"
92 "texmf-dist/doc/otherformats/texsis/base/TXSdoc0.doc"
93 "texmf-dist/doc/otherformats/texsis/base/TXSdocM.doc"
94 "texmf-dist/doc/otherformats/texsis/base/TXSend.doc"
95 "texmf-dist/doc/otherformats/texsis/base/TXSenvmt.doc"
96 "texmf-dist/doc/otherformats/texsis/base/TXSeqns.doc"
97 "texmf-dist/doc/otherformats/texsis/base/TXSfigs.doc"
98 "texmf-dist/doc/otherformats/texsis/base/TXSfmts.doc"
99 "texmf-dist/doc/otherformats/texsis/base/TXSfonts.doc"
100 "texmf-dist/doc/otherformats/texsis/base/TXSinstl.doc"
101 "texmf-dist/doc/otherformats/texsis/base/TXSintro.doc"
102 "texmf-dist/doc/otherformats/texsis/base/TXSletr.doc"
103 "texmf-dist/doc/otherformats/texsis/base/TXSmisc.doc"
104 "texmf-dist/doc/otherformats/texsis/base/TXSprns.doc"
105 "texmf-dist/doc/otherformats/texsis/base/TXSrefs.doc"
106 "texmf-dist/doc/otherformats/texsis/base/TXSrevs.doc"
107 "texmf-dist/doc/otherformats/texsis/base/TXSruled.doc"
108 "texmf-dist/doc/otherformats/texsis/base/TXSsects.doc"
109 "texmf-dist/doc/otherformats/texsis/base/TXSsite.000"
110 "texmf-dist/doc/otherformats/texsis/base/TXSsymb.doc"
111 "texmf-dist/doc/otherformats/texsis/base/TXStags.doc"
112 "texmf-dist/doc/otherformats/texsis/base/index.tex"
113 "texmf-dist/doc/otherformats/texsis/base/letr"
114 "texmf-dist/doc/otherformats/texsis/base/penguin.eps"
115 "texmf-dist/doc/otherformats/texsis/base/penguin2.eps"
116 "texmf-dist/doc/otherformats/texsis/base/texsis.el"
117 "texmf-dist/doc/otherformats/texsis/base/texsis.lsm"))
118 (runfiles
119 . ("texmf-dist/bibtex/bst/texsis/texsis.bst"
120 "texmf-dist/tex/texsis/base/AIP.txs"
121 "texmf-dist/tex/texsis/base/CVformat.txs"
122 "texmf-dist/tex/texsis/base/Elsevier.txs"
123 "texmf-dist/tex/texsis/base/Exam.txs"
124 "texmf-dist/tex/texsis/base/Formletr.txs"
125 "texmf-dist/tex/texsis/base/IEEE.txs"
126 "texmf-dist/tex/texsis/base/PhysRev.txs"
127 "texmf-dist/tex/texsis/base/Spanish.txs"
128 "texmf-dist/tex/texsis/base/Swedish.txs"
129 "texmf-dist/tex/texsis/base/TXSconts.tex"
130 "texmf-dist/tex/texsis/base/TXSdcol.tex"
131 "texmf-dist/tex/texsis/base/TXSenvmt.tex"
132 "texmf-dist/tex/texsis/base/TXSeqns.tex"
133 "texmf-dist/tex/texsis/base/TXSfigs.tex"
134 "texmf-dist/tex/texsis/base/TXSfmts.tex"
135 "texmf-dist/tex/texsis/base/TXSfonts.tex"
136 "texmf-dist/tex/texsis/base/TXShead.tex"
137 "texmf-dist/tex/texsis/base/TXSinit.tex"
138 "texmf-dist/tex/texsis/base/TXSletr.tex"
139 "texmf-dist/tex/texsis/base/TXSmacs.tex"
140 "texmf-dist/tex/texsis/base/TXSmemo.tex"
141 "texmf-dist/tex/texsis/base/TXSprns.tex"
142 "texmf-dist/tex/texsis/base/TXSrefs.tex"
143 "texmf-dist/tex/texsis/base/TXSruled.tex"
144 "texmf-dist/tex/texsis/base/TXSsects.tex"
145 "texmf-dist/tex/texsis/base/TXSsite.tex"
146 "texmf-dist/tex/texsis/base/TXSsymb.tex"
147 "texmf-dist/tex/texsis/base/TXStags.tex"
148 "texmf-dist/tex/texsis/base/TXStitle.tex"
149 "texmf-dist/tex/texsis/base/Tablebod.txs"
150 "texmf-dist/tex/texsis/base/WorldSci.txs"
151 "texmf-dist/tex/texsis/base/color.txs"
152 "texmf-dist/tex/texsis/base/nuclproc.txs"
153 "texmf-dist/tex/texsis/base/printfont.txs"
154 "texmf-dist/tex/texsis/base/spine.txs"
155 "texmf-dist/tex/texsis/base/texsis.tex"
156 "texmf-dist/tex/texsis/base/thesis.txs"
157 "texmf-dist/tex/texsis/base/twin.txs"
158 "texmf-dist/tex/texsis/config/texsis.ini"))
159 (catalogue-license . "lppl")))))
afbc9419 160
f66da037 161(test-assert "texlive->guix-package"
afbc9419
RW
162 ;; Replace network resources with sample data.
163 (mock ((guix build svn) svn-fetch
164 (lambda* (url revision directory
165 #:key (svn-command "svn")
166 (user-name #f)
f66da037
RW
167 (password #f)
168 (recursive? #t))
afbc9419
RW
169 (mkdir-p directory)
170 (with-output-to-file (string-append directory "/foo")
171 (lambda ()
172 (display "source")))))
f66da037
RW
173 (let ((result (texlive->guix-package "texsis"
174 #:package-database
175 (lambda _ %fake-tlpdb))))
afbc9419
RW
176 (match result
177 (('package
f66da037
RW
178 ('inherit ('simple-texlive-package
179 "texlive-texsis"
10b2ad7d
RW
180 ('list "bibtex/bst/texsis/"
181 "doc/man/man1/"
f66da037 182 "doc/otherformats/texsis/base/"
f66da037
RW
183 "tex/texsis/base/"
184 "tex/texsis/config/")
185 ('base32 (? string? hash))
186 #:trivial? #t))
c9a37f57 187 ('version . any)
f66da037 188 ('propagated-inputs
641b599d
LC
189 ('list 'texlive-cm
190 'texlive-hyphen-base
191 'texlive-knuth-lib
192 'texlive-plain
193 'texlive-tex))
f66da037
RW
194 ('home-page "https://www.tug.org/texlive/")
195 ('synopsis "Plain TeX macros for Physicists")
196 ('description (? string? description))
197 ('license 'lppl))
198 #true)
afbc9419
RW
199 (_
200 (begin
f66da037 201 (format #t "~s~%" result)
afbc9419
RW
202 (pk 'fail result #f)))))))
203
204(test-end "texlive")