gnu: Add texlive-latex-anysize.
[jackhill/guix/guix.git] / gnu / packages / tex.scm
CommitLineData
eb0119ef 1;;; GNU Guix --- Functional package management for GNU
4a6635f3 2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
42e1394b 3;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
d2e84281 4;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4791876c 5;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
7a15a68f 6;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
2d634d9b 7;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
bd917486 8;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
9d913b25 9;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
eb0119ef
AE
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
8f9ac901 26(define-module (gnu packages tex)
b5b73a82 27 #:use-module ((guix licenses) #:prefix license:)
eb0119ef
AE
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
ebcf74da 31 #:use-module (guix build-system perl)
0aa34e82 32 #:use-module (guix build-system trivial)
205794c8 33 #:use-module (guix build-system texlive)
6b5eb840 34 #:use-module (guix utils)
83457fe0 35 #:use-module (guix git-download)
9d913b25 36 #:use-module (guix svn-download)
eb0119ef 37 #:use-module (gnu packages)
83457fe0 38 #:use-module (gnu packages autotools)
0aa34e82 39 #:use-module (gnu packages bash)
eb0119ef 40 #:use-module (gnu packages compression)
a86177d6 41 #:use-module (gnu packages fontutils)
fd89b36b 42 #:use-module (gnu packages gd)
eb0119ef 43 #:use-module (gnu packages ghostscript)
fd89b36b 44 #:use-module (gnu packages gtk)
eb0119ef 45 #:use-module (gnu packages icu4c)
e55354b8 46 #:use-module (gnu packages image)
0aa34e82 47 #:use-module (gnu packages lua)
0256c746 48 #:use-module (gnu packages multiprecision)
eb0119ef
AE
49 #:use-module (gnu packages pdf)
50 #:use-module (gnu packages perl)
51 #:use-module (gnu packages pkg-config)
52 #:use-module (gnu packages python)
4791876c 53 #:use-module (gnu packages qt)
b32c8549 54 #:use-module (gnu packages ruby)
b7194849 55 #:use-module (gnu packages shells)
ce0614dd 56 #:use-module (gnu packages base)
d4000680
RW
57 #:use-module (gnu packages web)
58 #:use-module (gnu packages xml)
c0589f75 59 #:use-module (gnu packages xorg)
ece9b417 60 #:use-module (gnu packages xdisorg)
6b5eb840
AE
61 #:autoload (gnu packages texinfo) (texinfo)
62 #:use-module (ice-9 ftw)
cb7bc20a 63 #:use-module (ice-9 match)
e93f472d 64 #:use-module ((srfi srfi-1) #:hide (zip)))
eb0119ef
AE
65
66(define texlive-extra-src
67 (origin
68 (method url-fetch)
7a15a68f 69 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-extra.tar.xz")
eb0119ef 70 (sha256 (base32
7a15a68f 71 "0q4a92zmwhn4ry6xgrp4k8wq11ax2sg9rg9yrsrdkr719y0x887a"))))
eb0119ef
AE
72
73(define texlive-texmf-src
74 (origin
75 (method url-fetch)
29a56d8e 76 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz")
e20784e6
LF
77 (patches (search-patches "texlive-texmf-CVE-2016-10243.patch"))
78 (patch-flags '("-p2"))
eb0119ef 79 (sha256 (base32
29a56d8e 80 "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr"))))
eb0119ef 81
3abe72bd 82(define-public texlive-bin
eb0119ef 83 (package
0aa34e82 84 (name "texlive-bin")
7a15a68f 85 (version "2016")
0aa34e82
AE
86 (source
87 (origin
88 (method url-fetch)
29a56d8e 89 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz")
0aa34e82 90 (sha256 (base32
29a56d8e 91 "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8"))))
eb0119ef 92 (build-system gnu-build-system)
0aa34e82
AE
93 (inputs
94 `(("texlive-extra-src" ,texlive-extra-src)
95 ("cairo" ,cairo)
96 ("fontconfig" ,fontconfig)
97 ("fontforge" ,fontforge)
98 ("freetype" ,freetype)
99 ("gd" ,gd)
0256c746 100 ("gmp" ,gmp)
0aa34e82
AE
101 ("ghostscript" ,ghostscript)
102 ("graphite2" ,graphite2)
103 ("harfbuzz" ,harfbuzz)
104 ("icu4c" ,icu4c)
105 ("libpaper" ,libpaper)
106 ("libpng" ,libpng)
107 ("libxaw" ,libxaw)
108 ("libxt" ,libxt)
0256c746 109 ("mpfr" ,mpfr)
0aa34e82
AE
110 ("perl" ,perl)
111 ("pixman" ,pixman)
112 ("poppler" ,poppler)
113 ("potrace" ,potrace)
114 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
115 ("ruby" ,ruby)
116 ("tcsh" ,tcsh)
117 ("teckit" ,teckit)
118 ("zlib" ,zlib)
119 ("zziplib" ,zziplib)))
c4c4cc05 120 (native-inputs
e9a6d225 121 `(("pkg-config" ,pkg-config)))
eb0119ef
AE
122 (arguments
123 `(#:out-of-source? #t
124 #:configure-flags
125 `("--disable-native-texlive-build"
fd89b36b 126 "--with-system-cairo"
eb0119ef 127 "--with-system-freetype2"
fd89b36b 128 "--with-system-gd"
0256c746 129 "--with-system-gmp"
be2c88ca 130 "--with-system-graphite2"
c70cf7eb 131 "--with-system-harfbuzz"
eb0119ef
AE
132 "--with-system-icu"
133 "--with-system-libgs"
609578a7 134 "--with-system-libpaper"
eb0119ef 135 "--with-system-libpng"
0256c746 136 "--with-system-mpfr"
fd89b36b 137 "--with-system-pixman"
eb0119ef 138 "--with-system-poppler"
75916982 139 "--with-system-potrace"
eb0119ef
AE
140 "--with-system-teckit"
141 "--with-system-xpdf"
142 "--with-system-zlib"
143 "--with-system-zziplib")
2f4640e3
MW
144
145 ;; Disable tests on mips64 to cope with a failure of luajiterr.test.
146 ;; XXX FIXME fix luajit properly on mips64.
d2e84281 147 #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system)
2f4640e3 148 (%current-system))))
eb0119ef 149 #:phases
4a6635f3
AE
150 (modify-phases %standard-phases
151 (add-after 'install 'postint
152 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
153 (let* ((out (assoc-ref outputs "out"))
154 (share (string-append out "/share"))
155 (texlive-extra (assoc-ref inputs "texlive-extra-src"))
156 (unpack (assoc-ref %standard-phases 'unpack))
157 (patch-source-shebangs
158 (assoc-ref %standard-phases 'patch-source-shebangs)))
159 ;; Create symbolic links for the latex variants and their
160 ;; man pages.
161 (with-directory-excursion (string-append out "/bin/")
162 (for-each symlink
163 '("pdftex" "pdftex" "xetex" "luatex")
164 '("latex" "pdflatex" "xelatex" "lualatex")))
165 (with-directory-excursion (string-append share "/man/man1/")
166 (symlink "luatex.1" "lualatex.1"))
167 ;; Unpack texlive-extra and install tlpkg.
168 (mkdir "texlive-extra")
169 (with-directory-excursion "texlive-extra"
170 (apply unpack (list #:source texlive-extra))
171 (apply patch-source-shebangs (list #:source texlive-extra))
172 (system* "mv" "tlpkg" share))))))))
0aa34e82
AE
173 (synopsis "TeX Live, a package of the TeX typesetting system")
174 (description
175 "TeX Live provides a comprehensive TeX document production system.
176It includes all the major TeX-related programs, macro packages, and fonts
177that are free software, including support for many languages around the
178world.
179
180This package contains the binaries.")
132e14b4
EF
181 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
182 (home-page "https://www.tug.org/texlive/")))
0aa34e82 183
9d913b25
RW
184(define-public texlive-dvips
185 (package
186 (name "texlive-dvips")
187 (version (number->string %texlive-revision))
188 (source (origin
189 (method svn-fetch)
190 (uri (svn-reference
191 (url (string-append "svn://www.tug.org/texlive/tags/"
192 %texlive-tag "/Master/texmf-dist/"
193 "/dvips"))
194 (revision %texlive-revision)))
195 (sha256
196 (base32
15dc52e5 197 "0fcy2hpapbj01ncpjj3v39yhr0jjxb6rm13qaxjjw66s3vydxls1"))))
9d913b25
RW
198 (build-system trivial-build-system)
199 (arguments
200 `(#:modules ((guix build utils))
201 #:builder
202 (begin
203 (use-modules (guix build utils))
204 (let ((target (string-append (assoc-ref %outputs "out")
205 "/share/texmf-dist/dvips")))
206 (mkdir-p target)
207 (copy-recursively (assoc-ref %build-inputs "source") target)
208 #t))))
209 (home-page "http://www.ctan.org/pkg/dvips")
210 (synopsis "DVI to PostScript drivers")
211 (description "This package provides files needed for converting DVI files
212to PostScript.")
213 ;; Various free software licenses apply to individual files.
214 (license (list license:lppl1.3c+
215 license:expat
216 license:lgpl3+))))
217
99952c53
RW
218(define-public texlive-generic-unicode-data
219 (package
220 (name "texlive-generic-unicode-data")
221 (version (number->string %texlive-revision))
222 (source (origin
223 (method svn-fetch)
224 (uri (svn-reference
225 (url (string-append "svn://www.tug.org/texlive/tags/"
226 %texlive-tag "/Master/texmf-dist/"
227 "/tex/generic/unicode-data"))
228 (revision %texlive-revision)))
229 (sha256
230 (base32
231 "0ivrhp6jz31pl4z841g4ws41lmvdiwz4sslmhf02inlib79gz6r2"))))
232 (build-system trivial-build-system)
233 (arguments
234 `(#:modules ((guix build utils))
235 #:builder
236 (begin
237 (use-modules (guix build utils))
238 (let ((target (string-append (assoc-ref %outputs "out")
239 "/share/texmf-dist/tex/generic/unicode-data")))
240 (mkdir-p target)
241 (copy-recursively (assoc-ref %build-inputs "source") target)
242 #t))))
243 (home-page "http://www.ctan.org/pkg/unicode-data")
244 (synopsis "Unicode data and loaders for TeX")
245 (description "This bundle provides generic access to Unicode Consortium
246data for TeX use. It contains a set of text files provided by the Unicode
247Consortium which are currently all from Unicode 8.0.0, with the exception of
248@code{MathClass.txt} which is not currently part of the Unicode Character
249Database. Accompanying these source data are generic TeX loader files
250allowing this data to be used as part of TeX runs, in particular in building
251format files. Currently there are two loader files: one for general character
252set up and one for initializing XeTeX character classes as has been carried
253out to date by @code{unicode-letters.tex}. ")
254 (license license:lppl1.3c+)))
255
9e99b1b4
RW
256(define-public texlive-generic-dehyph-exptl
257 (package
258 (name "texlive-generic-dehyph-exptl")
259 (version (number->string %texlive-revision))
260 (source (origin
261 (method svn-fetch)
262 (uri (svn-reference
263 (url (string-append "svn://www.tug.org/texlive/tags/"
264 %texlive-tag "/Master/texmf-dist/"
265 "/tex/generic/dehyph-exptl"))
266 (revision %texlive-revision)))
267 (sha256
268 (base32
269 "1l9wgv99qq0ysvlxqpj4g8bl0dywbzra4g8m2kmpg2fb0i0hczap"))))
270 (build-system trivial-build-system)
271 (arguments
272 `(#:modules ((guix build utils))
273 #:builder
274 (begin
275 (use-modules (guix build utils))
276 (let ((target (string-append (assoc-ref %outputs "out")
277 "/share/texmf-dist/tex/generic/dehyph-exptl")))
278 (mkdir-p target)
279 (copy-recursively (assoc-ref %build-inputs "source") target)
280 #t))))
281 (home-page "http://projekte.dante.de/Trennmuster/WebHome")
282 (synopsis "Hyphenation patterns for German")
283 (description "The package provides experimental hyphenation patterns for
284the German language, covering both traditional and reformed orthography. The
285patterns can be used with packages Babel and hyphsubst from the Oberdiek
286bundle.")
287 ;; Hyphenation patterns are under the Expat license; documentation is
288 ;; under LPPL.
289 (license (list license:expat license:lppl))))
290
453aae66
RW
291(define-public texlive-generic-tex-ini-files
292 (package
293 (name "texlive-generic-tex-ini-files")
294 (version (number->string %texlive-revision))
295 (source (origin
296 (method svn-fetch)
297 (uri (svn-reference
298 (url (string-append "svn://www.tug.org/texlive/tags/"
299 %texlive-tag "/Master/texmf-dist/"
300 "/tex/generic/tex-ini-files"))
301 (revision %texlive-revision)))
302 (sha256
303 (base32
304 "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5"))))
305 (build-system trivial-build-system)
306 (arguments
307 `(#:modules ((guix build utils))
308 #:builder
309 (begin
310 (use-modules (guix build utils))
311 (let ((target (string-append (assoc-ref %outputs "out")
312 "/share/texmf-dist/tex/generic/tex-ini-files")))
313 (mkdir-p target)
314 (copy-recursively (assoc-ref %build-inputs "source") target)
315 #t))))
316 (home-page "http://ctan.org/pkg/tex-ini-files")
317 (synopsis "Files for creating TeX formats")
318 (description "This bundle provides a collection of model \".ini\" files
319for creating TeX formats. These files are commonly used to introduced
320distribution-dependent variations in formats. They are also used to
321allow existing format source files to be used with newer engines, for example
322to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
323 (license license:public-domain)))
324
9b134da8
RW
325(define-public texlive-generic-hyph-utf8
326 (package
327 (name "texlive-generic-hyph-utf8")
328 (version (number->string %texlive-revision))
329 (source (origin
330 (method svn-fetch)
331 (uri (svn-reference
332 (url (string-append "svn://www.tug.org/texlive/tags/"
333 %texlive-tag "/Master/texmf-dist/"
334 "/tex/generic/hyph-utf8"))
335 (revision %texlive-revision)))
336 (sha256
337 (base32
338 "0ghizcz7ps16dzfqf66wwg5i181assc6qsm0g7g5dbmp909931vi"))))
339 (build-system trivial-build-system)
340 (arguments
341 `(#:modules ((guix build utils))
342 #:builder
343 (begin
344 (use-modules (guix build utils))
345 (let ((target (string-append (assoc-ref %outputs "out")
346 "/share/texmf-dist/tex/generic/hyph-utf8")))
347 (mkdir-p target)
348 (copy-recursively (assoc-ref %build-inputs "source") target)
349 #t))))
350 (home-page "http://ctan.org/pkg/hyph-utf8")
351 (synopsis "Hyphenation patterns expressed in UTF-8")
352 (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
353hyphenation patterns in UTF-8 format, whereas older systems require
354hyphenation patterns in the 8-bit encoding of the font in use (such encodings
355are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
356etc). The present package offers a collection of conversions of existing
357patterns to UTF-8 format, together with converters for use with 8-bit fonts in
358older systems. Since hyphenation patterns for Knuthian-style TeX systems are
359only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
360converters, will completely supplant the older patterns.")
361 ;; Individual files each have their own license. Most of these files are
362 ;; independent hyphenation patterns.
363 (license (list license:lppl1.0+
364 license:lppl1.2+
365 license:lppl1.3
366 license:lppl1.3+
367 license:lppl1.3a+
368 license:lgpl2.1
369 license:lgpl2.1+
370 license:lgpl3+
371 license:gpl2+
372 license:gpl3+
373 license:mpl1.1
374 license:asl2.0
375 license:expat
376 license:bsd-3
377 license:cc0
378 license:public-domain
379 license:wtfpl2))))
380
8ada0f0b
RW
381(define-public texlive-metafont-base
382 (package
383 (name "texlive-metafont-base")
384 (version (number->string %texlive-revision))
385 (source (origin
386 (method svn-fetch)
387 (uri (svn-reference
388 (url (string-append "svn://www.tug.org/texlive/tags/"
389 %texlive-tag "/Master/texmf-dist/"
390 "/metafont"))
391 (revision %texlive-revision)))
392 (sha256
393 (base32
394 "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
395 (build-system gnu-build-system)
396 (arguments
397 `(#:tests? #f ; no test target
398 #:phases
399 (modify-phases %standard-phases
400 (delete 'configure)
401 (replace 'build
402 (lambda* (#:key inputs #:allow-other-keys)
403 (let ((cwd (getcwd)))
404 (setenv "MFINPUTS"
405 (string-append cwd "/base:"
406 cwd "/misc:"
407 cwd "/roex:"
408 cwd "/feynmf:"
409 cwd "/mfpic:"
410 cwd "/config")))
411 (mkdir "build")
412 (with-directory-excursion "build"
413 (zero? (system* "inimf" "mf.mf")))))
414 (replace 'install
415 (lambda* (#:key outputs #:allow-other-keys)
416 (let* ((out (assoc-ref outputs "out"))
417 (base (string-append out "/share/texmf-dist/web2c"))
418 (mf (string-append out "/share/texmf-dist/metafont/base")))
419 (mkdir-p base)
420 (mkdir-p mf)
421 (install-file "build/mf.base" base)
422 (copy-recursively "base" mf)
423 #t))))))
424 (native-inputs
425 `(("texlive-bin" ,texlive-bin)))
426 (home-page "http://www.ctan.org/pkg/metafont")
427 (synopsis "Metafont base files")
428 (description "This package provides the Metafont base files needed to
429build fonts using the Metafont system.")
430 (license license:knuth)))
431
3c4f1ec7
RW
432(define-public texlive-fonts-cm
433 (package
434 (name "texlive-fonts-cm")
435 (version (number->string %texlive-revision))
436 (source (origin
437 (method svn-fetch)
438 (uri (svn-reference
439 (url (string-append "svn://www.tug.org/texlive/tags/"
440 %texlive-tag "/Master/texmf-dist/"
441 "/fonts/source/public/cm"))
442 (revision %texlive-revision)))
443 (sha256
444 (base32
445 "045k5b9rdmbxpy1a3006l1x96z1rd18vg3cwrvnld9bqybw5qz44"))))
446 (build-system gnu-build-system)
447 (arguments
448 `(#:modules ((guix build gnu-build-system)
449 (guix build utils)
450 (srfi srfi-1)
451 (srfi srfi-26))
452 #:tests? #f ; no tests
453 #:phases
454 (modify-phases %standard-phases
455 (delete 'configure)
456 (replace 'build
457 (lambda* (#:key inputs #:allow-other-keys)
458 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
459 ;; Tell mf where to find mf.base
460 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
461 ;; Tell mf where to look for source files
462 (setenv "MFINPUTS"
463 (string-append (getcwd) ":"
464 mf "/share/texmf-dist/metafont/base")))
465 (mkdir "build")
466 (every (lambda (font)
467 (format #t "building font ~a\n" font)
468 (zero? (system* "mf" "-progname=mf"
469 "-output-directory=build"
470 (string-append "\\"
471 "mode:=ljfour; "
472 "mag:=1; "
473 "batchmode; "
474 "input "
475 (basename font ".mf")))))
476 (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
477 (replace 'install
478 (lambda* (#:key outputs #:allow-other-keys)
479 (let* ((out (assoc-ref outputs "out"))
480 (tfm (string-append
481 out "/share/texmf-dist/fonts/tfm/public/cm"))
482 (mf (string-append
483 out "/share/texmf-dist/fonts/source/public/cm")))
484 (for-each (cut install-file <> tfm)
485 (find-files "build" "\\.*"))
486 (for-each (cut install-file <> mf)
487 (find-files "." "\\.mf"))
488 #t))))))
489 (native-inputs
490 `(("texlive-bin" ,texlive-bin)
491 ("texlive-metafont-base" ,texlive-metafont-base)))
492 (home-page "http://www.ctan.org/pkg/cm")
493 (synopsis "Computer Modern fonts for TeX")
494 (description "This package provides the Computer Modern fonts by Donald
495Knuth. The Computer Modern font family is a large collection of text,
496display, and mathematical fonts in a range of styles, based on Monotype Modern
4978A.")
498 (license license:knuth)))
499
5ebba61a
RW
500(define-public texlive-fonts-knuth-lib
501 (package
502 (name "texlive-fonts-knuth-lib")
503 (version (number->string %texlive-revision))
504 (source (origin
505 (method svn-fetch)
506 (uri (svn-reference
507 (url (string-append "svn://www.tug.org/texlive/tags/"
508 %texlive-tag "/Master/texmf-dist/"
509 "/fonts/source/public/knuth-lib"))
510 (revision %texlive-revision)))
511 (sha256
512 (base32
513 "0in9aqyi8jkyf9d16z0li50z5fpwj1iwgwm83gmvwqcf7chfs04y"))))
514 (build-system gnu-build-system)
515 (arguments
516 `(#:modules ((guix build gnu-build-system)
517 (guix build utils)
518 (srfi srfi-26))
519 #:tests? #f ; no tests
520 #:phases
521 (modify-phases %standard-phases
522 (delete 'configure)
523 (replace 'build
524 (lambda* (#:key inputs #:allow-other-keys)
525 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
526 ;; Tell mf where to find mf.base
527 (setenv "MFBASES"
528 (string-append mf "/share/texmf-dist/web2c"))
529 ;; Tell mf where to look for source files
530 (setenv "MFINPUTS"
531 (string-append (getcwd) ":"
532 mf "/share/texmf-dist/metafont/base")))
533 (mkdir "build")
534 (zero? (system* "mf" "-progname=mf"
535 "-output-directory=build"
536 (string-append "\\"
537 "mode:=ljfour; "
538 "mag:=1; "
539 "batchmode; "
540 "input manfnt")))))
541 (replace 'install
542 (lambda* (#:key outputs #:allow-other-keys)
543 (let* ((out (assoc-ref outputs "out"))
544 (tfm (string-append
545 out "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
546 (mf (string-append
547 out "/share/texmf-dist/fonts/source/public/knuth-lib")))
548 (for-each (cut install-file <> tfm)
549 (find-files "build" "\\.*"))
550 (for-each (cut install-file <> mf)
551 (find-files "." "\\.mf"))
552 #t))))))
553 (native-inputs
554 `(("texlive-bin" ,texlive-bin)
555 ("texlive-metafont-base" ,texlive-metafont-base)))
556 (home-page "https://www.ctan.org/pkg/knuth-lib")
557 (synopsis "Small library of METAFONT sources")
558 (description "This is a collection of core TeX and METAFONT macro files
559from Donald Knuth, including the plain format, plain base, and the MF logo
560fonts.")
561 (license license:knuth)))
562
a00d5933
RW
563(define-public texlive-fonts-latex
564 (package
565 (name "texlive-fonts-latex")
566 (version (number->string %texlive-revision))
567 (source (origin
568 (method svn-fetch)
569 (uri (svn-reference
570 (url (string-append "svn://www.tug.org/texlive/tags/"
571 %texlive-tag "/Master/texmf-dist/"
572 "/fonts/source/public/latex-fonts"))
573 (revision %texlive-revision)))
574 (sha256
575 (base32
576 "0ypsm4xv9cw0jckk2qc7gi9hcmhf31mrg56pz3llyx3yd9vq2lps"))))
577 (build-system gnu-build-system)
578 (arguments
579 `(#:modules ((guix build gnu-build-system)
580 (guix build utils)
581 (srfi srfi-1)
582 (srfi srfi-26))
583 #:tests? #f ; no tests
584 #:phases
585 (modify-phases %standard-phases
586 (delete 'configure)
587 (replace 'build
588 (lambda* (#:key inputs #:allow-other-keys)
589 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
590 ;; Tell mf where to find mf.base
591 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
592 ;; Tell mf where to look for source files
593 (setenv "MFINPUTS"
594 (string-append (getcwd) ":"
595 mf "/share/texmf-dist/metafont/base:"
596 (assoc-ref inputs "texlive-fonts-cm")
597 "/share/texmf-dist/fonts/source/public/cm")))
598 (mkdir "build")
599 (every (lambda (font)
600 (format #t "building font ~a\n" font)
601 (zero? (system* "mf" "-progname=mf"
602 "-output-directory=build"
603 (string-append "\\"
604 "mode:=ljfour; "
605 "mag:=1; "
606 "batchmode; "
607 "input " font))))
608 '("icmcsc10" "icmex10" "icmmi8" "icmsy8" "icmtt8"
609 "ilasy8" "ilcmss8" "ilcmssb8" "ilcmssi8"
610 "lasy5" "lasy6" "lasy7" "lasy8" "lasy9" "lasy10" "lasyb10"
611 "lcircle10" "lcirclew10" "lcmss8" "lcmssb8" "lcmssi8"
612 "line10" "linew10"))))
613 (replace 'install
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let* ((out (assoc-ref outputs "out"))
616 (tfm (string-append
617 out "/share/texmf-dist/fonts/tfm/public/latex-fonts"))
618 (mf (string-append
619 out "/share/texmf-dist/fonts/source/public/latex-fonts")))
620 (for-each (cut install-file <> tfm)
621 (find-files "build" "\\.*"))
622 (for-each (cut install-file <> mf)
623 (find-files "." "\\.mf"))
624 #t))))))
625 (native-inputs
626 `(("texlive-bin" ,texlive-bin)
627 ("texlive-metafont-base" ,texlive-metafont-base)
628 ("texlive-fonts-cm" ,texlive-fonts-cm)))
629 (home-page "http://www.ctan.org/pkg/latex-fonts")
630 (synopsis "Collection of fonts used in LaTeX distributions")
631 (description "This is a collection of fonts for use with standard LaTeX
632packages and classes. It includes invisible fonts (for use with the slides
633class), line and circle fonts (for use in the picture environment) and LaTeX
634symbol fonts.")
635 (license license:lppl1.2+)))
636
98b4aca1
RW
637(define-public texlive-fonts-amsfonts
638 (package
639 (name "texlive-fonts-amsfonts")
640 (version (number->string %texlive-revision))
641 (source (origin
642 (method svn-fetch)
643 (uri (svn-reference
644 (url (string-append "svn://www.tug.org/texlive/tags/"
645 %texlive-tag "/Master/texmf-dist/"
646 "/fonts/source/public/amsfonts"))
647 (revision %texlive-revision)))
648 (sha256
649 (base32
650 "07h20rvpbdb4k72hzmjkyb29426zr9wxsfp6yd4ajbbpd3vx8grb"))))
651 (build-system gnu-build-system)
652 (arguments
653 `(#:modules ((guix build gnu-build-system)
654 (guix build utils)
655 (srfi srfi-1)
656 (srfi srfi-26))
657 #:tests? #f ; no tests
658 #:phases
659 (modify-phases %standard-phases
660 (delete 'configure)
661 (replace 'build
662 (lambda* (#:key inputs #:allow-other-keys)
663 (let ((mf (assoc-ref inputs "texlive-metafont-base"))
664 (cwd (getcwd)))
665 ;; Tell mf where to find mf.base
666 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
667 ;; Tell mf where to look for source files
668 (setenv "MFINPUTS"
669 (string-append cwd ":"
670 cwd "/cmextra:"
671 cwd "/cyrillic:"
672 cwd "/dummy:"
673 cwd "/symbols:"
674 mf "/share/texmf-dist/metafont/base:"
675 (assoc-ref inputs "texlive-fonts-cm")
676 "/share/texmf-dist/fonts/source/public/cm")))
677 (mkdir "build")
678 (every (lambda (font)
679 (format #t "building font ~a\n" (basename font ".mf"))
680 (with-directory-excursion (dirname font)
681 (zero? (system* "mf" "-progname=mf"
682 "-output-directory=../build"
683 (string-append "\\"
684 "mode:=ljfour; "
685 "mag:=1; "
686 "nonstopmode; "
687 "input "
688 (getcwd) "/"
689 (basename font ".mf"))))))
690 (find-files "." "[0-9]+\\.mf$"))))
691 (replace 'install
692 (lambda* (#:key outputs #:allow-other-keys)
693 (let* ((out (assoc-ref outputs "out"))
694 (tfm (string-append
695 out "/share/texmf-dist/fonts/tfm/public/amsfonts"))
696 (mf (string-append
697 out "/share/texmf-dist/fonts/source/public/amsfonts")))
698 (for-each (cut install-file <> tfm)
699 (find-files "build" "\\.*"))
700 (for-each (cut install-file <> mf)
701 (find-files "." "\\.mf"))
702 #t))))))
703 (native-inputs
704 `(("texlive-fonts-cm" ,texlive-fonts-cm)
705 ("texlive-metafont-base" ,texlive-metafont-base)
706 ("texlive-bin" ,texlive-bin)))
707 (home-page "http://www.ctan.org/pkg/amsfonts")
708 (synopsis "TeX fonts from the American Mathematical Society")
709 (description
710 "This package provides an extended set of fonts for use in mathematics,
711including: extra mathematical symbols; blackboard bold letters (uppercase
712only); fraktur letters; subscript sizes of bold math italic and bold Greek
713letters; subscript sizes of large symbols such as sum and product; added sizes
714of the Computer Modern small caps font; cyrillic fonts (from the University of
715Washington); Euler mathematical fonts. All fonts are provided as Adobe Type 1
716files, and all except the Euler fonts are provided as Metafont source. The
717distribution also includes the canonical Type 1 versions of the Computer
718Modern family of fonts. The Euler fonts are supported by separate packages;
719details can be found in the documentation.")
720 (license license:silofl1.1)))
721
137f9cbc
RW
722(define-public texlive-latex-amsfonts
723 (package
724 (name "texlive-latex-amsfonts")
725 (version (number->string %texlive-revision))
726 (source (origin
727 (method svn-fetch)
728 (uri (texlive-ref "latex" "amsfonts"))
729 (sha256
730 (base32
731 "0slzfv5h2m03b2xvm2sasznz4azh6rgi069z161dja3l8rln79hm"))))
732 (build-system texlive-build-system)
733 (arguments '(#:tex-directory "latex/amsfonts"))
734 (native-inputs
735 `(("texlive-fonts-cm" ,texlive-fonts-cm)
736 ("texlive-metafont-base" ,texlive-metafont-base)))
737 (home-page "http://www.ctan.org/pkg/amsfonts")
738 (synopsis "TeX fonts from the American Mathematical Society")
739 (description
740 "This package provides basic LaTeX support for the symbol fonts provides
741by the amsfonts package. It provides @code{amsfonts.sty}, with names of
742individual symbols defined in @code{amssymb.sty}.")
743 (license license:silofl1.1)))
744
566e95f7
RW
745;; This provides etex.src which is needed to build various formats, including
746;; luatex.fmt and pdflatex.fmt
747(define-public texlive-tex-plain
748 (package
749 (name "texlive-tex-plain")
750 (version (number->string %texlive-revision))
751 (source (origin
752 (method svn-fetch)
753 (uri (svn-reference
754 (url (string-append "svn://www.tug.org/texlive/tags/"
755 %texlive-tag "/Master/texmf-dist/"
756 "/tex/plain"))
757 (revision %texlive-revision)))
758 (sha256
759 (base32
96c336be 760 "0mjgl3gscn3ps29yjambz1j9fg81ynnncb96vpprwx4xsijhsns0"))))
566e95f7
RW
761 (build-system trivial-build-system)
762 (arguments
763 `(#:modules ((guix build utils))
764 #:builder
765 (begin
766 (use-modules (guix build utils))
767 (let ((target (string-append (assoc-ref %outputs "out")
768 "/share/texmf-dist/tex/plain")))
769 (mkdir-p target)
770 (copy-recursively (assoc-ref %build-inputs "source") target)
771 #t))))
772 (home-page "https://www.ctan.org/pkg/plain")
773 (synopsis "Plain TeX format and supporting files")
774 (description
775 "Contains files used to build the Plain TeX format, as described in the
776TeXbook, together with various supporting files (some also discussed in the
777book).")
778 (license license:knuth)))
779
010f476f
RW
780(define-public texlive-latex-base
781 (let ((texlive-dir
782 (lambda (dir hash)
783 (origin
784 (method svn-fetch)
785 (uri (svn-reference
786 (url (string-append "svn://www.tug.org/texlive/tags/"
787 %texlive-tag "/Master/texmf-dist/"
788 dir))
789 (revision %texlive-revision)))
790 (sha256 (base32 hash))))))
791 (package
792 (name "texlive-latex-base")
793 (version (number->string %texlive-revision))
794 (source (origin
795 (method svn-fetch)
796 (uri (texlive-ref "latex" "base"))
797 (sha256
798 (base32
799 "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k"))))
800 (build-system gnu-build-system)
801 (arguments
802 `(#:modules ((guix build gnu-build-system)
803 (guix build utils)
804 (ice-9 match)
805 (srfi srfi-1)
806 (srfi srfi-26))
807 #:tests? #f ; no tests
808 #:phases
809 (modify-phases %standard-phases
810 (delete 'configure)
811 (replace 'build
812 (lambda* (#:key inputs #:allow-other-keys)
813 ;; Find required fonts
814 (setenv "TFMFONTS"
815 (string-append (assoc-ref inputs "texlive-fonts-cm")
816 "/share/texmf-dist/fonts/tfm/public/cm:"
817 (assoc-ref inputs "texlive-fonts-latex")
818 "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
819 (assoc-ref inputs "texlive-fonts-knuth-lib")
820 "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
821 (setenv "TEXINPUTS"
822 (string-append
823 (getcwd) ":"
824 (getcwd) "/build:"
825 (string-join
826 (append-map (match-lambda
827 ((_ . dir)
828 (find-files dir
829 (lambda (_ stat)
830 (eq? 'directory (stat:type stat)))
831 #:directories? #t
832 #:stat stat)))
833 inputs)
834 ":")))
835
836 ;; Create an empty texsys.cfg, because latex.ltx wants to include
837 ;; it. This file must exist and it's fine if it's empty.
838 (with-output-to-file "texsys.cfg"
839 (lambda _ (format #t "%")))
840
841 (mkdir "build")
842 (mkdir "web2c")
843 (and (zero? (system* "luatex" "-ini" "-interaction=batchmode"
844 "-output-directory=build"
845 "unpack.ins"))
bd6e2385
RW
846 (zero? (system* "tex" "-ini" "-interaction=batchmode"
847 "-output-directory=web2c"
848 "tex.ini"))
849 ;; LaTeX, pdfetex/pdftex, and XeTeX require e-TeX, which
850 ;; is enabled only in extended mode (activated with a
851 ;; leading asterisk). We should not use luatex here,
852 ;; because that would make the generated format files
853 ;; incompatible with any other TeX engine.
010f476f
RW
854 (every
855 (lambda (format)
856 (zero? (system* "latex" "-ini" "-interaction=batchmode"
857 "-output-directory=web2c"
858 "-translate-file=cp227.tcx"
859 (string-append "*" format ".ini"))))
702f23b3 860 '("latex"
bd6e2385
RW
861 "pdflatex"
862 "pdfetex"))
702f23b3
RW
863 (every
864 (lambda (format)
865 (zero? (system* format "-ini" "-interaction=batchmode"
866 "-output-directory=web2c"
867 (string-append "*" format ".ini"))))
868 '("xetex"
869 "xelatex"))
010f476f
RW
870 (every
871 (lambda (format)
872 (zero? (system* "luatex" "-ini" "-interaction=batchmode"
873 "-output-directory=web2c"
874 (string-append format ".ini"))))
702f23b3 875 '("dviluatex" "dvilualatex" "luatex" "lualatex")))))
010f476f
RW
876 (replace 'install
877 (lambda* (#:key outputs #:allow-other-keys)
878 (let* ((out (assoc-ref outputs "out"))
879 (target (string-append
880 out "/share/texmf-dist/tex/latex/base"))
881 (web2c (string-append
882 out "/share/texmf-dist/web2c")))
883 (mkdir-p target)
884 (mkdir-p web2c)
885 (for-each delete-file (find-files "." "\\.(log|aux)$"))
886 (for-each (cut install-file <> target)
887 (find-files "build" ".*"))
888 (for-each (cut install-file <> web2c)
889 (find-files "web2c" ".*"))
bd6e2385
RW
890 ;; pdftex is really just the same as pdfetex, but since it
891 ;; doesn't have its own format file, we need to copy it.
892 (copy-file "web2c/pdfetex.fmt"
893 (string-append web2c "/pdftex.fmt"))
010f476f
RW
894 #t))))))
895 (native-inputs
896 `(("texlive-bin" ,texlive-bin)
897 ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
898 ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
899 ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
900 ("texlive-latex-latexconfig"
901 ,(texlive-dir "tex/latex/latexconfig/"
902 "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
903 ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)
904 ("texlive-generic-hyphen"
905 ,(texlive-dir "tex/generic/hyphen/"
906 "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
907 ("texlive-generic-ruhyphen"
908 ,(texlive-dir "tex/generic/ruhyphen/"
909 "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
910 ("texlive-generic-ukrhyph"
911 ,(texlive-dir "tex/generic/ukrhyph/"
912 "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
913 ("texlive-generic-config"
914 ,(texlive-dir "tex/generic/config/"
915 "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s"))
916 ("texlive-tex-plain" ,texlive-tex-plain)
917 ("texlive-fonts-cm" ,texlive-fonts-cm)
918 ("texlive-fonts-latex" ,texlive-fonts-latex)
919 ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
920 (home-page "http://www.ctan.org/pkg/latex-base")
921 (synopsis "Base sources of LaTeX")
922 (description
923 "This bundle comprises the source of LaTeX itself, together with several
924packages which are considered \"part of the kernel\". This bundle, together
925with the required packages, constitutes what every LaTeX distribution should
926contain.")
927 (license license:lppl1.3c+))))
928
3e485ed2
RW
929(define-public texlive-latex-filecontents
930 (package
931 (name "texlive-latex-filecontents")
932 (version (number->string %texlive-revision))
933 (source (origin
934 (method svn-fetch)
935 (uri (texlive-ref "latex" "filecontents"))
936 (sha256
937 (base32
938 "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
939 (build-system texlive-build-system)
940 (arguments '(#:tex-directory "latex/filecontents"))
941 (home-page "http://www.ctan.org/pkg/filecontents")
942 (synopsis "Extended filecontents and filecontents* environments")
943 (description
944 "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
945enable a LaTeX source file to generate external files as it runs through
946LaTeX. However, there are two limitations of these environments: they refuse
947to overwrite existing files, and they can only be used in the preamble of a
948document. The filecontents package removes these limitations, letting you
949overwrite existing files and letting you use @code{filecontents} /
950@code{filecontents*} anywhere.")
951 (license license:lppl1.3c+)))
952
1193aa89
RW
953(define-public texlive-generic-ifxetex
954 (package
955 (name "texlive-generic-ifxetex")
fea8eef3 956 (version (number->string %texlive-revision))
1193aa89
RW
957 (source (origin
958 (method svn-fetch)
959 (uri (texlive-ref "generic" "ifxetex"))
960 (sha256
961 (base32
962 "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
963 (build-system texlive-build-system)
964 (arguments
965 '(#:tex-directory "generic/ifxetex"
966 #:tex-format "xelatex"))
967 (inputs
968 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
969 (home-page "http://www.ctan.org/pkg/ifxetex")
970 (synopsis "Am I running under XeTeX?")
971 (description
972 "This is a simple package which provides an @code{\\ifxetex} conditional,
973so that other code can determine that it is running under XeTeX. The package
beb476ed 974requires the e-TeX extensions to the TeX primitive set.")
1193aa89
RW
975 (license license:lppl1.3c+)))
976
437822a1
RW
977(define-public texlive-latex-fancyvrb
978 (package
979 (name "texlive-latex-fancyvrb")
980 (version (number->string %texlive-revision))
981 (source (origin
982 (method svn-fetch)
983 (uri (texlive-ref "latex" "fancyvrb"))
984 (sha256
985 (base32
986 "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
987 (build-system texlive-build-system)
988 (arguments
989 '(#:tex-directory "latex/fancyvrb"
990 ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and
991 ;; thus texlive-luatex-lualibs.
992 #:build-targets '("fancyvrb.ins")))
993 (home-page "http://www.ctan.org/pkg/fancyvrb")
994 (synopsis "Sophisticated verbatim text")
995 (description
996 "This package provides tools for the flexible handling of verbatim text
997including: verbatim commands in footnotes; a variety of verbatim environments
998with many parameters; ability to define new customized verbatim environments;
999save and restore verbatim text and environments; write and read files in
1000verbatim mode; build \"example\" environments (showing both result and
1001verbatim source).")
1002 (license license:lppl1.0+)))
1003
4eebd2cd
RW
1004(define-public texlive-latex-graphics
1005 (package
1006 (name "texlive-latex-graphics")
1007 (version (number->string %texlive-revision))
1008 (source (origin
1009 (method svn-fetch)
1010 (uri (texlive-ref "latex" "graphics"))
1011 (sha256
1012 (base32
e3c970fc 1013 "07azyn0b1s49vbdlr6dmygrminxp72ndl24j1091hiiccvrjq3xc"))))
4eebd2cd
RW
1014 (build-system texlive-build-system)
1015 (arguments
1016 '(#:tex-directory "latex/graphics"
1017 #:phases
1018 (modify-phases %standard-phases
1019 (add-after 'install 'install-config
1020 (lambda* (#:key inputs outputs #:allow-other-keys)
1021 (let ((cfg (assoc-ref inputs "graphics-cfg"))
1022 (target (string-append (assoc-ref outputs "out")
1023 "/share/texmf-dist/tex/latex/graphics-cfg")))
1024 (mkdir-p target)
1025 (install-file (string-append cfg "/graphics.cfg") target)
1026 (install-file (string-append cfg "/color.cfg") target)
1027 #t)))
1028 (add-after 'install 'install-defs
1029 (lambda* (#:key inputs outputs #:allow-other-keys)
1030 (let ((def (assoc-ref inputs "graphics-def"))
1031 (target (string-append (assoc-ref outputs "out")
1032 "/share/texmf-dist/tex/latex/graphics-def")))
1033 (mkdir-p target)
1034 (copy-recursively def target)
1035 #t))))))
1036 (native-inputs
1037 `(("graphics-cfg"
1038 ,(origin
1039 (method git-fetch)
1040 (uri (git-reference
1041 (url "https://github.com/latex3/graphics-cfg.git")
1042 (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
1043 (sha256
1044 (base32
1045 "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
1046 ("graphics-def"
1047 ,(origin
1048 (method svn-fetch)
1049 (uri (svn-reference
1050 (url (string-append "svn://www.tug.org/texlive/tags/"
1051 %texlive-tag "/Master/texmf-dist/"
1052 "/tex/latex/graphics-def"))
1053 (revision %texlive-revision)))
1054 (sha256
1055 (base32
51c15375 1056 "0gi4qv6378nl84s8n1yx3hjqvv7r4lza7hpbymbl5rzwgw8qrnyb"))))))
4eebd2cd
RW
1057 (home-page "http://www.ctan.org/pkg/latex-graphics")
1058 (synopsis "LaTeX standard graphics bundle")
1059 (description
1060 "This is a collection of LaTeX packages for producing color, including
1061graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
1062documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
1063keyval, and lscape.")
1064 ;; The configuration files are released under CC0.
1065 (license (list license:lppl1.3c+
1066 license:cc0))))
1067
f5a6af42
RW
1068(define-public texlive-latex-xcolor
1069 (package
1070 (name "texlive-latex-xcolor")
1071 (version (number->string %texlive-revision))
1072 (source (origin
1073 (method svn-fetch)
1074 (uri (texlive-ref "latex" "xcolor"))
1075 (sha256
1076 (base32
1077 "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
1078 (build-system texlive-build-system)
1079 (arguments '(#:tex-directory "latex/xcolor"))
1080 (home-page "http://www.ctan.org/pkg/xcolor")
1081 (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
1082 (description
1083 "The package starts from the basic facilities of the colorcolor package,
1084and provides easy driver-independent access to several kinds of color tints,
1085shades, tones, and mixes of arbitrary colors. It allows a user to select a
1086document-wide target color model and offers complete tools for conversion
1087between eight color models. Additionally, there is a command for alternating
1088row colors plus repeated non-aligned material (like horizontal lines) in
1089tables.")
1090 (license license:lppl1.2+)))
1091
4d660fdf
RW
1092(define-public texlive-latex-hyperref
1093 (package
1094 (name "texlive-latex-hyperref")
1095 (version "6.84a2")
1096 ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
1097 ;; so we fetch the release from GitHub.
1098 (source (origin
1099 (method url-fetch)
1100 (uri (string-append "https://github.com/ho-tex/hyperref/"
1101 "archive/release-" version ".tar.gz"))
1102 (file-name (string-append name "-" version ".tar.gz"))
1103 (sha256
1104 (base32
1105 "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
1106 (build-system texlive-build-system)
1107 (arguments '(#:tex-directory "latex/hyperref"))
1108 (home-page "http://www.ctan.org/pkg/hyperref")
1109 (synopsis "Extensive support for hypertext in LaTeX")
1110 (description
1111 "The hyperref package is used to handle cross-referencing commands in
1112LaTeX to produce hypertext links in the document. The package provides
1113backends for the special set defined for HyperTeX DVI processors; for embedded
1114pdfmark commands for processing by Acrobat Distiller (dvips and dvipsone); for
1115dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX
1116pdf and HTML backends. The package is distributed with the backref and
1117nameref packages, which make use of the facilities of hyperref.")
1118 (license license:lppl1.3+)))
1119
c3455b7d
RW
1120(define-public texlive-latex-oberdiek
1121 (package
1122 (name "texlive-latex-oberdiek")
1123 (version (number->string %texlive-revision))
1124 (source (origin
1125 (method svn-fetch)
1126 (uri (texlive-ref "latex" "oberdiek"))
1127 (sha256
1128 (base32
1129 "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf"))))
1130 (build-system texlive-build-system)
1131 (arguments
1132 '(#:tex-directory "latex/oberdiek"
05d28068 1133 #:build-targets '("oberdiek.ins")
c3455b7d
RW
1134 #:phases
1135 (modify-phases %standard-phases
05d28068 1136 ;; "ifpdf.ins" is not generated, so we need to process the dtx file.
c3455b7d
RW
1137 (add-after 'unpack 'do-not-process-ifpdf.ins
1138 (lambda _
1139 (substitute* "oberdiek.ins"
05d28068 1140 (("ifpdf.ins") "ifpdf.dtx"))
c3455b7d
RW
1141 #t)))))
1142 (home-page "http://www.ctan.org/pkg/oberdiek")
1143 (synopsis "Bundle of packages submitted by Heiko Oberdiek")
1144 (description
1145 "The bundle comprises various LaTeX packages, providing among others:
1146better accessibility support for PDF files; extensible chemists reaction
1147arrows; record information about document class(es) used; and many more.")
1148 (license license:lppl1.3+)))
1149
f2536af2
RW
1150(define-public texlive-latex-tools
1151 (package
1152 (name "texlive-latex-tools")
1153 (version (number->string %texlive-revision))
1154 (source (origin
1155 (method svn-fetch)
1156 (uri (texlive-ref "latex" "tools"))
1157 (sha256
1158 (base32
1159 "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz"))))
1160 (build-system texlive-build-system)
1161 (arguments
1162 '(#:tex-directory "latex/tools"
1163 #:build-targets '("tools.ins")))
1164 (home-page "http://www.ctan.org/pkg/latex-tools")
1165 (synopsis "LaTeX standard tools bundle")
1166 (description
1167 "This package is a collection of (variously) simple tools provided as
1168part of the LaTeX required tools distribution, comprising the following
1169packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
1170fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
1171rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
1172xr, and xspace.")
1173 (license license:lppl1.3+)))
1174
35adcc3a
RW
1175(define-public texlive-latex-url
1176 (package
1177 (name "texlive-latex-url")
1178 (version (number->string %texlive-revision))
1179 (source (origin
1180 (method svn-fetch)
1181 (uri (svn-reference
1182 (url (string-append "svn://www.tug.org/texlive/tags/"
1183 %texlive-tag "/Master/texmf-dist/"
1184 "/tex/latex/url"))
1185 (revision %texlive-revision)))
1186 (sha256
1187 (base32
1188 "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
1189 (build-system trivial-build-system)
1190 (arguments
1191 `(#:modules ((guix build utils))
1192 #:builder
1193 (begin
1194 (use-modules (guix build utils))
1195 (let ((target (string-append (assoc-ref %outputs "out")
1196 "/share/texmf-dist/tex/latex/url")))
1197 (mkdir-p target)
1198 (copy-recursively (assoc-ref %build-inputs "source") target)
1199 #t))))
1200 (home-page "https://www.ctan.org/pkg/url")
1201 (synopsis "Verbatim with URL-sensitive line breaks")
1202 (description "The command @code{\\url} is a form of verbatim command that
1203allows linebreaks at certain characters or combinations of characters, accepts
1204reconfiguration, and can usually be used in the argument to another command.
1205The command is intended for email addresses, hypertext links,
1206directories/paths, etc., which normally have no spaces, so by default the
1207package ignores spaces in its argument. However, a package option allows
1208spaces, which is useful for operating systems where spaces are a common part
1209of file names.")
1210 ;; The license header states that it is under LPPL version 2 or later, but
1211 ;; the latest version is 1.3c.
1212 (license license:lppl1.3c+)))
1213
a5b1ef84
RW
1214(define-public texlive-latex-l3kernel
1215 (package
1216 (name "texlive-latex-l3kernel")
1217 (version (number->string %texlive-revision))
1218 (source (origin
1219 (method svn-fetch)
1220 (uri (texlive-ref "latex" "l3kernel"))
1221 (sha256
1222 (base32
1f7d1010 1223 "0r0wfk594j8wkdqhh21haimwsfq8x5jch4ldm21hkzk5dnmvpbg6"))))
a5b1ef84
RW
1224 (build-system texlive-build-system)
1225 (arguments
1226 '(#:tex-directory "latex/l3kernel"))
1227 (home-page "http://www.ctan.org/pkg/l3kernel")
1228 (synopsis "LaTeX3 programmers’ interface")
1229 (description
1230 "The l3kernel bundle provides an implementation of the LaTeX3
1231programmers’ interface, as a set of packages that run under LaTeX 2e. The
1232interface provides the foundation on which the LaTeX3 kernel and other future
1233code are built: it is an API for TeX programmers. The packages are set up so
1234that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
1235 (license license:lppl1.3c+)))
1236
cc09d48b
RW
1237(define-public texlive-latex-l3packages
1238 (package
1239 (name "texlive-latex-l3packages")
1240 (version (number->string %texlive-revision))
1241 (source (origin
1242 (method svn-fetch)
1243 (uri (texlive-ref "latex" "l3packages"))
1244 (sha256
1245 (base32
83474718 1246 "16jplkvzdysfssijq9l051nsks65c2nrarsl17k8gjhc28yznj8y"))))
cc09d48b
RW
1247 (build-system texlive-build-system)
1248 (arguments
1249 '(#:tex-directory "latex/l3packages"
1250 #:phases
1251 (modify-phases %standard-phases
1252 ;; All package sources are in sub-directories, so we need to add them
1253 ;; to TEXINPUTS.
1254 (add-after 'unpack 'set-TEXINPUTS
1255 (lambda _
1256 (let ((cwd (getcwd)))
1257 (setenv "TEXINPUTS"
1258 (string-append cwd "/l3keys2e:"
1259 cwd "/xparse:"
1260 cwd "/xfrac:"
1261 cwd "/xfp:"
1262 cwd "/xtemplate")))
1263 #t)))))
1264 (inputs
1265 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1266 (home-page "http://www.ctan.org/pkg/l3packages")
1267 (synopsis "High-level LaTeX3 concepts")
1268 (description
1269 "This bundle holds prototype implementations of concepts for a LaTeX
1270designer interface, to be used with the experimental LaTeX kernel as
1271programming tools and kernel sup­port. Packages provided in this release are:
1272
1273@enumerate
1274@item l3keys2e, which makes the facilities of the kernel module l3keys
1275 available for use by LaTeX 2e packages;
1276@item xfrac, which provides flexible splitlevel fractions;
1277@item xparse, which provides a high-level interface for declaring document
1278 commands; and
1279@item xtemplate, which provides a means of defining generic functions using a
1280 key-value syntax.
1281@end enumerate\n")
1282 (license license:lppl1.3c+)))
1283
58308491
RW
1284(define-public texlive-latex-fontspec
1285 (package
1286 (name "texlive-latex-fontspec")
1287 (version (number->string %texlive-revision))
1288 (source (origin
1289 (method svn-fetch)
1290 (uri (texlive-ref "latex" "fontspec"))
1291 (sha256
1292 (base32
1293 "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q"))))
1294 (build-system texlive-build-system)
1295 (arguments
1296 '(#:tex-directory "latex/fontspec"
1297 #:build-targets '("fontspec.dtx")))
1298 (inputs
1299 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1300 (home-page "http://www.ctan.org/pkg/fontspec")
1301 (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
1302 (description
1303 "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
1304automatic and unified interface to feature-rich AAT and OpenType fonts through
1305the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
1306the l3kernel and xparse bundles from the LaTeX 3 development team.")
1307 (license license:lppl1.3+)))
1308
e93f472d
RW
1309;; The SVN directory contains little more than a dtx file that generates three
1310;; of the many lua files that should be installed as part of this package.
1311;; This is why we take the release from GitHub instead.
1312(define-public texlive-luatex-lualibs
1313 (package
1314 (name "texlive-luatex-lualibs")
1315 (version "2.5")
1316 (source (origin
1317 (method url-fetch)
1318 (uri (string-append "https://github.com/lualatex/lualibs/"
1319 "releases/download/v"
1320 version "/lualibs.zip"))
1321 (sha256
1322 (base32
1323 "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy"))))
1324 (build-system gnu-build-system)
1325 (arguments
1326 `(#:make-flags
1327 (list (string-append "DESTDIR="
1328 (assoc-ref %outputs "out")
1329 "/share/texmf-dist"))
1330 #:phases
1331 (modify-phases %standard-phases
1332 (delete 'configure))))
1333 (native-inputs
1334 `(("texlive-bin" ,texlive-bin)
1335 ("unzip" ,unzip)
1336 ("zip" ,zip)))
1337 (home-page "https://github.com/lualatex/lualibs")
1338 (synopsis "Lua modules for general programming (in the (La)TeX world)")
1339 (description
1340 "Lualibs is a collection of Lua modules useful for general programming.
1341The bundle is based on Lua modules shipped with ConTeXt, and made available in
1342this bundle for use independent of ConTeXt.")
1343 ;; GPL version 2 only
1344 (license license:gpl2)))
1345
2573163a
RW
1346(define-public texlive-latex-amsmath
1347 (package
1348 (name "texlive-latex-amsmath")
1349 (version (number->string %texlive-revision))
1350 (source (origin
1351 (method svn-fetch)
1352 (uri (texlive-ref "latex" "amsmath"))
1353 (sha256
1354 (base32
1355 "178ywjpdlv78qmfzqdyn6gy14620zjsn2q9wap76fbr9s4hw6dba"))))
1356 (build-system texlive-build-system)
1357 (arguments '(#:tex-directory "latex/amsmath"))
1358 (home-page "http://www.ctan.org/pkg/amsmath")
1359 (synopsis "AMS mathematical facilities for LaTeX")
1360 (description
1361 "This is the principal package in the AMS-LaTeX distribution. It adapts
1362for use in LaTeX most of the mathematical features found in AMS-TeX; it is
1363highly recommended as an adjunct to serious mathematical typesetting in LaTeX.
1364When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold
1365symbols), @code{amsopnamsopn} (for operator names) and
1366@code{amstextamstext} (for text embedded in mathematics) are also loaded.
1367This package is part of the LaTeX required distribution; however, several
1368contributed packages add still further to its appeal; examples are
1369@code{empheqempheq}, which provides functions for decorating and highlighting
1370mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar)
1371definitions.")
1372 (license license:lppl1.3c+)))
1373
18e366e8
RW
1374(define-public texlive-latex-amscls
1375 (package
1376 (name "texlive-latex-amscls")
1377 (version (number->string %texlive-revision))
1378 (source (origin
1379 (method svn-fetch)
1380 (uri (texlive-ref "latex" "amscls"))
1381 (sha256
1382 (base32
1383 "0jmcr37mcdi7drczppvr6lmz5d5yd9m67ii79gp2nglg1xpw934j"))))
1384 (build-system texlive-build-system)
1385 (arguments
1386 `(#:tex-directory "latex/amscls"))
1387 (home-page "http://www.ctan.org/pkg/amscls")
1388 (synopsis "AMS document classes for LaTeX")
1389 (description
1390 "This bundle contains three AMS classes: @code{amsartamsart} (for writing
1391articles for the AMS), @code{amsbookamsbook} (for books) and
1392@code{amsprocamsproc} (for proceedings), together with some supporting
1393material. The material is made available as part of the AMS-LaTeX
1394distribution.")
1395 (license license:lppl1.3c+)))
1396
f84d5a09
RW
1397(define-public texlive-latex-babel
1398 (package
1399 (name "texlive-latex-babel")
1400 (version (number->string %texlive-revision))
1401 (source (origin
1402 (method svn-fetch)
1403 (uri (texlive-ref "latex" "babel"))
1404 (sha256
1405 (base32
1406 "1n3i5adsyy7jw0imnzrm2i8wkf73i3mjk9h3ic8cb9cd19i4r9r3"))))
1407 (build-system texlive-build-system)
1408 (arguments
1409 '(#:tex-directory "latex/babel"
1410 #:phases
1411 (modify-phases %standard-phases
1412 ;; This package tries to produce babel.aux twice but refuses to
1413 ;; overwrite the first one.
1414 (add-before 'build 'fix-ins
1415 (lambda _
1416 (substitute* "babel.ins"
1417 (("askonceonly") "askforoverwritefalse"))
1418 #t)))))
1419 (home-page "http://www.ctan.org/pkg/babel")
1420 (synopsis "Multilingual support for Plain TeX or LaTeX")
1421 (description
1422 "The package manages culturally-determined typographical (and other)
1423rules, and hyphenation patterns for a wide range of languages. A document may
1424select a single language to be supported, or it may select several, in which
1425case the document may switch from one language to another in a variety of
1426ways. Babel uses contributed configuration files that provide the detail of
1427what has to be done for each language. Users of XeTeX are advised to use the
1428polyglossia package rather than Babel.")
1429 (license license:lppl1.3+)))
1430
93286d38
RW
1431(define-public texlive-latex-cyrillic
1432 (package
1433 (name "texlive-latex-cyrillic")
1434 (version (number->string %texlive-revision))
1435 (source (origin
1436 (method svn-fetch)
1437 (uri (texlive-ref "latex" "cyrillic"))
1438 (sha256
1439 (base32
1440 "1mdhl35hwas68ki56qqngzar37dwv4mm64l2canihr255bz34lbv"))))
1441 (build-system texlive-build-system)
1442 (arguments
1443 '(#:tex-directory "latex/cyrillic"))
1444 (home-page "http://www.ctan.org/pkg/latex-cyrillic")
1445 (synopsis "Support for Cyrillic fonts in LaTeX")
1446 (description
1447 "This bundle of macros files provides macro support (including font
1448encoding macros) for the use of Cyrillic characters in fonts encoded under the
1449T2* and X2 encodings. These encodings cover (between them) pretty much every
1450language that is written in a Cyrillic alphabet.")
1451 (license license:lppl1.3c+)))
1452
83fe6231
RW
1453(define-public texlive-latex-psnfss
1454 (package
1455 (name "texlive-latex-psnfss")
1456 (version (number->string %texlive-revision))
1457 (source (origin
1458 (method svn-fetch)
1459 (uri (texlive-ref "latex" "psnfss"))
1460 (sha256
1461 (base32
1462 "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz"))))
1463 (build-system texlive-build-system)
1464 (arguments '(#:tex-directory "latex/psnfss"))
1465 (home-page "http://www.ctan.org/pkg/psnfss")
1466 (synopsis "Font support for common PostScript fonts")
1467 (description
1468 "The PSNFSS collection includes a set of files that provide a complete
1469working setup of the LaTeX font selection scheme (NFSS2) for use with common
1470PostScript fonts. It covers the so-called \"Base\" fonts (which are built
1471into any Level 2 PostScript printing device and the Ghostscript interpreter)
1472and a number of free fonts. It provides font definition files, macros and
1473font metrics. The bundle as a whole is part of the LaTeX required set of
1474packages.")
1475 (license license:lppl1.2+)))
1476
cb7bc20a
RW
1477(define-public texlive-union
1478 (lambda* (#:optional (packages '()))
1479 "Return 'texlive-union' package which is a union of PACKAGES and the
1480standard LaTeX packages."
1481 (let ((default-packages
1482 (list texlive-bin
1483 texlive-dvips
1484 texlive-fonts-cm
1485 texlive-fonts-latex
1486 texlive-metafont-base
1487 texlive-latex-base
1488 ;; LaTeX packages from the "required" set.
1489 texlive-latex-amsmath
1490 texlive-latex-amscls
1491 texlive-latex-babel
1492 texlive-latex-cyrillic
1493 texlive-latex-graphics
1494 texlive-latex-psnfss
1495 texlive-latex-tools)))
1496 (package
1497 (name "texlive-union")
1498 (version (number->string %texlive-revision))
1499 (source #f)
1500 (build-system trivial-build-system)
1501 (arguments
1502 '(#:modules ((guix build union)
1503 (guix build utils)
1504 (guix build texlive-build-system)
1505 (guix build gnu-build-system)
1506 (guix build gremlin)
1507 (guix elf))
1508 #:builder
1509 (begin
1510 (use-modules (ice-9 match)
1511 (srfi srfi-26)
1512 (guix build union)
1513 (guix build utils)
1514 (guix build texlive-build-system))
1515 (let* ((out (assoc-ref %outputs "out"))
1516 (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf")))
1517 ;; Build a modifiable union of all inputs (but exclude bash)
1518 (match (filter (match-lambda
1519 ((name . _)
1520 (not (string=? "bash" name))))
1521 %build-inputs)
1522 (((names . directories) ...)
1523 (union-build (assoc-ref %outputs "out")
1524 directories
1525 #:create-all-directories? #t)))
1526
1527 ;; The configuration file "texmf.cnf" is provided by the
1528 ;; "texlive-bin" package. We take it and override only the
1529 ;; setting for TEXMFROOT and TEXMF. This file won't be consulted
1530 ;; by default, though, so we still need to set TEXMFCNF.
1531 (substitute* texmf.cnf
1532 (("^TEXMFROOT = .*")
1533 (string-append "TEXMFROOT = " out "/share\n"))
1534 (("^TEXMF = .*")
1535 "TEXMF = $TEXMFROOT/share/texmf-dist\n"))
1536 (setenv "PATH" (string-append (assoc-ref %build-inputs "bash")
1537 "/bin"))
1538 (for-each
1539 (cut wrap-program <>
1540 `("TEXMFCNF" ":" = (,(dirname texmf.cnf)))
1541 `("TEXMF" ":" = (,(string-append out "/share/texmf-dist"))))
1542 (find-files (string-append out "/bin") ".*"))
1543 #t))))
1544 (inputs
1545 `(("bash" ,bash)
1546 ,@(map (lambda (package)
1547 (list (package-name package) package))
1548 (append default-packages packages))))
1549 (home-page (package-home-page texlive-bin))
1550 (synopsis "Union of TeX Live packages")
1551 (description "This package provides a subset of the TeX Live
1552distribution.")
1553 (license (fold (lambda (package result)
1554 (match (package-license package)
1555 ((lst ...)
1556 (append lst result))
1557 ((? license:license? license)
1558 (cons license result))))
1559 '()
1560 (append default-packages packages)))))))
1561
9d4f8dc2
RW
1562(define-public texlive-tiny
1563 (package
1564 (inherit (texlive-union))
1565 (name "texlive-tiny")
1566 (description "This is a very limited subset of the TeX Live distribution.
1567It includes little more than the required set of LaTeX packages.")))
1568
9b416042
RW
1569(define-public texlive-latex-natbib
1570 (package
1571 (name "texlive-latex-natbib")
1572 (version (number->string %texlive-revision))
1573 (source (origin
1574 (method svn-fetch)
1575 (uri (texlive-ref "latex" "natbib"))
1576 (sha256
1577 (base32
1578 "0aqliq0nwblxyrzhwhv77pnmk7qh2y3prgq7z7qhwcbgz5kisld7"))))
1579 (build-system texlive-build-system)
1580 (arguments '(#:tex-directory "latex/natbib"))
1581 (home-page "http://www.ctan.org/pkg/natbib")
1582 (synopsis "Flexible bibliography support")
1583 (description
1584 "This bundle provides a package that implements both author-year and
1585numbered references, as well as much detailed of support for other
1586bibliography use. Also provided are versions of the standard BibTeX styles
1587that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat},
1588@code{abbrnat}. The bibliography styles produced by @code{custom-bib} are
1589designed from the start to be compatible with @code{natbib}.")
1590 (license license:lppl)))
1591
171160d5
RW
1592(define-public texlive-latex-seminar
1593 (package
1594 (name "texlive-latex-seminar")
1595 (version (number->string %texlive-revision))
1596 (source (origin
1597 (method svn-fetch)
1598 (uri (svn-reference
1599 (url (string-append "svn://www.tug.org/texlive/tags/"
1600 %texlive-tag "/Master/texmf-dist/"
1601 "/tex/latex/seminar"))
1602 (revision %texlive-revision)))
1603 (sha256
1604 (base32
1605 "0y4i651b75y6006n03x8n86bsqvjsailvvz9bhzy51dzsznqidq0"))))
1606 (build-system texlive-build-system)
1607 (arguments '(#:tex-directory "latex/seminar"))
1608 (home-page "http://www.ctan.org/pkg/seminar")
1609 (synopsis "Make overhead slides")
1610 ;; TODO: This package may need fancybox and xcomment at runtime.
1611 (description
1612 "This package provides a class that produces overhead
1613slides (transparencies), with many facilities. Seminar is not nowadays
1614reckoned a good basis for a presentation — users are advised to use more
1615recent classes such as powerdot or beamer, both of which are tuned to
161621st-century presentation styles.")
1617 (license license:lppl1.2+)))
1618
9f86ef85
RW
1619(define-public texlive-latex-hyperref
1620 (package
1621 (name "texlive-latex-hyperref")
1622 (version (number->string %texlive-revision))
1623 (source (origin
1624 (method svn-fetch)
1625 (uri (texlive-ref "latex" "hyperref"))
1626 (sha256
1627 (base32
1628 "03arf3xvz1jsbvlpgc5qxbxbl9wmk8k09cn6b8gv9pzgpjy4vx4j"))))
1629 (build-system texlive-build-system)
1630 (arguments
1631 '(#:tex-directory "latex/hyperref"
1632 #:phases
1633 (modify-phases %standard-phases
1634 (add-after 'unpack 'remove-hluatex.def
1635 (lambda _
1636 ;; This depends on hluatex.dtx, which does not exist and is
1637 ;; nowhere to be found in the sources of the TeX Live
1638 ;; distribution.
1639 (substitute* "hyperref.ins"
1640 (("\\\\file\\{hluatex.def\\}.*") ""))
1641 #t)))))
1642 ;; The package depends on the kvoptions, ltxcmds, and refcount packages,
1643 ;; which are part of the oberdiek bundle.
1644 (inputs
1645 `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek)))
1646 (home-page "http://www.ctan.org/pkg/hyperref")
1647 (synopsis "Extensive support for hypertext in LaTeX")
1648 (description
1649 "The @code{hyperref} package is used to handle cross-referencing commands
1650in LaTeX to produce hypertext links in the document. The package provides
1651backends for the @code{\\special} set defined for HyperTeX DVI processors; for
1652embedded @code{pdfmark} commands for processing by Acrobat
1653Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo};
1654for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's
1655pdf and HTML backends. The package is distributed with the @code{backref} and
1656@code{nameref} packages, which make use of the facilities of @code{hyperref}.")
1657 (license license:lppl1.3+)))
1658
a0aa6b59
RW
1659(define-public texlive-tex-texinfo
1660 (package
1661 (name "texlive-tex-texinfo")
1662 (version (number->string %texlive-revision))
1663 (source (origin
1664 (method svn-fetch)
1665 (uri (svn-reference
1666 (url (string-append "svn://www.tug.org/texlive/tags/"
1667 %texlive-tag "/Master/texmf-dist/"
1668 "/tex/texinfo"))
1669 (revision %texlive-revision)))
1670 (sha256
1671 (base32
1672 "09zj2w3lx0y6i2syfjjgizahf86z301dw8p37ln6syfhqhzqdz46"))))
1673 (build-system trivial-build-system)
1674 (arguments
1675 `(#:modules ((guix build utils))
1676 #:builder
1677 (begin
1678 (use-modules (guix build utils))
1679 (let ((target (string-append (assoc-ref %outputs "out")
1680 "/share/texmf-dist/tex/texinfo")))
1681 (mkdir-p target)
1682 (copy-recursively (assoc-ref %build-inputs "source") target)
1683 #t))))
1684 (home-page "http://www.ctan.org/pkg/texinfo")
1685 (synopsis "TeX macros to handle Texinfo files")
1686 (description
1687 "Texinfo is the preferred format for documentation in the GNU project;
1688the format may be used to produce online or printed output from a single
1689source. The Texinfo macros may be used to produce printable output using TeX;
1690other programs in the distribution offer online interactive use (with
1691hypertext linkages in some cases).")
1692 (license license:gpl3+)))
1693
bda61541
RW
1694(define-public texlive-latex-anysize
1695 (package
1696 (name "texlive-latex-anysize")
1697 (version (number->string %texlive-revision))
1698 (source (origin
1699 (method svn-fetch)
1700 (uri (svn-reference
1701 (url (string-append "svn://www.tug.org/texlive/tags/"
1702 %texlive-tag "/Master/texmf-dist/"
1703 "/tex/latex/anysize"))
1704 (revision %texlive-revision)))
1705 (sha256
1706 (base32
1707 "19khwqjlvznc955sijhww3c4zbb0053rvzwv9nz738qknq7y18vb"))))
1708 (build-system trivial-build-system)
1709 (arguments
1710 `(#:modules ((guix build utils))
1711 #:builder
1712 (begin
1713 (use-modules (guix build utils))
1714 (let ((target (string-append (assoc-ref %outputs "out")
1715 "/share/texmf-dist/tex/latex/anysize")))
1716 (mkdir-p target)
1717 (copy-recursively (assoc-ref %build-inputs "source") target)
1718 #t))))
1719 (home-page "http://www.ctan.org/pkg/anysize")
1720 (synopsis "Simple package to set up document margins")
1721 (description
1722 "This is a simple package to set up document margins. This package is
1723considered obsolete; alternatives are the @code{typearea} package from the
1724@code{koma-script} bundle, or the @code{geometry} package.")
1725 (license license:public-domain)))
1726
8bcdc23f 1727(define texlive-texmf
0aa34e82
AE
1728 (package
1729 (name "texlive-texmf")
7a15a68f 1730 (version "2016")
0aa34e82
AE
1731 (source texlive-texmf-src)
1732 (build-system gnu-build-system)
1733 (inputs
1734 `(("texlive-bin" ,texlive-bin)
1735 ("lua" ,lua)
1736 ("perl" ,perl)
1737 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
1738 ("ruby" ,ruby)
1739 ("tcsh" ,tcsh)))
1740 (arguments
1741 `(#:modules ((guix build gnu-build-system)
1742 (guix build utils)
1743 (srfi srfi-26))
a348af40
LC
1744
1745 ;; This package takes 4 GiB, which we can't afford to distribute from
1746 ;; our servers.
1747 #:substitutable? #f
1748
0aa34e82 1749 #:phases
4a6635f3
AE
1750 (modify-phases (map (cut assq <> %standard-phases)
1751 '(set-paths unpack patch-source-shebangs))
1752 (add-after 'patch-source-shebangs 'install
1753 (lambda* (#:key outputs #:allow-other-keys)
1754 (let ((share (string-append (assoc-ref outputs "out") "/share")))
1755 (mkdir-p share)
1756 (system* "mv" "texmf-dist" share))))
1757 (add-after 'install 'texmf-config
1758 (lambda* (#:key inputs outputs #:allow-other-keys)
1759 (let* ((out (assoc-ref outputs "out"))
1760 (share (string-append out "/share"))
1761 (texmfroot (string-append share "/texmf-dist/web2c"))
1762 (texmfcnf (string-append texmfroot "/texmf.cnf"))
1763 (texlive-bin (assoc-ref inputs "texlive-bin"))
1764 (texbin (string-append texlive-bin "/bin"))
1765 (tlpkg (string-append texlive-bin "/share/tlpkg")))
1766 ;; Register SHARE as TEXMFROOT in texmf.cnf.
1767 (substitute* texmfcnf
1768 (("TEXMFROOT = \\$SELFAUTOPARENT")
2d634d9b
FB
1769 (string-append "TEXMFROOT = " share))
1770 (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
1771 "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
1772 (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
4a6635f3
AE
1773 ;; Register paths in texmfcnf.lua, needed for context.
1774 (substitute* (string-append texmfroot "/texmfcnf.lua")
1775 (("selfautodir:") out)
1776 (("selfautoparent:") (string-append share "/")))
1777 ;; Set path to TeXLive Perl modules
1778 (setenv "PERL5LIB"
1779 (string-append (getenv "PERL5LIB") ":" tlpkg))
1780 ;; Configure the texmf-dist tree; inspired from
1781 ;; http://slackbuilds.org/repository/13.37/office/texlive/
1782 (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
1783 (setenv "TEXMFCNF" texmfroot)
1784 (system* "updmap-sys" "--nohash" "--syncwithtrees")
1785 (system* "mktexlsr")
1786 (system* "fmtutil-sys" "--all")))))))
7a15a68f 1787 (properties `((max-silent-time . 9600))) ; don't time out while grafting
0aa34e82 1788 (synopsis "TeX Live, a package of the TeX typesetting system")
eb0119ef
AE
1789 (description
1790 "TeX Live provides a comprehensive TeX document production system.
1791It includes all the major TeX-related programs, macro packages, and fonts
1792that are free software, including support for many languages around the
0aa34e82
AE
1793world.
1794
1795This package contains the complete tree of texmf-dist data.")
132e14b4
EF
1796 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
1797 (home-page "https://www.tug.org/texlive/")))
0aa34e82
AE
1798
1799(define-public texlive
1800 (package
1801 (name "texlive")
7a15a68f 1802 (version "2016")
0aa34e82
AE
1803 (source #f)
1804 (build-system trivial-build-system)
1805 (inputs `(("bash" ,bash) ; for wrap-program
1806 ("texlive-bin" ,texlive-bin)
1807 ("texlive-texmf" ,texlive-texmf)))
2d634d9b
FB
1808 (native-search-paths
1809 (list (search-path-specification
1810 (variable "TEXMFLOCAL")
1811 (files '("share/texmf-local")))))
0aa34e82
AE
1812 (arguments
1813 `(#:modules ((guix build utils))
1814 #:builder
1815 ;; Build the union of texlive-bin and texlive-texmf, but take the
1816 ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
1817 (begin
1818 (use-modules (guix build utils))
1819 (let ((out (assoc-ref %outputs "out"))
1820 (bin (assoc-ref %build-inputs "texlive-bin"))
1821 (texmf (assoc-ref %build-inputs "texlive-texmf"))
1822 (bash (assoc-ref %build-inputs "bash")))
1823 (mkdir out)
1824 (with-directory-excursion out
1825 (for-each
1826 (lambda (name)
1827 (symlink (string-append bin "/" name) name))
1828 '("include" "lib"))
1829 (mkdir "bin")
1830 (with-directory-excursion "bin"
1831 (setenv "PATH" (string-append bash "/bin"))
1832 (for-each
1833 (lambda (name)
1834 (symlink name (basename name))
1835 (wrap-program
1836 (basename name)
1837 `("TEXMFCNF" =
1838 (,(string-append texmf "/share/texmf-dist/web2c")))))
1839 (find-files (string-append bin "/bin/") "")))
1840 (mkdir "share")
1841 (with-directory-excursion "share"
1842 (for-each
1843 (lambda (name)
1844 (symlink (string-append bin "/share/" name) name))
1845 '("info" "man" "tlpkg"))
1846 (for-each
1847 (lambda (name)
1848 (symlink (string-append texmf "/share/" name) name))
1849 '("texmf-dist" "texmf-var"))))))))
1850 (synopsis "TeX Live, a package of the TeX typesetting system")
1851 (description
1852 "TeX Live provides a comprehensive TeX document production system.
1853It includes all the major TeX-related programs, macro packages, and fonts
1854that are free software, including support for many languages around the
1855world.
1856
1857This package contains the complete TeX Live distribution.")
132e14b4
EF
1858 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
1859 (home-page "https://www.tug.org/texlive/")))
231eae53 1860
6b5eb840
AE
1861
1862;; texlive-texmf-minimal is a pruned, small version of the texlive tree,
a348af40
LC
1863;; in particular dropping documentation and fonts. It weighs in at 470 MiB
1864;; instead of 4 GiB.
6b5eb840
AE
1865(define texlive-texmf-minimal
1866 (package (inherit texlive-texmf)
1867 (name "texlive-texmf-minimal")
1868 (arguments
1869 (substitute-keyword-arguments
1870 (package-arguments texlive-texmf)
1871 ((#:modules modules)
1872 `((ice-9 ftw)
1873 (srfi srfi-1)
1874 ,@modules))
1875 ((#:phases phases)
1876 `(modify-phases ,phases
1877 (add-after 'unpack 'prune
1878 (lambda _
1879 (define (delete subdir exclude)
1880 "Delete all files and directories in SUBDIR except for those
1881given in the list EXCLUDE."
1882 (with-directory-excursion subdir
1883 (for-each delete-file-recursively
1884 (lset-difference equal?
1885 (scandir ".")
1886 (append '("." "..")
1887 exclude)))))
1888 (with-directory-excursion "texmf-dist"
1889 (for-each delete-file-recursively
1890 '("doc" "source" "tex4ht"))
1891 ;; Delete all subdirectories of "fonts", except for "tfm" and
1892 ;; any directories named "cm".
1893 (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1"))
1894 (delete "fonts/afm" '("public"))
1895 (delete "fonts/afm/public" '("amsfonts"))
1896 (delete "fonts/afm/public/amsfonts" '("cm"))
1897 (delete "fonts/map" '("dvips"))
1898 (delete "fonts/map/dvips" '("cm"))
1899 (delete "fonts/source" '("public"))
1900 (delete "fonts/source/public" '("cm"))
1901 (delete "fonts/tfm" '("public"))
1902 (delete "fonts/type1" '("public"))
1903 (delete "fonts/type1/public" '("amsfonts"))
1904 (delete "fonts/type1/public/amsfonts" '("cm")))
1905 #t))))))
1906 (description
1907 "TeX Live provides a comprehensive TeX document production system.
1908It includes all the major TeX-related programs, macro packages, and fonts
1909that are free software, including support for many languages around the
1910world.
1911
1912This package contains a small subset of the texmf-dist data.")))
1913
1914
1915;; texlive-minimal is the same as texlive, but using texlive-texmf-minimal
1916;; instead of the full texlive-texmf. It can be used, for instance, as a
1917;; native input to packages that need texlive to build their documentation.
1918(define-public texlive-minimal
1919 (package (inherit texlive)
1920 (name "texlive-minimal")
1921 (inputs
1922 `(("texlive-texmf" ,texlive-texmf-minimal)
1923 ,@(alist-delete "texlive-texmf" (package-inputs texlive))))
2d634d9b
FB
1924 (native-search-paths
1925 (list (search-path-specification
1926 (variable "TEXMFLOCAL")
1927 (files '("share/texmf-local")))))
6b5eb840
AE
1928 (description
1929 "TeX Live provides a comprehensive TeX document production system.
1930It includes all the major TeX-related programs, macro packages, and fonts
1931that are free software, including support for many languages around the
1932world.
1933
1934This package contains a small working part of the TeX Live distribution.")))
1935
ebcf74da
RW
1936(define-public perl-text-bibtex
1937 (package
1938 (name "perl-text-bibtex")
1939 (version "0.77")
1940 (source
1941 (origin
1942 (method url-fetch)
1943 (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
1944 version ".tar.gz"))
1945 (sha256
1946 (base32
1947 "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4"))))
1948 (build-system perl-build-system)
1949 (arguments
1950 `(#:phases
1951 (modify-phases %standard-phases
1952 (add-after 'unpack 'add-output-directory-to-rpath
1953 (lambda* (#:key outputs #:allow-other-keys)
1954 (substitute* "inc/MyBuilder.pm"
1955 (("-Lbtparse" line)
1956 (string-append "-Wl,-rpath="
1957 (assoc-ref outputs "out") "/lib " line)))
1958 #t))
1959 (add-after 'unpack 'install-libraries-to-/lib
1960 (lambda* (#:key outputs #:allow-other-keys)
1961 (substitute* "Build.PL"
1962 (("lib64") "lib"))
1963 #t)))))
1964 (native-inputs
1965 `(("perl-capture-tiny" ,perl-capture-tiny)
1966 ("perl-config-autoconf" ,perl-config-autoconf)
1967 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
1968 ("perl-module-build" ,perl-module-build)))
1969 (home-page "http://search.cpan.org/dist/Text-BibTeX")
1970 (synopsis "Interface to read and parse BibTeX files")
1971 (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
1972and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
1973at many different levels: you may work with BibTeX entries as simple field to
1974string mappings, or get at the original form of the data as a list of simple
1975values (strings, macros, or numbers) pasted together.")
2f3108ad 1976 (license license:perl-license)))
ebcf74da 1977
d4000680
RW
1978(define-public biber
1979 (package
1980 (name "biber-next")
1981 (version "2.6")
1982 (source (origin
1983 (method url-fetch)
1984 (uri (string-append "https://github.com/plk/biber/archive/v"
1985 version ".tar.gz"))
1986 (file-name (string-append name "-" version ".tar.gz"))
1987 (sha256
1988 (base32
1989 "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp"))))
1990 (build-system perl-build-system)
1991 (arguments
1992 `(#:phases
1993 (modify-phases %standard-phases
1994 (add-after 'install 'wrap-programs
1995 (lambda* (#:key outputs #:allow-other-keys)
1996 (let* ((out (assoc-ref outputs "out"))
1997 (perl5lib (getenv "PERL5LIB")))
1998 (wrap-program (string-append out "/bin/biber")
1999 `("PERL5LIB" ":" prefix
2000 (,(string-append perl5lib ":" out
2001 "/lib/perl5/site_perl")))))
2002 #t)))))
2003 (inputs
2004 `(("perl-autovivification" ,perl-autovivification)
2005 ("perl-class-accessor" ,perl-class-accessor)
2006 ("perl-data-dump" ,perl-data-dump)
2007 ("perl-data-compare" ,perl-data-compare)
2008 ("perl-data-uniqid" ,perl-data-uniqid)
2009 ("perl-datetime-format-builder" ,perl-datetime-format-builder)
2010 ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
2011 ("perl-file-slurp" ,perl-file-slurp)
2012 ("perl-ipc-cmd" ,perl-ipc-cmd)
2013 ("perl-ipc-run3" ,perl-ipc-run3)
2014 ("perl-list-allutils" ,perl-list-allutils)
2015 ("perl-list-moreutils" ,perl-list-moreutils)
2016 ("perl-mozilla-ca" ,perl-mozilla-ca)
2017 ("perl-regexp-common" ,perl-regexp-common)
2018 ("perl-log-log4perl" ,perl-log-log4perl)
2019 ;; We cannot use perl-unicode-collate here, because otherwise the
2020 ;; hardcoded hashes in the tests would differ. See
2021 ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
2022 ;;("perl-unicode-collate" ,perl-unicode-collate)
2023 ("perl-unicode-normalize" ,perl-unicode-normalize)
2024 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
2025 ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
2026 ("perl-encode-jis2k" ,perl-encode-jis2k)
2027 ("perl-encode-hanextra" ,perl-encode-hanextra)
2028 ("perl-xml-libxml" ,perl-xml-libxml)
2029 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
2030 ("perl-xml-libxslt" ,perl-xml-libxslt)
2031 ("perl-xml-writer" ,perl-xml-writer)
2032 ("perl-sort-key" ,perl-sort-key)
2033 ("perl-text-csv" ,perl-text-csv)
2034 ("perl-text-csv-xs" ,perl-text-csv-xs)
2035 ("perl-text-roman" ,perl-text-roman)
2036 ("perl-uri" ,perl-uri)
2037 ("perl-text-bibtex" ,perl-text-bibtex)
2038 ("perl-libwww" ,perl-libwww)
2039 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
2040 ("perl-business-isbn" ,perl-business-isbn)
2041 ("perl-business-issn" ,perl-business-issn)
2042 ("perl-business-ismn" ,perl-business-ismn)
2043 ("perl-lingua-translit" ,perl-lingua-translit)))
2044 (native-inputs
2045 `(("perl-config-autoconf" ,perl-config-autoconf)
2046 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
2047 ("perl-module-build" ,perl-module-build)
2048 ;; for tests
2049 ("perl-file-which" ,perl-file-which)
2050 ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
2051 ("perl-test-differences" ,perl-test-differences)))
2052 (home-page "http://biblatex-biber.sourceforge.net/")
2053 (synopsis "Backend for the BibLaTeX citation management tool")
2054 (description "Biber is a BibTeX replacement for users of biblatex. Among
2055other things it comes with full Unicode support.")
2056 (license license:artistic2.0)))
2057
253cdd6c
RW
2058;; Our version of texlive comes with biblatex 3.4, which is only compatible
2059;; with biber 2.5 according to the compatibility matrix in the biber
2060;; documentation.
2061(define-public biber-2.5
2062 (package (inherit biber)
2063 (name "biber")
2064 (version "2.5")
2065 (source (origin
2066 (method url-fetch)
2067 (uri (string-append "https://github.com/plk/biber/archive/v"
2068 version ".tar.gz"))
2069 (file-name (string-append name "-" version ".tar.gz"))
2070 (sha256
2071 (base32
2072 "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv"))))
2073 (arguments
2074 (substitute-keyword-arguments (package-arguments biber)
2075 ((#:phases phases)
2076 `(modify-phases ,phases
2077 (add-before 'check 'delete-failing-test
2078 (lambda _
2079 (delete-file "t/sort-order.t")
2080 #t))))))
2081 (inputs
2082 `(("perl-date-simple" ,perl-date-simple)
2083 ,@(package-inputs biber)))))
6b5eb840 2084
231eae53
LC
2085(define-public rubber
2086 (package
2087 (name "rubber")
2088 (version "1.1")
2089 (source (origin
2090 (method url-fetch)
2091 (uri (list (string-append "https://launchpad.net/rubber/trunk/"
2092 version "/+download/rubber-"
2093 version ".tar.gz")
2094 (string-append "http://ebeffara.free.fr/pub/rubber-"
2095 version ".tar.gz")))
2096 (sha256
2097 (base32
2098 "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
2099 (build-system gnu-build-system)
2100 (arguments '(#:tests? #f)) ; no `check' target
2101 (inputs `(("texinfo" ,texinfo)
9bee5d6c 2102 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
231eae53
LC
2103 ("which" ,which)))
2104 (home-page "https://launchpad.net/rubber")
35b9e423 2105 (synopsis "Wrapper for LaTeX and friends")
231eae53
LC
2106 (description
2107 "Rubber is a program whose purpose is to handle all tasks related to the
2108compilation of LaTeX documents. This includes compiling the document itself,
2109of course, enough times so that all references are defined, and running BibTeX
2110to manage bibliographic references. Automatic execution of dvips to produce
2111PostScript documents is also included, as well as usage of pdfLaTeX to produce
2112PDF documents.")
2113 (license license:gpl2+)))
4791876c
RJ
2114
2115(define-public texmaker
2116 (package
2117 (name "texmaker")
2118 (version "4.5")
2119 (source (origin
2120 (method url-fetch)
2121 (uri (string-append "http://www.xm1math.net/texmaker/texmaker-"
2122 version ".tar.bz2"))
2123 (sha256
2124 (base32
2125 "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c"))))
2126 (build-system gnu-build-system)
2127 (arguments
2128 `(#:phases
2129 (modify-phases %standard-phases
2130 ;; Qt has its own configuration utility.
2131 (replace 'configure
2132 (lambda* (#:key outputs #:allow-other-keys)
2133 (let ((out (assoc-ref outputs "out")))
2134 (zero? (system* "qmake"
2135 (string-append "PREFIX=" out)
2136 (string-append "DESKTOPDIR=" out
2137 "/share/applications")
2138 (string-append "ICONDIR=" out "/share/pixmaps")
2139 "texmaker.pro"))))))))
2140 (inputs
2141 `(("poppler-qt5" ,poppler-qt5)
bd917486
TD
2142 ("qtbase" ,qtbase)
2143 ("qtscript" ,qtscript)
2144 ("qtwebkit" ,qtwebkit)
4791876c
RJ
2145 ("zlib" ,zlib)))
2146 (native-inputs
2147 `(("pkg-config" ,pkg-config)))
2148 (home-page "http://www.xm1math.net/texmaker/")
2149 (synopsis "LaTeX editor")
2150 (description "Texmaker is a program that integrates many tools needed to
2151develop documents with LaTeX, in a single application.")
2152 (license license:gpl2+)))
83457fe0
JD
2153
2154
2155(define-public teximpatient
2156 (package
2157 (name "teximpatient")
2158 (version "2.4")
2159 (source (origin
2160 (method url-fetch)
2161 (uri (string-append "mirror://gnu/" name "/" name "-"
2162 version ".tar.gz"))
2163 (sha256
2164 (base32
2165 "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd"))))
2166 (build-system gnu-build-system)
2167 (arguments
2168 `(#:phases
2169 (modify-phases %standard-phases
2170 (delete 'check)
2171 ;; Unfortunately some mistakes have been made in packaging.
2172 ;; Work around them here ...
2173 (replace 'unpack
2174 (lambda* (#:key inputs outputs #:allow-other-keys)
2175 (let ((srcdir "teximpatient-2.4"))
2176 (system* "tar" "-xzf" (assoc-ref inputs "source")
2177 (string-append "--one-top-level=" srcdir))
2178 (delete-file (string-append srcdir "/book.pdf"))
2179 (install-file (car
2180 (find-files
2181 (assoc-ref inputs "automake")
2182 "^install-sh$"))
2183 srcdir)
2184 (chdir srcdir)))))))
2185 (native-inputs
2186 `(("texlive" ,texlive)
2187 ("automake" ,automake)))
6fd52309 2188 (home-page "https://www.gnu.org/software/teximpatient/")
83457fe0
JD
2189 (synopsis "Book on TeX, plain TeX and Eplain")
2190 (description "@i{TeX for the Impatient} is a ~350 page book on TeX,
2191plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
2192and Karl Berry.")
2193 (license license:fdl1.3+)))