gnu: Add texlive-latex-fontspec.
[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)
231eae53 61 #:use-module (gnu packages zip)
6b5eb840
AE
62 #:autoload (gnu packages texinfo) (texinfo)
63 #:use-module (ice-9 ftw)
64 #:use-module (srfi srfi-1))
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
8bcdc23f 82(define 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
197 "1k11yvz4q95bxyxczwvd4r177h6a2gg03xmf51kmgjgz8an2gq2w"))))
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
566e95f7
RW
637;; This provides etex.src which is needed to build various formats, including
638;; luatex.fmt and pdflatex.fmt
639(define-public texlive-tex-plain
640 (package
641 (name "texlive-tex-plain")
642 (version (number->string %texlive-revision))
643 (source (origin
644 (method svn-fetch)
645 (uri (svn-reference
646 (url (string-append "svn://www.tug.org/texlive/tags/"
647 %texlive-tag "/Master/texmf-dist/"
648 "/tex/plain"))
649 (revision %texlive-revision)))
650 (sha256
651 (base32
652 "1ifmbyl3ir8k0v1g25xjb5rcyy5vhj8a3fa2088nczga09hna5vn"))))
653 (build-system trivial-build-system)
654 (arguments
655 `(#:modules ((guix build utils))
656 #:builder
657 (begin
658 (use-modules (guix build utils))
659 (let ((target (string-append (assoc-ref %outputs "out")
660 "/share/texmf-dist/tex/plain")))
661 (mkdir-p target)
662 (copy-recursively (assoc-ref %build-inputs "source") target)
663 #t))))
664 (home-page "https://www.ctan.org/pkg/plain")
665 (synopsis "Plain TeX format and supporting files")
666 (description
667 "Contains files used to build the Plain TeX format, as described in the
668TeXbook, together with various supporting files (some also discussed in the
669book).")
670 (license license:knuth)))
671
010f476f
RW
672(define-public texlive-latex-base
673 (let ((texlive-dir
674 (lambda (dir hash)
675 (origin
676 (method svn-fetch)
677 (uri (svn-reference
678 (url (string-append "svn://www.tug.org/texlive/tags/"
679 %texlive-tag "/Master/texmf-dist/"
680 dir))
681 (revision %texlive-revision)))
682 (sha256 (base32 hash))))))
683 (package
684 (name "texlive-latex-base")
685 (version (number->string %texlive-revision))
686 (source (origin
687 (method svn-fetch)
688 (uri (texlive-ref "latex" "base"))
689 (sha256
690 (base32
691 "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k"))))
692 (build-system gnu-build-system)
693 (arguments
694 `(#:modules ((guix build gnu-build-system)
695 (guix build utils)
696 (ice-9 match)
697 (srfi srfi-1)
698 (srfi srfi-26))
699 #:tests? #f ; no tests
700 #:phases
701 (modify-phases %standard-phases
702 (delete 'configure)
703 (replace 'build
704 (lambda* (#:key inputs #:allow-other-keys)
705 ;; Find required fonts
706 (setenv "TFMFONTS"
707 (string-append (assoc-ref inputs "texlive-fonts-cm")
708 "/share/texmf-dist/fonts/tfm/public/cm:"
709 (assoc-ref inputs "texlive-fonts-latex")
710 "/share/texmf-dist/fonts/tfm/public/latex-fonts:"
711 (assoc-ref inputs "texlive-fonts-knuth-lib")
712 "/share/texmf-dist/fonts/tfm/public/knuth-lib"))
713 (setenv "TEXINPUTS"
714 (string-append
715 (getcwd) ":"
716 (getcwd) "/build:"
717 (string-join
718 (append-map (match-lambda
719 ((_ . dir)
720 (find-files dir
721 (lambda (_ stat)
722 (eq? 'directory (stat:type stat)))
723 #:directories? #t
724 #:stat stat)))
725 inputs)
726 ":")))
727
728 ;; Create an empty texsys.cfg, because latex.ltx wants to include
729 ;; it. This file must exist and it's fine if it's empty.
730 (with-output-to-file "texsys.cfg"
731 (lambda _ (format #t "%")))
732
733 (mkdir "build")
734 (mkdir "web2c")
735 (and (zero? (system* "luatex" "-ini" "-interaction=batchmode"
736 "-output-directory=build"
737 "unpack.ins"))
738 ;; LaTeX and XeTeX require e-TeX, which is enabled only in
739 ;; extended mode (activated with a leading asterisk). We
740 ;; should not use luatex here, because that would make the
741 ;; generated format files incompatible with any other TeX
742 ;; engine.
743
744 ;; FIXME: XeTeX fails to build because neither
745 ;; \XeTeXuseglyphmetrics nor \XeTeXdashbreakstate are
746 ;; defined.
747 (every
748 (lambda (format)
749 (zero? (system* "latex" "-ini" "-interaction=batchmode"
750 "-output-directory=web2c"
751 "-translate-file=cp227.tcx"
752 (string-append "*" format ".ini"))))
753 '("latex" ;"xetex"
754 ))
755 (every
756 (lambda (format)
757 (zero? (system* "luatex" "-ini" "-interaction=batchmode"
758 "-output-directory=web2c"
759 (string-append format ".ini"))))
760 '("dviluatex" "dvilualatex" "luatex" "lualatex" "xelatex")))))
761 (replace 'install
762 (lambda* (#:key outputs #:allow-other-keys)
763 (let* ((out (assoc-ref outputs "out"))
764 (target (string-append
765 out "/share/texmf-dist/tex/latex/base"))
766 (web2c (string-append
767 out "/share/texmf-dist/web2c")))
768 (mkdir-p target)
769 (mkdir-p web2c)
770 (for-each delete-file (find-files "." "\\.(log|aux)$"))
771 (for-each (cut install-file <> target)
772 (find-files "build" ".*"))
773 (for-each (cut install-file <> web2c)
774 (find-files "web2c" ".*"))
775 #t))))))
776 (native-inputs
777 `(("texlive-bin" ,texlive-bin)
778 ("texlive-generic-unicode-data" ,texlive-generic-unicode-data)
779 ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl)
780 ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files)
781 ("texlive-latex-latexconfig"
782 ,(texlive-dir "tex/latex/latexconfig/"
783 "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf"))
784 ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8)
785 ("texlive-generic-hyphen"
786 ,(texlive-dir "tex/generic/hyphen/"
787 "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd"))
788 ("texlive-generic-ruhyphen"
789 ,(texlive-dir "tex/generic/ruhyphen/"
790 "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd"))
791 ("texlive-generic-ukrhyph"
792 ,(texlive-dir "tex/generic/ukrhyph/"
793 "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv"))
794 ("texlive-generic-config"
795 ,(texlive-dir "tex/generic/config/"
796 "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s"))
797 ("texlive-tex-plain" ,texlive-tex-plain)
798 ("texlive-fonts-cm" ,texlive-fonts-cm)
799 ("texlive-fonts-latex" ,texlive-fonts-latex)
800 ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib)))
801 (home-page "http://www.ctan.org/pkg/latex-base")
802 (synopsis "Base sources of LaTeX")
803 (description
804 "This bundle comprises the source of LaTeX itself, together with several
805packages which are considered \"part of the kernel\". This bundle, together
806with the required packages, constitutes what every LaTeX distribution should
807contain.")
808 (license license:lppl1.3c+))))
809
3e485ed2
RW
810(define-public texlive-latex-filecontents
811 (package
812 (name "texlive-latex-filecontents")
813 (version (number->string %texlive-revision))
814 (source (origin
815 (method svn-fetch)
816 (uri (texlive-ref "latex" "filecontents"))
817 (sha256
818 (base32
819 "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q"))))
820 (build-system texlive-build-system)
821 (arguments '(#:tex-directory "latex/filecontents"))
822 (home-page "http://www.ctan.org/pkg/filecontents")
823 (synopsis "Extended filecontents and filecontents* environments")
824 (description
825 "LaTeX2e's @code{filecontents} and @code{filecontents*} environments
826enable a LaTeX source file to generate external files as it runs through
827LaTeX. However, there are two limitations of these environments: they refuse
828to overwrite existing files, and they can only be used in the preamble of a
829document. The filecontents package removes these limitations, letting you
830overwrite existing files and letting you use @code{filecontents} /
831@code{filecontents*} anywhere.")
832 (license license:lppl1.3c+)))
833
1193aa89
RW
834(define-public texlive-generic-ifxetex
835 (package
836 (name "texlive-generic-ifxetex")
837 (version "0.6")
838 (source (origin
839 (method svn-fetch)
840 (uri (texlive-ref "generic" "ifxetex"))
841 (sha256
842 (base32
843 "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d"))))
844 (build-system texlive-build-system)
845 (arguments
846 '(#:tex-directory "generic/ifxetex"
847 #:tex-format "xelatex"))
848 (inputs
849 `(("texlive-latex-filecontents" ,texlive-latex-filecontents)))
850 (home-page "http://www.ctan.org/pkg/ifxetex")
851 (synopsis "Am I running under XeTeX?")
852 (description
853 "This is a simple package which provides an @code{\\ifxetex} conditional,
854so that other code can determine that it is running under XeTeX. The package
855requires the etexe-TeX extensions to the TeX primitive set.")
856 (license license:lppl1.3c+)))
857
437822a1
RW
858(define-public texlive-latex-fancyvrb
859 (package
860 (name "texlive-latex-fancyvrb")
861 (version (number->string %texlive-revision))
862 (source (origin
863 (method svn-fetch)
864 (uri (texlive-ref "latex" "fancyvrb"))
865 (sha256
866 (base32
867 "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv"))))
868 (build-system texlive-build-system)
869 (arguments
870 '(#:tex-directory "latex/fancyvrb"
871 ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and
872 ;; thus texlive-luatex-lualibs.
873 #:build-targets '("fancyvrb.ins")))
874 (home-page "http://www.ctan.org/pkg/fancyvrb")
875 (synopsis "Sophisticated verbatim text")
876 (description
877 "This package provides tools for the flexible handling of verbatim text
878including: verbatim commands in footnotes; a variety of verbatim environments
879with many parameters; ability to define new customized verbatim environments;
880save and restore verbatim text and environments; write and read files in
881verbatim mode; build \"example\" environments (showing both result and
882verbatim source).")
883 (license license:lppl1.0+)))
884
4eebd2cd
RW
885(define-public texlive-latex-graphics
886 (package
887 (name "texlive-latex-graphics")
888 (version (number->string %texlive-revision))
889 (source (origin
890 (method svn-fetch)
891 (uri (texlive-ref "latex" "graphics"))
892 (sha256
893 (base32
894 "17ka701xr9nqsjlhz30hphr8d9j4zzwgv5zl5r2f118yzqh9c34v"))))
895 (build-system texlive-build-system)
896 (arguments
897 '(#:tex-directory "latex/graphics"
898 #:phases
899 (modify-phases %standard-phases
900 (add-after 'install 'install-config
901 (lambda* (#:key inputs outputs #:allow-other-keys)
902 (let ((cfg (assoc-ref inputs "graphics-cfg"))
903 (target (string-append (assoc-ref outputs "out")
904 "/share/texmf-dist/tex/latex/graphics-cfg")))
905 (mkdir-p target)
906 (install-file (string-append cfg "/graphics.cfg") target)
907 (install-file (string-append cfg "/color.cfg") target)
908 #t)))
909 (add-after 'install 'install-defs
910 (lambda* (#:key inputs outputs #:allow-other-keys)
911 (let ((def (assoc-ref inputs "graphics-def"))
912 (target (string-append (assoc-ref outputs "out")
913 "/share/texmf-dist/tex/latex/graphics-def")))
914 (mkdir-p target)
915 (copy-recursively def target)
916 #t))))))
917 (native-inputs
918 `(("graphics-cfg"
919 ,(origin
920 (method git-fetch)
921 (uri (git-reference
922 (url "https://github.com/latex3/graphics-cfg.git")
923 (commit "19d1238af17df376cd46333b229579b0f7f3a41f")))
924 (sha256
925 (base32
926 "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh"))))
927 ("graphics-def"
928 ,(origin
929 (method svn-fetch)
930 (uri (svn-reference
931 (url (string-append "svn://www.tug.org/texlive/tags/"
932 %texlive-tag "/Master/texmf-dist/"
933 "/tex/latex/graphics-def"))
934 (revision %texlive-revision)))
935 (sha256
936 (base32
937 "1q5l0x3jsy74v0zq4c9g0x0rb9jfzf7cbhdzkbchyydv49iav802"))))))
938 (home-page "http://www.ctan.org/pkg/latex-graphics")
939 (synopsis "LaTeX standard graphics bundle")
940 (description
941 "This is a collection of LaTeX packages for producing color, including
942graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX
943documents. It comprises the packages color, graphics, graphicx, trig, epsfig,
944keyval, and lscape.")
945 ;; The configuration files are released under CC0.
946 (license (list license:lppl1.3c+
947 license:cc0))))
948
f5a6af42
RW
949(define-public texlive-latex-xcolor
950 (package
951 (name "texlive-latex-xcolor")
952 (version (number->string %texlive-revision))
953 (source (origin
954 (method svn-fetch)
955 (uri (texlive-ref "latex" "xcolor"))
956 (sha256
957 (base32
958 "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494"))))
959 (build-system texlive-build-system)
960 (arguments '(#:tex-directory "latex/xcolor"))
961 (home-page "http://www.ctan.org/pkg/xcolor")
962 (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX")
963 (description
964 "The package starts from the basic facilities of the colorcolor package,
965and provides easy driver-independent access to several kinds of color tints,
966shades, tones, and mixes of arbitrary colors. It allows a user to select a
967document-wide target color model and offers complete tools for conversion
968between eight color models. Additionally, there is a command for alternating
969row colors plus repeated non-aligned material (like horizontal lines) in
970tables.")
971 (license license:lppl1.2+)))
972
4d660fdf
RW
973(define-public texlive-latex-hyperref
974 (package
975 (name "texlive-latex-hyperref")
976 (version "6.84a2")
977 ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx,
978 ;; so we fetch the release from GitHub.
979 (source (origin
980 (method url-fetch)
981 (uri (string-append "https://github.com/ho-tex/hyperref/"
982 "archive/release-" version ".tar.gz"))
983 (file-name (string-append name "-" version ".tar.gz"))
984 (sha256
985 (base32
986 "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2"))))
987 (build-system texlive-build-system)
988 (arguments '(#:tex-directory "latex/hyperref"))
989 (home-page "http://www.ctan.org/pkg/hyperref")
990 (synopsis "Extensive support for hypertext in LaTeX")
991 (description
992 "The hyperref package is used to handle cross-referencing commands in
993LaTeX to produce hypertext links in the document. The package provides
994backends for the special set defined for HyperTeX DVI processors; for embedded
995pdfmark commands for processing by Acrobat Distiller (dvips and dvipsone); for
996dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX
997pdf and HTML backends. The package is distributed with the backref and
998nameref packages, which make use of the facilities of hyperref.")
999 (license license:lppl1.3+)))
1000
c3455b7d
RW
1001(define-public texlive-latex-oberdiek
1002 (package
1003 (name "texlive-latex-oberdiek")
1004 (version (number->string %texlive-revision))
1005 (source (origin
1006 (method svn-fetch)
1007 (uri (texlive-ref "latex" "oberdiek"))
1008 (sha256
1009 (base32
1010 "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf"))))
1011 (build-system texlive-build-system)
1012 (arguments
1013 '(#:tex-directory "latex/oberdiek"
1014 #:phases
1015 (modify-phases %standard-phases
1016 ;; "ifpdf.ins" is not generated, so we cannot process it.
1017 (add-after 'unpack 'do-not-process-ifpdf.ins
1018 (lambda _
1019 (substitute* "oberdiek.ins"
1020 (("\\\\batchinput\\{ifpdf.ins\\}") ""))
1021 #t)))))
1022 (home-page "http://www.ctan.org/pkg/oberdiek")
1023 (synopsis "Bundle of packages submitted by Heiko Oberdiek")
1024 (description
1025 "The bundle comprises various LaTeX packages, providing among others:
1026better accessibility support for PDF files; extensible chemists reaction
1027arrows; record information about document class(es) used; and many more.")
1028 (license license:lppl1.3+)))
1029
f2536af2
RW
1030(define-public texlive-latex-tools
1031 (package
1032 (name "texlive-latex-tools")
1033 (version (number->string %texlive-revision))
1034 (source (origin
1035 (method svn-fetch)
1036 (uri (texlive-ref "latex" "tools"))
1037 (sha256
1038 (base32
1039 "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz"))))
1040 (build-system texlive-build-system)
1041 (arguments
1042 '(#:tex-directory "latex/tools"
1043 #:build-targets '("tools.ins")))
1044 (home-page "http://www.ctan.org/pkg/latex-tools")
1045 (synopsis "LaTeX standard tools bundle")
1046 (description
1047 "This package is a collection of (variously) simple tools provided as
1048part of the LaTeX required tools distribution, comprising the following
1049packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr,
1050fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol,
1051rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim,
1052xr, and xspace.")
1053 (license license:lppl1.3+)))
1054
35adcc3a
RW
1055(define-public texlive-latex-url
1056 (package
1057 (name "texlive-latex-url")
1058 (version (number->string %texlive-revision))
1059 (source (origin
1060 (method svn-fetch)
1061 (uri (svn-reference
1062 (url (string-append "svn://www.tug.org/texlive/tags/"
1063 %texlive-tag "/Master/texmf-dist/"
1064 "/tex/latex/url"))
1065 (revision %texlive-revision)))
1066 (sha256
1067 (base32
1068 "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac"))))
1069 (build-system trivial-build-system)
1070 (arguments
1071 `(#:modules ((guix build utils))
1072 #:builder
1073 (begin
1074 (use-modules (guix build utils))
1075 (let ((target (string-append (assoc-ref %outputs "out")
1076 "/share/texmf-dist/tex/latex/url")))
1077 (mkdir-p target)
1078 (copy-recursively (assoc-ref %build-inputs "source") target)
1079 #t))))
1080 (home-page "https://www.ctan.org/pkg/url")
1081 (synopsis "Verbatim with URL-sensitive line breaks")
1082 (description "The command @code{\\url} is a form of verbatim command that
1083allows linebreaks at certain characters or combinations of characters, accepts
1084reconfiguration, and can usually be used in the argument to another command.
1085The command is intended for email addresses, hypertext links,
1086directories/paths, etc., which normally have no spaces, so by default the
1087package ignores spaces in its argument. However, a package option allows
1088spaces, which is useful for operating systems where spaces are a common part
1089of file names.")
1090 ;; The license header states that it is under LPPL version 2 or later, but
1091 ;; the latest version is 1.3c.
1092 (license license:lppl1.3c+)))
1093
a5b1ef84
RW
1094(define-public texlive-latex-l3kernel
1095 (package
1096 (name "texlive-latex-l3kernel")
1097 (version (number->string %texlive-revision))
1098 (source (origin
1099 (method svn-fetch)
1100 (uri (texlive-ref "latex" "l3kernel"))
1101 (sha256
1102 (base32
1103 "0ndqw0flhl20f4ny5lssp8rqpnj5kglyg59whbdrxbh2zc7w7j0b"))))
1104 (build-system texlive-build-system)
1105 (arguments
1106 '(#:tex-directory "latex/l3kernel"))
1107 (home-page "http://www.ctan.org/pkg/l3kernel")
1108 (synopsis "LaTeX3 programmers’ interface")
1109 (description
1110 "The l3kernel bundle provides an implementation of the LaTeX3
1111programmers’ interface, as a set of packages that run under LaTeX 2e. The
1112interface provides the foundation on which the LaTeX3 kernel and other future
1113code are built: it is an API for TeX programmers. The packages are set up so
1114that the LaTeX3 conventions can be used with regular LaTeX 2e packages.")
1115 (license license:lppl1.3c+)))
1116
cc09d48b
RW
1117(define-public texlive-latex-l3packages
1118 (package
1119 (name "texlive-latex-l3packages")
1120 (version (number->string %texlive-revision))
1121 (source (origin
1122 (method svn-fetch)
1123 (uri (texlive-ref "latex" "l3packages"))
1124 (sha256
1125 (base32
1126 "1p1y9my6ccmp2ab91fzqqgih8ifrk4y3wyh397kagiq9f6a6v91f"))))
1127 (build-system texlive-build-system)
1128 (arguments
1129 '(#:tex-directory "latex/l3packages"
1130 #:phases
1131 (modify-phases %standard-phases
1132 ;; All package sources are in sub-directories, so we need to add them
1133 ;; to TEXINPUTS.
1134 (add-after 'unpack 'set-TEXINPUTS
1135 (lambda _
1136 (let ((cwd (getcwd)))
1137 (setenv "TEXINPUTS"
1138 (string-append cwd "/l3keys2e:"
1139 cwd "/xparse:"
1140 cwd "/xfrac:"
1141 cwd "/xfp:"
1142 cwd "/xtemplate")))
1143 #t)))))
1144 (inputs
1145 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1146 (home-page "http://www.ctan.org/pkg/l3packages")
1147 (synopsis "High-level LaTeX3 concepts")
1148 (description
1149 "This bundle holds prototype implementations of concepts for a LaTeX
1150designer interface, to be used with the experimental LaTeX kernel as
1151programming tools and kernel sup­port. Packages provided in this release are:
1152
1153@enumerate
1154@item l3keys2e, which makes the facilities of the kernel module l3keys
1155 available for use by LaTeX 2e packages;
1156@item xfrac, which provides flexible splitlevel fractions;
1157@item xparse, which provides a high-level interface for declaring document
1158 commands; and
1159@item xtemplate, which provides a means of defining generic functions using a
1160 key-value syntax.
1161@end enumerate\n")
1162 (license license:lppl1.3c+)))
1163
58308491
RW
1164(define-public texlive-latex-fontspec
1165 (package
1166 (name "texlive-latex-fontspec")
1167 (version (number->string %texlive-revision))
1168 (source (origin
1169 (method svn-fetch)
1170 (uri (texlive-ref "latex" "fontspec"))
1171 (sha256
1172 (base32
1173 "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q"))))
1174 (build-system texlive-build-system)
1175 (arguments
1176 '(#:tex-directory "latex/fontspec"
1177 #:build-targets '("fontspec.dtx")))
1178 (inputs
1179 `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel)))
1180 (home-page "http://www.ctan.org/pkg/fontspec")
1181 (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX")
1182 (description
1183 "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an
1184automatic and unified interface to feature-rich AAT and OpenType fonts through
1185the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires
1186the l3kernel and xparse bundles from the LaTeX 3 development team.")
1187 (license license:lppl1.3+)))
1188
8bcdc23f 1189(define texlive-texmf
0aa34e82
AE
1190 (package
1191 (name "texlive-texmf")
7a15a68f 1192 (version "2016")
0aa34e82
AE
1193 (source texlive-texmf-src)
1194 (build-system gnu-build-system)
1195 (inputs
1196 `(("texlive-bin" ,texlive-bin)
1197 ("lua" ,lua)
1198 ("perl" ,perl)
1199 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
1200 ("ruby" ,ruby)
1201 ("tcsh" ,tcsh)))
1202 (arguments
1203 `(#:modules ((guix build gnu-build-system)
1204 (guix build utils)
1205 (srfi srfi-26))
a348af40
LC
1206
1207 ;; This package takes 4 GiB, which we can't afford to distribute from
1208 ;; our servers.
1209 #:substitutable? #f
1210
0aa34e82 1211 #:phases
4a6635f3
AE
1212 (modify-phases (map (cut assq <> %standard-phases)
1213 '(set-paths unpack patch-source-shebangs))
1214 (add-after 'patch-source-shebangs 'install
1215 (lambda* (#:key outputs #:allow-other-keys)
1216 (let ((share (string-append (assoc-ref outputs "out") "/share")))
1217 (mkdir-p share)
1218 (system* "mv" "texmf-dist" share))))
1219 (add-after 'install 'texmf-config
1220 (lambda* (#:key inputs outputs #:allow-other-keys)
1221 (let* ((out (assoc-ref outputs "out"))
1222 (share (string-append out "/share"))
1223 (texmfroot (string-append share "/texmf-dist/web2c"))
1224 (texmfcnf (string-append texmfroot "/texmf.cnf"))
1225 (texlive-bin (assoc-ref inputs "texlive-bin"))
1226 (texbin (string-append texlive-bin "/bin"))
1227 (tlpkg (string-append texlive-bin "/share/tlpkg")))
1228 ;; Register SHARE as TEXMFROOT in texmf.cnf.
1229 (substitute* texmfcnf
1230 (("TEXMFROOT = \\$SELFAUTOPARENT")
2d634d9b
FB
1231 (string-append "TEXMFROOT = " share))
1232 (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
1233 "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
1234 (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
4a6635f3
AE
1235 ;; Register paths in texmfcnf.lua, needed for context.
1236 (substitute* (string-append texmfroot "/texmfcnf.lua")
1237 (("selfautodir:") out)
1238 (("selfautoparent:") (string-append share "/")))
1239 ;; Set path to TeXLive Perl modules
1240 (setenv "PERL5LIB"
1241 (string-append (getenv "PERL5LIB") ":" tlpkg))
1242 ;; Configure the texmf-dist tree; inspired from
1243 ;; http://slackbuilds.org/repository/13.37/office/texlive/
1244 (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
1245 (setenv "TEXMFCNF" texmfroot)
1246 (system* "updmap-sys" "--nohash" "--syncwithtrees")
1247 (system* "mktexlsr")
1248 (system* "fmtutil-sys" "--all")))))))
7a15a68f 1249 (properties `((max-silent-time . 9600))) ; don't time out while grafting
0aa34e82 1250 (synopsis "TeX Live, a package of the TeX typesetting system")
eb0119ef
AE
1251 (description
1252 "TeX Live provides a comprehensive TeX document production system.
1253It includes all the major TeX-related programs, macro packages, and fonts
1254that are free software, including support for many languages around the
0aa34e82
AE
1255world.
1256
1257This package contains the complete tree of texmf-dist data.")
132e14b4
EF
1258 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
1259 (home-page "https://www.tug.org/texlive/")))
0aa34e82
AE
1260
1261(define-public texlive
1262 (package
1263 (name "texlive")
7a15a68f 1264 (version "2016")
0aa34e82
AE
1265 (source #f)
1266 (build-system trivial-build-system)
1267 (inputs `(("bash" ,bash) ; for wrap-program
1268 ("texlive-bin" ,texlive-bin)
1269 ("texlive-texmf" ,texlive-texmf)))
2d634d9b
FB
1270 (native-search-paths
1271 (list (search-path-specification
1272 (variable "TEXMFLOCAL")
1273 (files '("share/texmf-local")))))
0aa34e82
AE
1274 (arguments
1275 `(#:modules ((guix build utils))
1276 #:builder
1277 ;; Build the union of texlive-bin and texlive-texmf, but take the
1278 ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
1279 (begin
1280 (use-modules (guix build utils))
1281 (let ((out (assoc-ref %outputs "out"))
1282 (bin (assoc-ref %build-inputs "texlive-bin"))
1283 (texmf (assoc-ref %build-inputs "texlive-texmf"))
1284 (bash (assoc-ref %build-inputs "bash")))
1285 (mkdir out)
1286 (with-directory-excursion out
1287 (for-each
1288 (lambda (name)
1289 (symlink (string-append bin "/" name) name))
1290 '("include" "lib"))
1291 (mkdir "bin")
1292 (with-directory-excursion "bin"
1293 (setenv "PATH" (string-append bash "/bin"))
1294 (for-each
1295 (lambda (name)
1296 (symlink name (basename name))
1297 (wrap-program
1298 (basename name)
1299 `("TEXMFCNF" =
1300 (,(string-append texmf "/share/texmf-dist/web2c")))))
1301 (find-files (string-append bin "/bin/") "")))
1302 (mkdir "share")
1303 (with-directory-excursion "share"
1304 (for-each
1305 (lambda (name)
1306 (symlink (string-append bin "/share/" name) name))
1307 '("info" "man" "tlpkg"))
1308 (for-each
1309 (lambda (name)
1310 (symlink (string-append texmf "/share/" name) name))
1311 '("texmf-dist" "texmf-var"))))))))
1312 (synopsis "TeX Live, a package of the TeX typesetting system")
1313 (description
1314 "TeX Live provides a comprehensive TeX document production system.
1315It includes all the major TeX-related programs, macro packages, and fonts
1316that are free software, including support for many languages around the
1317world.
1318
1319This package contains the complete TeX Live distribution.")
132e14b4
EF
1320 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
1321 (home-page "https://www.tug.org/texlive/")))
231eae53 1322
6b5eb840
AE
1323
1324;; texlive-texmf-minimal is a pruned, small version of the texlive tree,
a348af40
LC
1325;; in particular dropping documentation and fonts. It weighs in at 470 MiB
1326;; instead of 4 GiB.
6b5eb840
AE
1327(define texlive-texmf-minimal
1328 (package (inherit texlive-texmf)
1329 (name "texlive-texmf-minimal")
1330 (arguments
1331 (substitute-keyword-arguments
1332 (package-arguments texlive-texmf)
1333 ((#:modules modules)
1334 `((ice-9 ftw)
1335 (srfi srfi-1)
1336 ,@modules))
1337 ((#:phases phases)
1338 `(modify-phases ,phases
1339 (add-after 'unpack 'prune
1340 (lambda _
1341 (define (delete subdir exclude)
1342 "Delete all files and directories in SUBDIR except for those
1343given in the list EXCLUDE."
1344 (with-directory-excursion subdir
1345 (for-each delete-file-recursively
1346 (lset-difference equal?
1347 (scandir ".")
1348 (append '("." "..")
1349 exclude)))))
1350 (with-directory-excursion "texmf-dist"
1351 (for-each delete-file-recursively
1352 '("doc" "source" "tex4ht"))
1353 ;; Delete all subdirectories of "fonts", except for "tfm" and
1354 ;; any directories named "cm".
1355 (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1"))
1356 (delete "fonts/afm" '("public"))
1357 (delete "fonts/afm/public" '("amsfonts"))
1358 (delete "fonts/afm/public/amsfonts" '("cm"))
1359 (delete "fonts/map" '("dvips"))
1360 (delete "fonts/map/dvips" '("cm"))
1361 (delete "fonts/source" '("public"))
1362 (delete "fonts/source/public" '("cm"))
1363 (delete "fonts/tfm" '("public"))
1364 (delete "fonts/type1" '("public"))
1365 (delete "fonts/type1/public" '("amsfonts"))
1366 (delete "fonts/type1/public/amsfonts" '("cm")))
1367 #t))))))
1368 (description
1369 "TeX Live provides a comprehensive TeX document production system.
1370It includes all the major TeX-related programs, macro packages, and fonts
1371that are free software, including support for many languages around the
1372world.
1373
1374This package contains a small subset of the texmf-dist data.")))
1375
1376
1377;; texlive-minimal is the same as texlive, but using texlive-texmf-minimal
1378;; instead of the full texlive-texmf. It can be used, for instance, as a
1379;; native input to packages that need texlive to build their documentation.
1380(define-public texlive-minimal
1381 (package (inherit texlive)
1382 (name "texlive-minimal")
1383 (inputs
1384 `(("texlive-texmf" ,texlive-texmf-minimal)
1385 ,@(alist-delete "texlive-texmf" (package-inputs texlive))))
2d634d9b
FB
1386 (native-search-paths
1387 (list (search-path-specification
1388 (variable "TEXMFLOCAL")
1389 (files '("share/texmf-local")))))
6b5eb840
AE
1390 (description
1391 "TeX Live provides a comprehensive TeX document production system.
1392It includes all the major TeX-related programs, macro packages, and fonts
1393that are free software, including support for many languages around the
1394world.
1395
1396This package contains a small working part of the TeX Live distribution.")))
1397
ebcf74da
RW
1398(define-public perl-text-bibtex
1399 (package
1400 (name "perl-text-bibtex")
1401 (version "0.77")
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
1406 version ".tar.gz"))
1407 (sha256
1408 (base32
1409 "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4"))))
1410 (build-system perl-build-system)
1411 (arguments
1412 `(#:phases
1413 (modify-phases %standard-phases
1414 (add-after 'unpack 'add-output-directory-to-rpath
1415 (lambda* (#:key outputs #:allow-other-keys)
1416 (substitute* "inc/MyBuilder.pm"
1417 (("-Lbtparse" line)
1418 (string-append "-Wl,-rpath="
1419 (assoc-ref outputs "out") "/lib " line)))
1420 #t))
1421 (add-after 'unpack 'install-libraries-to-/lib
1422 (lambda* (#:key outputs #:allow-other-keys)
1423 (substitute* "Build.PL"
1424 (("lib64") "lib"))
1425 #t)))))
1426 (native-inputs
1427 `(("perl-capture-tiny" ,perl-capture-tiny)
1428 ("perl-config-autoconf" ,perl-config-autoconf)
1429 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
1430 ("perl-module-build" ,perl-module-build)))
1431 (home-page "http://search.cpan.org/dist/Text-BibTeX")
1432 (synopsis "Interface to read and parse BibTeX files")
1433 (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
1434and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
1435at many different levels: you may work with BibTeX entries as simple field to
1436string mappings, or get at the original form of the data as a list of simple
1437values (strings, macros, or numbers) pasted together.")
2f3108ad 1438 (license license:perl-license)))
ebcf74da 1439
d4000680
RW
1440(define-public biber
1441 (package
1442 (name "biber-next")
1443 (version "2.6")
1444 (source (origin
1445 (method url-fetch)
1446 (uri (string-append "https://github.com/plk/biber/archive/v"
1447 version ".tar.gz"))
1448 (file-name (string-append name "-" version ".tar.gz"))
1449 (sha256
1450 (base32
1451 "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp"))))
1452 (build-system perl-build-system)
1453 (arguments
1454 `(#:phases
1455 (modify-phases %standard-phases
1456 (add-after 'install 'wrap-programs
1457 (lambda* (#:key outputs #:allow-other-keys)
1458 (let* ((out (assoc-ref outputs "out"))
1459 (perl5lib (getenv "PERL5LIB")))
1460 (wrap-program (string-append out "/bin/biber")
1461 `("PERL5LIB" ":" prefix
1462 (,(string-append perl5lib ":" out
1463 "/lib/perl5/site_perl")))))
1464 #t)))))
1465 (inputs
1466 `(("perl-autovivification" ,perl-autovivification)
1467 ("perl-class-accessor" ,perl-class-accessor)
1468 ("perl-data-dump" ,perl-data-dump)
1469 ("perl-data-compare" ,perl-data-compare)
1470 ("perl-data-uniqid" ,perl-data-uniqid)
1471 ("perl-datetime-format-builder" ,perl-datetime-format-builder)
1472 ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
1473 ("perl-file-slurp" ,perl-file-slurp)
1474 ("perl-ipc-cmd" ,perl-ipc-cmd)
1475 ("perl-ipc-run3" ,perl-ipc-run3)
1476 ("perl-list-allutils" ,perl-list-allutils)
1477 ("perl-list-moreutils" ,perl-list-moreutils)
1478 ("perl-mozilla-ca" ,perl-mozilla-ca)
1479 ("perl-regexp-common" ,perl-regexp-common)
1480 ("perl-log-log4perl" ,perl-log-log4perl)
1481 ;; We cannot use perl-unicode-collate here, because otherwise the
1482 ;; hardcoded hashes in the tests would differ. See
1483 ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
1484 ;;("perl-unicode-collate" ,perl-unicode-collate)
1485 ("perl-unicode-normalize" ,perl-unicode-normalize)
1486 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1487 ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
1488 ("perl-encode-jis2k" ,perl-encode-jis2k)
1489 ("perl-encode-hanextra" ,perl-encode-hanextra)
1490 ("perl-xml-libxml" ,perl-xml-libxml)
1491 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
1492 ("perl-xml-libxslt" ,perl-xml-libxslt)
1493 ("perl-xml-writer" ,perl-xml-writer)
1494 ("perl-sort-key" ,perl-sort-key)
1495 ("perl-text-csv" ,perl-text-csv)
1496 ("perl-text-csv-xs" ,perl-text-csv-xs)
1497 ("perl-text-roman" ,perl-text-roman)
1498 ("perl-uri" ,perl-uri)
1499 ("perl-text-bibtex" ,perl-text-bibtex)
1500 ("perl-libwww" ,perl-libwww)
1501 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1502 ("perl-business-isbn" ,perl-business-isbn)
1503 ("perl-business-issn" ,perl-business-issn)
1504 ("perl-business-ismn" ,perl-business-ismn)
1505 ("perl-lingua-translit" ,perl-lingua-translit)))
1506 (native-inputs
1507 `(("perl-config-autoconf" ,perl-config-autoconf)
1508 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
1509 ("perl-module-build" ,perl-module-build)
1510 ;; for tests
1511 ("perl-file-which" ,perl-file-which)
1512 ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
1513 ("perl-test-differences" ,perl-test-differences)))
1514 (home-page "http://biblatex-biber.sourceforge.net/")
1515 (synopsis "Backend for the BibLaTeX citation management tool")
1516 (description "Biber is a BibTeX replacement for users of biblatex. Among
1517other things it comes with full Unicode support.")
1518 (license license:artistic2.0)))
1519
253cdd6c
RW
1520;; Our version of texlive comes with biblatex 3.4, which is only compatible
1521;; with biber 2.5 according to the compatibility matrix in the biber
1522;; documentation.
1523(define-public biber-2.5
1524 (package (inherit biber)
1525 (name "biber")
1526 (version "2.5")
1527 (source (origin
1528 (method url-fetch)
1529 (uri (string-append "https://github.com/plk/biber/archive/v"
1530 version ".tar.gz"))
1531 (file-name (string-append name "-" version ".tar.gz"))
1532 (sha256
1533 (base32
1534 "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv"))))
1535 (arguments
1536 (substitute-keyword-arguments (package-arguments biber)
1537 ((#:phases phases)
1538 `(modify-phases ,phases
1539 (add-before 'check 'delete-failing-test
1540 (lambda _
1541 (delete-file "t/sort-order.t")
1542 #t))))))
1543 (inputs
1544 `(("perl-date-simple" ,perl-date-simple)
1545 ,@(package-inputs biber)))))
6b5eb840 1546
231eae53
LC
1547(define-public rubber
1548 (package
1549 (name "rubber")
1550 (version "1.1")
1551 (source (origin
1552 (method url-fetch)
1553 (uri (list (string-append "https://launchpad.net/rubber/trunk/"
1554 version "/+download/rubber-"
1555 version ".tar.gz")
1556 (string-append "http://ebeffara.free.fr/pub/rubber-"
1557 version ".tar.gz")))
1558 (sha256
1559 (base32
1560 "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
1561 (build-system gnu-build-system)
1562 (arguments '(#:tests? #f)) ; no `check' target
1563 (inputs `(("texinfo" ,texinfo)
9bee5d6c 1564 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
231eae53
LC
1565 ("which" ,which)))
1566 (home-page "https://launchpad.net/rubber")
35b9e423 1567 (synopsis "Wrapper for LaTeX and friends")
231eae53
LC
1568 (description
1569 "Rubber is a program whose purpose is to handle all tasks related to the
1570compilation of LaTeX documents. This includes compiling the document itself,
1571of course, enough times so that all references are defined, and running BibTeX
1572to manage bibliographic references. Automatic execution of dvips to produce
1573PostScript documents is also included, as well as usage of pdfLaTeX to produce
1574PDF documents.")
1575 (license license:gpl2+)))
4791876c
RJ
1576
1577(define-public texmaker
1578 (package
1579 (name "texmaker")
1580 (version "4.5")
1581 (source (origin
1582 (method url-fetch)
1583 (uri (string-append "http://www.xm1math.net/texmaker/texmaker-"
1584 version ".tar.bz2"))
1585 (sha256
1586 (base32
1587 "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c"))))
1588 (build-system gnu-build-system)
1589 (arguments
1590 `(#:phases
1591 (modify-phases %standard-phases
1592 ;; Qt has its own configuration utility.
1593 (replace 'configure
1594 (lambda* (#:key outputs #:allow-other-keys)
1595 (let ((out (assoc-ref outputs "out")))
1596 (zero? (system* "qmake"
1597 (string-append "PREFIX=" out)
1598 (string-append "DESKTOPDIR=" out
1599 "/share/applications")
1600 (string-append "ICONDIR=" out "/share/pixmaps")
1601 "texmaker.pro"))))))))
1602 (inputs
1603 `(("poppler-qt5" ,poppler-qt5)
bd917486
TD
1604 ("qtbase" ,qtbase)
1605 ("qtscript" ,qtscript)
1606 ("qtwebkit" ,qtwebkit)
4791876c
RJ
1607 ("zlib" ,zlib)))
1608 (native-inputs
1609 `(("pkg-config" ,pkg-config)))
1610 (home-page "http://www.xm1math.net/texmaker/")
1611 (synopsis "LaTeX editor")
1612 (description "Texmaker is a program that integrates many tools needed to
1613develop documents with LaTeX, in a single application.")
1614 (license license:gpl2+)))
83457fe0
JD
1615
1616
1617(define-public teximpatient
1618 (package
1619 (name "teximpatient")
1620 (version "2.4")
1621 (source (origin
1622 (method url-fetch)
1623 (uri (string-append "mirror://gnu/" name "/" name "-"
1624 version ".tar.gz"))
1625 (sha256
1626 (base32
1627 "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd"))))
1628 (build-system gnu-build-system)
1629 (arguments
1630 `(#:phases
1631 (modify-phases %standard-phases
1632 (delete 'check)
1633 ;; Unfortunately some mistakes have been made in packaging.
1634 ;; Work around them here ...
1635 (replace 'unpack
1636 (lambda* (#:key inputs outputs #:allow-other-keys)
1637 (let ((srcdir "teximpatient-2.4"))
1638 (system* "tar" "-xzf" (assoc-ref inputs "source")
1639 (string-append "--one-top-level=" srcdir))
1640 (delete-file (string-append srcdir "/book.pdf"))
1641 (install-file (car
1642 (find-files
1643 (assoc-ref inputs "automake")
1644 "^install-sh$"))
1645 srcdir)
1646 (chdir srcdir)))))))
1647 (native-inputs
1648 `(("texlive" ,texlive)
1649 ("automake" ,automake)))
6fd52309 1650 (home-page "https://www.gnu.org/software/teximpatient/")
83457fe0
JD
1651 (synopsis "Book on TeX, plain TeX and Eplain")
1652 (description "@i{TeX for the Impatient} is a ~350 page book on TeX,
1653plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
1654and Karl Berry.")
1655 (license license:fdl1.3+)))