1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
4 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2016 Thomas Danckaert <post@thomasdanckaert.be>
9 ;;; Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; This file is part of GNU Guix.
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.
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.
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/>.
26 (define-module (gnu packages tex)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system perl)
32 #:use-module (guix build-system trivial)
33 #:use-module (guix utils)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (gnu packages)
37 #:use-module (gnu packages autotools)
38 #:use-module (gnu packages bash)
39 #:use-module (gnu packages compression)
40 #:use-module (gnu packages fontutils)
41 #:use-module (gnu packages gd)
42 #:use-module (gnu packages ghostscript)
43 #:use-module (gnu packages gtk)
44 #:use-module (gnu packages icu4c)
45 #:use-module (gnu packages image)
46 #:use-module (gnu packages lua)
47 #:use-module (gnu packages multiprecision)
48 #:use-module (gnu packages pdf)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages python)
52 #:use-module (gnu packages qt)
53 #:use-module (gnu packages ruby)
54 #:use-module (gnu packages shells)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages web)
57 #:use-module (gnu packages xml)
58 #:use-module (gnu packages xorg)
59 #:use-module (gnu packages xdisorg)
60 #:use-module (gnu packages zip)
61 #:autoload (gnu packages texinfo) (texinfo)
62 #:use-module (ice-9 ftw)
63 #:use-module (srfi srfi-1))
65 (define texlive-extra-src
68 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-extra.tar.xz")
70 "0q4a92zmwhn4ry6xgrp4k8wq11ax2sg9rg9yrsrdkr719y0x887a"))))
72 (define texlive-texmf-src
75 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz")
76 (patches (search-patches "texlive-texmf-CVE-2016-10243.patch"))
77 (patch-flags '("-p2"))
79 "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr"))))
88 (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz")
90 "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8"))))
91 (build-system gnu-build-system)
93 `(("texlive-extra-src" ,texlive-extra-src)
95 ("fontconfig" ,fontconfig)
96 ("fontforge" ,fontforge)
97 ("freetype" ,freetype)
100 ("ghostscript" ,ghostscript)
101 ("graphite2" ,graphite2)
102 ("harfbuzz" ,harfbuzz)
104 ("libpaper" ,libpaper)
113 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
118 ("zziplib" ,zziplib)))
120 `(("pkg-config" ,pkg-config)))
122 `(#:out-of-source? #t
124 `("--disable-native-texlive-build"
125 "--with-system-cairo"
126 "--with-system-freetype2"
129 "--with-system-graphite2"
130 "--with-system-harfbuzz"
132 "--with-system-libgs"
133 "--with-system-libpaper"
134 "--with-system-libpng"
136 "--with-system-pixman"
137 "--with-system-poppler"
138 "--with-system-potrace"
139 "--with-system-teckit"
142 "--with-system-zziplib")
144 ;; Disable tests on mips64 to cope with a failure of luajiterr.test.
145 ;; XXX FIXME fix luajit properly on mips64.
146 #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system)
149 (modify-phases %standard-phases
150 (add-after 'install 'postint
151 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
152 (let* ((out (assoc-ref outputs "out"))
153 (share (string-append out "/share"))
154 (texlive-extra (assoc-ref inputs "texlive-extra-src"))
155 (unpack (assoc-ref %standard-phases 'unpack))
156 (patch-source-shebangs
157 (assoc-ref %standard-phases 'patch-source-shebangs)))
158 ;; Create symbolic links for the latex variants and their
160 (with-directory-excursion (string-append out "/bin/")
162 '("pdftex" "pdftex" "xetex" "luatex")
163 '("latex" "pdflatex" "xelatex" "lualatex")))
164 (with-directory-excursion (string-append share "/man/man1/")
165 (symlink "luatex.1" "lualatex.1"))
166 ;; Unpack texlive-extra and install tlpkg.
167 (mkdir "texlive-extra")
168 (with-directory-excursion "texlive-extra"
169 (apply unpack (list #:source texlive-extra))
170 (apply patch-source-shebangs (list #:source texlive-extra))
171 (system* "mv" "tlpkg" share))))))))
172 (synopsis "TeX Live, a package of the TeX typesetting system")
174 "TeX Live provides a comprehensive TeX document production system.
175 It includes all the major TeX-related programs, macro packages, and fonts
176 that are free software, including support for many languages around the
179 This package contains the binaries.")
180 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
181 (home-page "https://www.tug.org/texlive/")))
183 ;; These variables specify the SVN tag and the matching SVN revision.
184 (define %texlive-tag "texlive-2017.0")
185 (define %texlive-revision 44445)
187 (define-public texlive-dvips
189 (name "texlive-dvips")
190 (version (number->string %texlive-revision))
194 (url (string-append "svn://www.tug.org/texlive/tags/"
195 %texlive-tag "/Master/texmf-dist/"
197 (revision %texlive-revision)))
200 "1k11yvz4q95bxyxczwvd4r177h6a2gg03xmf51kmgjgz8an2gq2w"))))
201 (build-system trivial-build-system)
203 `(#:modules ((guix build utils))
206 (use-modules (guix build utils))
207 (let ((target (string-append (assoc-ref %outputs "out")
208 "/share/texmf-dist/dvips")))
210 (copy-recursively (assoc-ref %build-inputs "source") target)
212 (home-page "http://www.ctan.org/pkg/dvips")
213 (synopsis "DVI to PostScript drivers")
214 (description "This package provides files needed for converting DVI files
216 ;; Various free software licenses apply to individual files.
217 (license (list license:lppl1.3c+
221 (define-public texlive-generic-unicode-data
223 (name "texlive-generic-unicode-data")
224 (version (number->string %texlive-revision))
228 (url (string-append "svn://www.tug.org/texlive/tags/"
229 %texlive-tag "/Master/texmf-dist/"
230 "/tex/generic/unicode-data"))
231 (revision %texlive-revision)))
234 "0ivrhp6jz31pl4z841g4ws41lmvdiwz4sslmhf02inlib79gz6r2"))))
235 (build-system trivial-build-system)
237 `(#:modules ((guix build utils))
240 (use-modules (guix build utils))
241 (let ((target (string-append (assoc-ref %outputs "out")
242 "/share/texmf-dist/tex/generic/unicode-data")))
244 (copy-recursively (assoc-ref %build-inputs "source") target)
246 (home-page "http://www.ctan.org/pkg/unicode-data")
247 (synopsis "Unicode data and loaders for TeX")
248 (description "This bundle provides generic access to Unicode Consortium
249 data for TeX use. It contains a set of text files provided by the Unicode
250 Consortium which are currently all from Unicode 8.0.0, with the exception of
251 @code{MathClass.txt} which is not currently part of the Unicode Character
252 Database. Accompanying these source data are generic TeX loader files
253 allowing this data to be used as part of TeX runs, in particular in building
254 format files. Currently there are two loader files: one for general character
255 set up and one for initializing XeTeX character classes as has been carried
256 out to date by @code{unicode-letters.tex}. ")
257 (license license:lppl1.3c+)))
259 (define-public texlive-generic-dehyph-exptl
261 (name "texlive-generic-dehyph-exptl")
262 (version (number->string %texlive-revision))
266 (url (string-append "svn://www.tug.org/texlive/tags/"
267 %texlive-tag "/Master/texmf-dist/"
268 "/tex/generic/dehyph-exptl"))
269 (revision %texlive-revision)))
272 "1l9wgv99qq0ysvlxqpj4g8bl0dywbzra4g8m2kmpg2fb0i0hczap"))))
273 (build-system trivial-build-system)
275 `(#:modules ((guix build utils))
278 (use-modules (guix build utils))
279 (let ((target (string-append (assoc-ref %outputs "out")
280 "/share/texmf-dist/tex/generic/dehyph-exptl")))
282 (copy-recursively (assoc-ref %build-inputs "source") target)
284 (home-page "http://projekte.dante.de/Trennmuster/WebHome")
285 (synopsis "Hyphenation patterns for German")
286 (description "The package provides experimental hyphenation patterns for
287 the German language, covering both traditional and reformed orthography. The
288 patterns can be used with packages Babel and hyphsubst from the Oberdiek
290 ;; Hyphenation patterns are under the Expat license; documentation is
292 (license (list license:expat license:lppl))))
294 (define-public texlive-generic-tex-ini-files
296 (name "texlive-generic-tex-ini-files")
297 (version (number->string %texlive-revision))
301 (url (string-append "svn://www.tug.org/texlive/tags/"
302 %texlive-tag "/Master/texmf-dist/"
303 "/tex/generic/tex-ini-files"))
304 (revision %texlive-revision)))
307 "1wh42n1lmzcvi3g6mm31nm3yd5ha5bl260xqc444jg1m9fdp3wz5"))))
308 (build-system trivial-build-system)
310 `(#:modules ((guix build utils))
313 (use-modules (guix build utils))
314 (let ((target (string-append (assoc-ref %outputs "out")
315 "/share/texmf-dist/tex/generic/tex-ini-files")))
317 (copy-recursively (assoc-ref %build-inputs "source") target)
319 (home-page "http://ctan.org/pkg/tex-ini-files")
320 (synopsis "Files for creating TeX formats")
321 (description "This bundle provides a collection of model \".ini\" files
322 for creating TeX formats. These files are commonly used to introduced
323 distribution-dependent variations in formats. They are also used to
324 allow existing format source files to be used with newer engines, for example
325 to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.")
326 (license license:public-domain)))
328 (define-public texlive-generic-hyph-utf8
330 (name "texlive-generic-hyph-utf8")
331 (version (number->string %texlive-revision))
335 (url (string-append "svn://www.tug.org/texlive/tags/"
336 %texlive-tag "/Master/texmf-dist/"
337 "/tex/generic/hyph-utf8"))
338 (revision %texlive-revision)))
341 "0ghizcz7ps16dzfqf66wwg5i181assc6qsm0g7g5dbmp909931vi"))))
342 (build-system trivial-build-system)
344 `(#:modules ((guix build utils))
347 (use-modules (guix build utils))
348 (let ((target (string-append (assoc-ref %outputs "out")
349 "/share/texmf-dist/tex/generic/hyph-utf8")))
351 (copy-recursively (assoc-ref %build-inputs "source") target)
353 (home-page "http://ctan.org/pkg/hyph-utf8")
354 (synopsis "Hyphenation patterns expressed in UTF-8")
355 (description "Modern native UTF-8 engines such as XeTeX and LuaTeX need
356 hyphenation patterns in UTF-8 format, whereas older systems require
357 hyphenation patterns in the 8-bit encoding of the font in use (such encodings
358 are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1,
359 etc). The present package offers a collection of conversions of existing
360 patterns to UTF-8 format, together with converters for use with 8-bit fonts in
361 older systems. Since hyphenation patterns for Knuthian-style TeX systems are
362 only read at iniTeX time, it is hoped that the UTF-8 patterns, with their
363 converters, will completely supplant the older patterns.")
364 ;; Individual files each have their own license. Most of these files are
365 ;; independent hyphenation patterns.
366 (license (list license:lppl1.0+
381 license:public-domain
384 (define-public texlive-metafont-base
386 (name "texlive-metafont-base")
387 (version (number->string %texlive-revision))
391 (url (string-append "svn://www.tug.org/texlive/tags/"
392 %texlive-tag "/Master/texmf-dist/"
394 (revision %texlive-revision)))
397 "1yl4n8cn5xqk2nc22zgzq6ymd7bhm6xx1mz3azip7i3ki4bhb5q5"))))
398 (build-system gnu-build-system)
400 `(#:tests? #f ; no test target
402 (modify-phases %standard-phases
405 (lambda* (#:key inputs #:allow-other-keys)
406 (let ((cwd (getcwd)))
408 (string-append cwd "/base:"
415 (with-directory-excursion "build"
416 (zero? (system* "inimf" "mf.mf")))))
418 (lambda* (#:key outputs #:allow-other-keys)
419 (let* ((out (assoc-ref outputs "out"))
420 (base (string-append out "/share/texmf-dist/web2c"))
421 (mf (string-append out "/share/texmf-dist/metafont/base")))
424 (install-file "build/mf.base" base)
425 (copy-recursively "base" mf)
428 `(("texlive-bin" ,texlive-bin)))
429 (home-page "http://www.ctan.org/pkg/metafont")
430 (synopsis "Metafont base files")
431 (description "This package provides the Metafont base files needed to
432 build fonts using the Metafont system.")
433 (license license:knuth)))
435 (define-public texlive-fonts-cm
437 (name "texlive-fonts-cm")
438 (version (number->string %texlive-revision))
442 (url (string-append "svn://www.tug.org/texlive/tags/"
443 %texlive-tag "/Master/texmf-dist/"
444 "/fonts/source/public/cm"))
445 (revision %texlive-revision)))
448 "045k5b9rdmbxpy1a3006l1x96z1rd18vg3cwrvnld9bqybw5qz44"))))
449 (build-system gnu-build-system)
451 `(#:modules ((guix build gnu-build-system)
455 #:tests? #f ; no tests
457 (modify-phases %standard-phases
460 (lambda* (#:key inputs #:allow-other-keys)
461 (let ((mf (assoc-ref inputs "texlive-metafont-base")))
462 ;; Tell mf where to find mf.base
463 (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c"))
464 ;; Tell mf where to look for source files
466 (string-append (getcwd) ":"
467 mf "/share/texmf-dist/metafont/base")))
469 (every (lambda (font)
470 (format #t "building font ~a\n" font)
471 (zero? (system* "mf" "-progname=mf"
472 "-output-directory=build"
478 (basename font ".mf")))))
479 (find-files "." "cm(.*[0-9]+.*|inch)\\.mf$"))))
481 (lambda* (#:key outputs #:allow-other-keys)
482 (let* ((out (assoc-ref outputs "out"))
484 out "/share/texmf-dist/fonts/tfm/public/cm"))
486 out "/share/texmf-dist/fonts/source/public/cm")))
487 (for-each (cut install-file <> tfm)
488 (find-files "build" "\\.*"))
489 (for-each (cut install-file <> mf)
490 (find-files "." "\\.mf"))
493 `(("texlive-bin" ,texlive-bin)
494 ("texlive-metafont-base" ,texlive-metafont-base)))
495 (home-page "http://www.ctan.org/pkg/cm")
496 (synopsis "Computer Modern fonts for TeX")
497 (description "This package provides the Computer Modern fonts by Donald
498 Knuth. The Computer Modern font family is a large collection of text,
499 display, and mathematical fonts in a range of styles, based on Monotype Modern
501 (license license:knuth)))
503 (define texlive-texmf
505 (name "texlive-texmf")
507 (source texlive-texmf-src)
508 (build-system gnu-build-system)
510 `(("texlive-bin" ,texlive-bin)
513 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
517 `(#:modules ((guix build gnu-build-system)
521 ;; This package takes 4 GiB, which we can't afford to distribute from
526 (modify-phases (map (cut assq <> %standard-phases)
527 '(set-paths unpack patch-source-shebangs))
528 (add-after 'patch-source-shebangs 'install
529 (lambda* (#:key outputs #:allow-other-keys)
530 (let ((share (string-append (assoc-ref outputs "out") "/share")))
532 (system* "mv" "texmf-dist" share))))
533 (add-after 'install 'texmf-config
534 (lambda* (#:key inputs outputs #:allow-other-keys)
535 (let* ((out (assoc-ref outputs "out"))
536 (share (string-append out "/share"))
537 (texmfroot (string-append share "/texmf-dist/web2c"))
538 (texmfcnf (string-append texmfroot "/texmf.cnf"))
539 (texlive-bin (assoc-ref inputs "texlive-bin"))
540 (texbin (string-append texlive-bin "/bin"))
541 (tlpkg (string-append texlive-bin "/share/tlpkg")))
542 ;; Register SHARE as TEXMFROOT in texmf.cnf.
543 (substitute* texmfcnf
544 (("TEXMFROOT = \\$SELFAUTOPARENT")
545 (string-append "TEXMFROOT = " share))
546 (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local")
547 "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local")
548 (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL"))
549 ;; Register paths in texmfcnf.lua, needed for context.
550 (substitute* (string-append texmfroot "/texmfcnf.lua")
551 (("selfautodir:") out)
552 (("selfautoparent:") (string-append share "/")))
553 ;; Set path to TeXLive Perl modules
555 (string-append (getenv "PERL5LIB") ":" tlpkg))
556 ;; Configure the texmf-dist tree; inspired from
557 ;; http://slackbuilds.org/repository/13.37/office/texlive/
558 (setenv "PATH" (string-append (getenv "PATH") ":" texbin))
559 (setenv "TEXMFCNF" texmfroot)
560 (system* "updmap-sys" "--nohash" "--syncwithtrees")
562 (system* "fmtutil-sys" "--all")))))))
563 (properties `((max-silent-time . 9600))) ; don't time out while grafting
564 (synopsis "TeX Live, a package of the TeX typesetting system")
566 "TeX Live provides a comprehensive TeX document production system.
567 It includes all the major TeX-related programs, macro packages, and fonts
568 that are free software, including support for many languages around the
571 This package contains the complete tree of texmf-dist data.")
572 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
573 (home-page "https://www.tug.org/texlive/")))
575 (define-public texlive
580 (build-system trivial-build-system)
581 (inputs `(("bash" ,bash) ; for wrap-program
582 ("texlive-bin" ,texlive-bin)
583 ("texlive-texmf" ,texlive-texmf)))
585 (list (search-path-specification
586 (variable "TEXMFLOCAL")
587 (files '("share/texmf-local")))))
589 `(#:modules ((guix build utils))
591 ;; Build the union of texlive-bin and texlive-texmf, but take the
592 ;; conflicting subdirectory share/texmf-dist from texlive-texmf.
594 (use-modules (guix build utils))
595 (let ((out (assoc-ref %outputs "out"))
596 (bin (assoc-ref %build-inputs "texlive-bin"))
597 (texmf (assoc-ref %build-inputs "texlive-texmf"))
598 (bash (assoc-ref %build-inputs "bash")))
600 (with-directory-excursion out
603 (symlink (string-append bin "/" name) name))
606 (with-directory-excursion "bin"
607 (setenv "PATH" (string-append bash "/bin"))
610 (symlink name (basename name))
614 (,(string-append texmf "/share/texmf-dist/web2c")))))
615 (find-files (string-append bin "/bin/") "")))
617 (with-directory-excursion "share"
620 (symlink (string-append bin "/share/" name) name))
621 '("info" "man" "tlpkg"))
624 (symlink (string-append texmf "/share/" name) name))
625 '("texmf-dist" "texmf-var"))))))))
626 (synopsis "TeX Live, a package of the TeX typesetting system")
628 "TeX Live provides a comprehensive TeX document production system.
629 It includes all the major TeX-related programs, macro packages, and fonts
630 that are free software, including support for many languages around the
633 This package contains the complete TeX Live distribution.")
634 (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
635 (home-page "https://www.tug.org/texlive/")))
638 ;; texlive-texmf-minimal is a pruned, small version of the texlive tree,
639 ;; in particular dropping documentation and fonts. It weighs in at 470 MiB
641 (define texlive-texmf-minimal
642 (package (inherit texlive-texmf)
643 (name "texlive-texmf-minimal")
645 (substitute-keyword-arguments
646 (package-arguments texlive-texmf)
652 `(modify-phases ,phases
653 (add-after 'unpack 'prune
655 (define (delete subdir exclude)
656 "Delete all files and directories in SUBDIR except for those
657 given in the list EXCLUDE."
658 (with-directory-excursion subdir
659 (for-each delete-file-recursively
660 (lset-difference equal?
664 (with-directory-excursion "texmf-dist"
665 (for-each delete-file-recursively
666 '("doc" "source" "tex4ht"))
667 ;; Delete all subdirectories of "fonts", except for "tfm" and
668 ;; any directories named "cm".
669 (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1"))
670 (delete "fonts/afm" '("public"))
671 (delete "fonts/afm/public" '("amsfonts"))
672 (delete "fonts/afm/public/amsfonts" '("cm"))
673 (delete "fonts/map" '("dvips"))
674 (delete "fonts/map/dvips" '("cm"))
675 (delete "fonts/source" '("public"))
676 (delete "fonts/source/public" '("cm"))
677 (delete "fonts/tfm" '("public"))
678 (delete "fonts/type1" '("public"))
679 (delete "fonts/type1/public" '("amsfonts"))
680 (delete "fonts/type1/public/amsfonts" '("cm")))
683 "TeX Live provides a comprehensive TeX document production system.
684 It includes all the major TeX-related programs, macro packages, and fonts
685 that are free software, including support for many languages around the
688 This package contains a small subset of the texmf-dist data.")))
691 ;; texlive-minimal is the same as texlive, but using texlive-texmf-minimal
692 ;; instead of the full texlive-texmf. It can be used, for instance, as a
693 ;; native input to packages that need texlive to build their documentation.
694 (define-public texlive-minimal
695 (package (inherit texlive)
696 (name "texlive-minimal")
698 `(("texlive-texmf" ,texlive-texmf-minimal)
699 ,@(alist-delete "texlive-texmf" (package-inputs texlive))))
701 (list (search-path-specification
702 (variable "TEXMFLOCAL")
703 (files '("share/texmf-local")))))
705 "TeX Live provides a comprehensive TeX document production system.
706 It includes all the major TeX-related programs, macro packages, and fonts
707 that are free software, including support for many languages around the
710 This package contains a small working part of the TeX Live distribution.")))
712 (define-public perl-text-bibtex
714 (name "perl-text-bibtex")
719 (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-"
723 "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4"))))
724 (build-system perl-build-system)
727 (modify-phases %standard-phases
728 (add-after 'unpack 'add-output-directory-to-rpath
729 (lambda* (#:key outputs #:allow-other-keys)
730 (substitute* "inc/MyBuilder.pm"
732 (string-append "-Wl,-rpath="
733 (assoc-ref outputs "out") "/lib " line)))
735 (add-after 'unpack 'install-libraries-to-/lib
736 (lambda* (#:key outputs #:allow-other-keys)
737 (substitute* "Build.PL"
741 `(("perl-capture-tiny" ,perl-capture-tiny)
742 ("perl-config-autoconf" ,perl-config-autoconf)
743 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
744 ("perl-module-build" ,perl-module-build)))
745 (home-page "http://search.cpan.org/dist/Text-BibTeX")
746 (synopsis "Interface to read and parse BibTeX files")
747 (description "@code{Text::BibTeX} is a Perl library for reading, parsing,
748 and processing BibTeX files. @code{Text::BibTeX} gives you access to the data
749 at many different levels: you may work with BibTeX entries as simple field to
750 string mappings, or get at the original form of the data as a list of simple
751 values (strings, macros, or numbers) pasted together.")
752 (license license:perl-license)))
760 (uri (string-append "https://github.com/plk/biber/archive/v"
762 (file-name (string-append name "-" version ".tar.gz"))
765 "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp"))))
766 (build-system perl-build-system)
769 (modify-phases %standard-phases
770 (add-after 'install 'wrap-programs
771 (lambda* (#:key outputs #:allow-other-keys)
772 (let* ((out (assoc-ref outputs "out"))
773 (perl5lib (getenv "PERL5LIB")))
774 (wrap-program (string-append out "/bin/biber")
775 `("PERL5LIB" ":" prefix
776 (,(string-append perl5lib ":" out
777 "/lib/perl5/site_perl")))))
780 `(("perl-autovivification" ,perl-autovivification)
781 ("perl-class-accessor" ,perl-class-accessor)
782 ("perl-data-dump" ,perl-data-dump)
783 ("perl-data-compare" ,perl-data-compare)
784 ("perl-data-uniqid" ,perl-data-uniqid)
785 ("perl-datetime-format-builder" ,perl-datetime-format-builder)
786 ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian)
787 ("perl-file-slurp" ,perl-file-slurp)
788 ("perl-ipc-cmd" ,perl-ipc-cmd)
789 ("perl-ipc-run3" ,perl-ipc-run3)
790 ("perl-list-allutils" ,perl-list-allutils)
791 ("perl-list-moreutils" ,perl-list-moreutils)
792 ("perl-mozilla-ca" ,perl-mozilla-ca)
793 ("perl-regexp-common" ,perl-regexp-common)
794 ("perl-log-log4perl" ,perl-log-log4perl)
795 ;; We cannot use perl-unicode-collate here, because otherwise the
796 ;; hardcoded hashes in the tests would differ. See
797 ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html
798 ;;("perl-unicode-collate" ,perl-unicode-collate)
799 ("perl-unicode-normalize" ,perl-unicode-normalize)
800 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
801 ("perl-encode-eucjpascii" ,perl-encode-eucjpascii)
802 ("perl-encode-jis2k" ,perl-encode-jis2k)
803 ("perl-encode-hanextra" ,perl-encode-hanextra)
804 ("perl-xml-libxml" ,perl-xml-libxml)
805 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)
806 ("perl-xml-libxslt" ,perl-xml-libxslt)
807 ("perl-xml-writer" ,perl-xml-writer)
808 ("perl-sort-key" ,perl-sort-key)
809 ("perl-text-csv" ,perl-text-csv)
810 ("perl-text-csv-xs" ,perl-text-csv-xs)
811 ("perl-text-roman" ,perl-text-roman)
812 ("perl-uri" ,perl-uri)
813 ("perl-text-bibtex" ,perl-text-bibtex)
814 ("perl-libwww" ,perl-libwww)
815 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
816 ("perl-business-isbn" ,perl-business-isbn)
817 ("perl-business-issn" ,perl-business-issn)
818 ("perl-business-ismn" ,perl-business-ismn)
819 ("perl-lingua-translit" ,perl-lingua-translit)))
821 `(("perl-config-autoconf" ,perl-config-autoconf)
822 ("perl-extutils-libbuilder" ,perl-extutils-libbuilder)
823 ("perl-module-build" ,perl-module-build)
825 ("perl-file-which" ,perl-file-which)
826 ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient
827 ("perl-test-differences" ,perl-test-differences)))
828 (home-page "http://biblatex-biber.sourceforge.net/")
829 (synopsis "Backend for the BibLaTeX citation management tool")
830 (description "Biber is a BibTeX replacement for users of biblatex. Among
831 other things it comes with full Unicode support.")
832 (license license:artistic2.0)))
834 ;; Our version of texlive comes with biblatex 3.4, which is only compatible
835 ;; with biber 2.5 according to the compatibility matrix in the biber
837 (define-public biber-2.5
838 (package (inherit biber)
843 (uri (string-append "https://github.com/plk/biber/archive/v"
845 (file-name (string-append name "-" version ".tar.gz"))
848 "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv"))))
850 (substitute-keyword-arguments (package-arguments biber)
852 `(modify-phases ,phases
853 (add-before 'check 'delete-failing-test
855 (delete-file "t/sort-order.t")
858 `(("perl-date-simple" ,perl-date-simple)
859 ,@(package-inputs biber)))))
861 (define-public rubber
867 (uri (list (string-append "https://launchpad.net/rubber/trunk/"
868 version "/+download/rubber-"
870 (string-append "http://ebeffara.free.fr/pub/rubber-"
874 "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq"))))
875 (build-system gnu-build-system)
876 (arguments '(#:tests? #f)) ; no `check' target
877 (inputs `(("texinfo" ,texinfo)
878 ("python" ,python-2) ; incompatible with Python 3 (print syntax)
880 (home-page "https://launchpad.net/rubber")
881 (synopsis "Wrapper for LaTeX and friends")
883 "Rubber is a program whose purpose is to handle all tasks related to the
884 compilation of LaTeX documents. This includes compiling the document itself,
885 of course, enough times so that all references are defined, and running BibTeX
886 to manage bibliographic references. Automatic execution of dvips to produce
887 PostScript documents is also included, as well as usage of pdfLaTeX to produce
889 (license license:gpl2+)))
891 (define-public texmaker
897 (uri (string-append "http://www.xm1math.net/texmaker/texmaker-"
901 "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c"))))
902 (build-system gnu-build-system)
905 (modify-phases %standard-phases
906 ;; Qt has its own configuration utility.
908 (lambda* (#:key outputs #:allow-other-keys)
909 (let ((out (assoc-ref outputs "out")))
910 (zero? (system* "qmake"
911 (string-append "PREFIX=" out)
912 (string-append "DESKTOPDIR=" out
913 "/share/applications")
914 (string-append "ICONDIR=" out "/share/pixmaps")
915 "texmaker.pro"))))))))
917 `(("poppler-qt5" ,poppler-qt5)
919 ("qtscript" ,qtscript)
920 ("qtwebkit" ,qtwebkit)
923 `(("pkg-config" ,pkg-config)))
924 (home-page "http://www.xm1math.net/texmaker/")
925 (synopsis "LaTeX editor")
926 (description "Texmaker is a program that integrates many tools needed to
927 develop documents with LaTeX, in a single application.")
928 (license license:gpl2+)))
931 (define-public teximpatient
933 (name "teximpatient")
937 (uri (string-append "mirror://gnu/" name "/" name "-"
941 "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd"))))
942 (build-system gnu-build-system)
945 (modify-phases %standard-phases
947 ;; Unfortunately some mistakes have been made in packaging.
948 ;; Work around them here ...
950 (lambda* (#:key inputs outputs #:allow-other-keys)
951 (let ((srcdir "teximpatient-2.4"))
952 (system* "tar" "-xzf" (assoc-ref inputs "source")
953 (string-append "--one-top-level=" srcdir))
954 (delete-file (string-append srcdir "/book.pdf"))
957 (assoc-ref inputs "automake")
962 `(("texlive" ,texlive)
963 ("automake" ,automake)))
964 (home-page "https://www.gnu.org/software/teximpatient/")
965 (synopsis "Book on TeX, plain TeX and Eplain")
966 (description "@i{TeX for the Impatient} is a ~350 page book on TeX,
967 plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves,
969 (license license:fdl1.3+)))