| 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> |
| 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 | |
| 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 build-system texlive) |
| 34 | #:use-module (guix utils) |
| 35 | #:use-module (guix git-download) |
| 36 | #:use-module (guix svn-download) |
| 37 | #:use-module (gnu packages) |
| 38 | #:use-module (gnu packages autotools) |
| 39 | #:use-module (gnu packages bash) |
| 40 | #:use-module (gnu packages compression) |
| 41 | #:use-module (gnu packages fontutils) |
| 42 | #:use-module (gnu packages gd) |
| 43 | #:use-module (gnu packages ghostscript) |
| 44 | #:use-module (gnu packages gtk) |
| 45 | #:use-module (gnu packages icu4c) |
| 46 | #:use-module (gnu packages image) |
| 47 | #:use-module (gnu packages lua) |
| 48 | #:use-module (gnu packages multiprecision) |
| 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) |
| 53 | #:use-module (gnu packages qt) |
| 54 | #:use-module (gnu packages ruby) |
| 55 | #:use-module (gnu packages shells) |
| 56 | #:use-module (gnu packages base) |
| 57 | #:use-module (gnu packages web) |
| 58 | #:use-module (gnu packages xml) |
| 59 | #:use-module (gnu packages xorg) |
| 60 | #:use-module (gnu packages xdisorg) |
| 61 | #:autoload (gnu packages texinfo) (texinfo) |
| 62 | #:use-module (ice-9 ftw) |
| 63 | #:use-module (ice-9 match) |
| 64 | #:use-module ((srfi srfi-1) #:hide (zip))) |
| 65 | |
| 66 | (define texlive-extra-src |
| 67 | (origin |
| 68 | (method url-fetch) |
| 69 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-extra.tar.xz") |
| 70 | (sha256 (base32 |
| 71 | "0q4a92zmwhn4ry6xgrp4k8wq11ax2sg9rg9yrsrdkr719y0x887a")))) |
| 72 | |
| 73 | (define texlive-texmf-src |
| 74 | (origin |
| 75 | (method url-fetch) |
| 76 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz") |
| 77 | (patches (search-patches "texlive-texmf-CVE-2016-10243.patch")) |
| 78 | (patch-flags '("-p2")) |
| 79 | (sha256 (base32 |
| 80 | "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr")))) |
| 81 | |
| 82 | (define-public texlive-bin |
| 83 | (package |
| 84 | (name "texlive-bin") |
| 85 | (version "2016") |
| 86 | (source |
| 87 | (origin |
| 88 | (method url-fetch) |
| 89 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz") |
| 90 | (sha256 (base32 |
| 91 | "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8")))) |
| 92 | (build-system gnu-build-system) |
| 93 | (inputs |
| 94 | `(("texlive-extra-src" ,texlive-extra-src) |
| 95 | ("cairo" ,cairo) |
| 96 | ("fontconfig" ,fontconfig) |
| 97 | ("fontforge" ,fontforge) |
| 98 | ("freetype" ,freetype) |
| 99 | ("gd" ,gd) |
| 100 | ("gmp" ,gmp) |
| 101 | ("ghostscript" ,ghostscript) |
| 102 | ("graphite2" ,graphite2) |
| 103 | ("harfbuzz" ,harfbuzz) |
| 104 | ("icu4c" ,icu4c) |
| 105 | ("libpaper" ,libpaper) |
| 106 | ("libpng" ,libpng) |
| 107 | ("libxaw" ,libxaw) |
| 108 | ("libxt" ,libxt) |
| 109 | ("mpfr" ,mpfr) |
| 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))) |
| 120 | (native-inputs |
| 121 | `(("pkg-config" ,pkg-config))) |
| 122 | (arguments |
| 123 | `(#:out-of-source? #t |
| 124 | #:configure-flags |
| 125 | `("--disable-native-texlive-build" |
| 126 | "--with-system-cairo" |
| 127 | "--with-system-freetype2" |
| 128 | "--with-system-gd" |
| 129 | "--with-system-gmp" |
| 130 | "--with-system-graphite2" |
| 131 | "--with-system-harfbuzz" |
| 132 | "--with-system-icu" |
| 133 | "--with-system-libgs" |
| 134 | "--with-system-libpaper" |
| 135 | "--with-system-libpng" |
| 136 | "--with-system-mpfr" |
| 137 | "--with-system-pixman" |
| 138 | "--with-system-poppler" |
| 139 | "--with-system-potrace" |
| 140 | "--with-system-teckit" |
| 141 | "--with-system-xpdf" |
| 142 | "--with-system-zlib" |
| 143 | "--with-system-zziplib") |
| 144 | |
| 145 | ;; Disable tests on mips64 to cope with a failure of luajiterr.test. |
| 146 | ;; XXX FIXME fix luajit properly on mips64. |
| 147 | #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system) |
| 148 | (%current-system)))) |
| 149 | #:phases |
| 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)))))))) |
| 173 | (synopsis "TeX Live, a package of the TeX typesetting system") |
| 174 | (description |
| 175 | "TeX Live provides a comprehensive TeX document production system. |
| 176 | It includes all the major TeX-related programs, macro packages, and fonts |
| 177 | that are free software, including support for many languages around the |
| 178 | world. |
| 179 | |
| 180 | This package contains the binaries.") |
| 181 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
| 182 | (home-page "https://www.tug.org/texlive/"))) |
| 183 | |
| 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 | "0fcy2hpapbj01ncpjj3v39yhr0jjxb6rm13qaxjjw66s3vydxls1")))) |
| 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 |
| 212 | to PostScript.") |
| 213 | ;; Various free software licenses apply to individual files. |
| 214 | (license (list license:lppl1.3c+ |
| 215 | license:expat |
| 216 | license:lgpl3+)))) |
| 217 | |
| 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 |
| 246 | data for TeX use. It contains a set of text files provided by the Unicode |
| 247 | Consortium 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 |
| 249 | Database. Accompanying these source data are generic TeX loader files |
| 250 | allowing this data to be used as part of TeX runs, in particular in building |
| 251 | format files. Currently there are two loader files: one for general character |
| 252 | set up and one for initializing XeTeX character classes as has been carried |
| 253 | out to date by @code{unicode-letters.tex}. ") |
| 254 | (license license:lppl1.3c+))) |
| 255 | |
| 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 |
| 284 | the German language, covering both traditional and reformed orthography. The |
| 285 | patterns can be used with packages Babel and hyphsubst from the Oberdiek |
| 286 | bundle.") |
| 287 | ;; Hyphenation patterns are under the Expat license; documentation is |
| 288 | ;; under LPPL. |
| 289 | (license (list license:expat license:lppl)))) |
| 290 | |
| 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 |
| 319 | for creating TeX formats. These files are commonly used to introduced |
| 320 | distribution-dependent variations in formats. They are also used to |
| 321 | allow existing format source files to be used with newer engines, for example |
| 322 | to adapt the plain e-TeX source file to work with XeTeX and LuaTeX.") |
| 323 | (license license:public-domain))) |
| 324 | |
| 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 |
| 353 | hyphenation patterns in UTF-8 format, whereas older systems require |
| 354 | hyphenation patterns in the 8-bit encoding of the font in use (such encodings |
| 355 | are codified in the LaTeX scheme with names like OT1, T2A, TS1, OML, LY1, |
| 356 | etc). The present package offers a collection of conversions of existing |
| 357 | patterns to UTF-8 format, together with converters for use with 8-bit fonts in |
| 358 | older systems. Since hyphenation patterns for Knuthian-style TeX systems are |
| 359 | only read at iniTeX time, it is hoped that the UTF-8 patterns, with their |
| 360 | converters, 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 | |
| 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 |
| 429 | build fonts using the Metafont system.") |
| 430 | (license license:knuth))) |
| 431 | |
| 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 |
| 495 | Knuth. The Computer Modern font family is a large collection of text, |
| 496 | display, and mathematical fonts in a range of styles, based on Monotype Modern |
| 497 | 8A.") |
| 498 | (license license:knuth))) |
| 499 | |
| 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 |
| 559 | from Donald Knuth, including the plain format, plain base, and the MF logo |
| 560 | fonts.") |
| 561 | (license license:knuth))) |
| 562 | |
| 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 |
| 632 | packages and classes. It includes invisible fonts (for use with the slides |
| 633 | class), line and circle fonts (for use in the picture environment) and LaTeX |
| 634 | symbol fonts.") |
| 635 | (license license:lppl1.2+))) |
| 636 | |
| 637 | (define-public texlive-fonts-amsfonts |
| 638 | (package |
| 639 | (name "texlive-fonts-amsfonts") |
| 640 | (version (number->string %texlive-revision)) |
| 641 | (source (origin |
| 642 | (method svn-fetch) |
| 643 | (uri (svn-reference |
| 644 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 645 | %texlive-tag "/Master/texmf-dist/" |
| 646 | "/fonts/source/public/amsfonts")) |
| 647 | (revision %texlive-revision))) |
| 648 | (sha256 |
| 649 | (base32 |
| 650 | "07h20rvpbdb4k72hzmjkyb29426zr9wxsfp6yd4ajbbpd3vx8grb")))) |
| 651 | (build-system gnu-build-system) |
| 652 | (arguments |
| 653 | `(#:modules ((guix build gnu-build-system) |
| 654 | (guix build utils) |
| 655 | (srfi srfi-1) |
| 656 | (srfi srfi-26)) |
| 657 | #:tests? #f ; no tests |
| 658 | #:phases |
| 659 | (modify-phases %standard-phases |
| 660 | (delete 'configure) |
| 661 | (replace 'build |
| 662 | (lambda* (#:key inputs #:allow-other-keys) |
| 663 | (let ((mf (assoc-ref inputs "texlive-metafont-base")) |
| 664 | (cwd (getcwd))) |
| 665 | ;; Tell mf where to find mf.base |
| 666 | (setenv "MFBASES" (string-append mf "/share/texmf-dist/web2c")) |
| 667 | ;; Tell mf where to look for source files |
| 668 | (setenv "MFINPUTS" |
| 669 | (string-append cwd ":" |
| 670 | cwd "/cmextra:" |
| 671 | cwd "/cyrillic:" |
| 672 | cwd "/dummy:" |
| 673 | cwd "/symbols:" |
| 674 | mf "/share/texmf-dist/metafont/base:" |
| 675 | (assoc-ref inputs "texlive-fonts-cm") |
| 676 | "/share/texmf-dist/fonts/source/public/cm"))) |
| 677 | (mkdir "build") |
| 678 | (every (lambda (font) |
| 679 | (format #t "building font ~a\n" (basename font ".mf")) |
| 680 | (with-directory-excursion (dirname font) |
| 681 | (zero? (system* "mf" "-progname=mf" |
| 682 | "-output-directory=../build" |
| 683 | (string-append "\\" |
| 684 | "mode:=ljfour; " |
| 685 | "mag:=1; " |
| 686 | "nonstopmode; " |
| 687 | "input " |
| 688 | (getcwd) "/" |
| 689 | (basename font ".mf")))))) |
| 690 | (find-files "." "[0-9]+\\.mf$")))) |
| 691 | (replace 'install |
| 692 | (lambda* (#:key outputs #:allow-other-keys) |
| 693 | (let* ((out (assoc-ref outputs "out")) |
| 694 | (tfm (string-append |
| 695 | out "/share/texmf-dist/fonts/tfm/public/amsfonts")) |
| 696 | (mf (string-append |
| 697 | out "/share/texmf-dist/fonts/source/public/amsfonts"))) |
| 698 | (for-each (cut install-file <> tfm) |
| 699 | (find-files "build" "\\.*")) |
| 700 | (for-each (cut install-file <> mf) |
| 701 | (find-files "." "\\.mf")) |
| 702 | #t)))))) |
| 703 | (native-inputs |
| 704 | `(("texlive-fonts-cm" ,texlive-fonts-cm) |
| 705 | ("texlive-metafont-base" ,texlive-metafont-base) |
| 706 | ("texlive-bin" ,texlive-bin))) |
| 707 | (home-page "http://www.ctan.org/pkg/amsfonts") |
| 708 | (synopsis "TeX fonts from the American Mathematical Society") |
| 709 | (description |
| 710 | "This package provides an extended set of fonts for use in mathematics, |
| 711 | including: extra mathematical symbols; blackboard bold letters (uppercase |
| 712 | only); fraktur letters; subscript sizes of bold math italic and bold Greek |
| 713 | letters; subscript sizes of large symbols such as sum and product; added sizes |
| 714 | of the Computer Modern small caps font; cyrillic fonts (from the University of |
| 715 | Washington); Euler mathematical fonts. All fonts are provided as Adobe Type 1 |
| 716 | files, and all except the Euler fonts are provided as Metafont source. The |
| 717 | distribution also includes the canonical Type 1 versions of the Computer |
| 718 | Modern family of fonts. The Euler fonts are supported by separate packages; |
| 719 | details can be found in the documentation.") |
| 720 | (license license:silofl1.1))) |
| 721 | |
| 722 | ;; This provides etex.src which is needed to build various formats, including |
| 723 | ;; luatex.fmt and pdflatex.fmt |
| 724 | (define-public texlive-tex-plain |
| 725 | (package |
| 726 | (name "texlive-tex-plain") |
| 727 | (version (number->string %texlive-revision)) |
| 728 | (source (origin |
| 729 | (method svn-fetch) |
| 730 | (uri (svn-reference |
| 731 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 732 | %texlive-tag "/Master/texmf-dist/" |
| 733 | "/tex/plain")) |
| 734 | (revision %texlive-revision))) |
| 735 | (sha256 |
| 736 | (base32 |
| 737 | "0mjgl3gscn3ps29yjambz1j9fg81ynnncb96vpprwx4xsijhsns0")))) |
| 738 | (build-system trivial-build-system) |
| 739 | (arguments |
| 740 | `(#:modules ((guix build utils)) |
| 741 | #:builder |
| 742 | (begin |
| 743 | (use-modules (guix build utils)) |
| 744 | (let ((target (string-append (assoc-ref %outputs "out") |
| 745 | "/share/texmf-dist/tex/plain"))) |
| 746 | (mkdir-p target) |
| 747 | (copy-recursively (assoc-ref %build-inputs "source") target) |
| 748 | #t)))) |
| 749 | (home-page "https://www.ctan.org/pkg/plain") |
| 750 | (synopsis "Plain TeX format and supporting files") |
| 751 | (description |
| 752 | "Contains files used to build the Plain TeX format, as described in the |
| 753 | TeXbook, together with various supporting files (some also discussed in the |
| 754 | book).") |
| 755 | (license license:knuth))) |
| 756 | |
| 757 | (define-public texlive-latex-base |
| 758 | (let ((texlive-dir |
| 759 | (lambda (dir hash) |
| 760 | (origin |
| 761 | (method svn-fetch) |
| 762 | (uri (svn-reference |
| 763 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 764 | %texlive-tag "/Master/texmf-dist/" |
| 765 | dir)) |
| 766 | (revision %texlive-revision))) |
| 767 | (sha256 (base32 hash)))))) |
| 768 | (package |
| 769 | (name "texlive-latex-base") |
| 770 | (version (number->string %texlive-revision)) |
| 771 | (source (origin |
| 772 | (method svn-fetch) |
| 773 | (uri (texlive-ref "latex" "base")) |
| 774 | (sha256 |
| 775 | (base32 |
| 776 | "1h9pir2hz6i9avc4lrl733p3zf4rpkg8537x1zdbhs91hvhikw9k")))) |
| 777 | (build-system gnu-build-system) |
| 778 | (arguments |
| 779 | `(#:modules ((guix build gnu-build-system) |
| 780 | (guix build utils) |
| 781 | (ice-9 match) |
| 782 | (srfi srfi-1) |
| 783 | (srfi srfi-26)) |
| 784 | #:tests? #f ; no tests |
| 785 | #:phases |
| 786 | (modify-phases %standard-phases |
| 787 | (delete 'configure) |
| 788 | (replace 'build |
| 789 | (lambda* (#:key inputs #:allow-other-keys) |
| 790 | ;; Find required fonts |
| 791 | (setenv "TFMFONTS" |
| 792 | (string-append (assoc-ref inputs "texlive-fonts-cm") |
| 793 | "/share/texmf-dist/fonts/tfm/public/cm:" |
| 794 | (assoc-ref inputs "texlive-fonts-latex") |
| 795 | "/share/texmf-dist/fonts/tfm/public/latex-fonts:" |
| 796 | (assoc-ref inputs "texlive-fonts-knuth-lib") |
| 797 | "/share/texmf-dist/fonts/tfm/public/knuth-lib")) |
| 798 | (setenv "TEXINPUTS" |
| 799 | (string-append |
| 800 | (getcwd) ":" |
| 801 | (getcwd) "/build:" |
| 802 | (string-join |
| 803 | (append-map (match-lambda |
| 804 | ((_ . dir) |
| 805 | (find-files dir |
| 806 | (lambda (_ stat) |
| 807 | (eq? 'directory (stat:type stat))) |
| 808 | #:directories? #t |
| 809 | #:stat stat))) |
| 810 | inputs) |
| 811 | ":"))) |
| 812 | |
| 813 | ;; Create an empty texsys.cfg, because latex.ltx wants to include |
| 814 | ;; it. This file must exist and it's fine if it's empty. |
| 815 | (with-output-to-file "texsys.cfg" |
| 816 | (lambda _ (format #t "%"))) |
| 817 | |
| 818 | (mkdir "build") |
| 819 | (mkdir "web2c") |
| 820 | (and (zero? (system* "luatex" "-ini" "-interaction=batchmode" |
| 821 | "-output-directory=build" |
| 822 | "unpack.ins")) |
| 823 | (zero? (system* "tex" "-ini" "-interaction=batchmode" |
| 824 | "-output-directory=web2c" |
| 825 | "tex.ini")) |
| 826 | ;; LaTeX, pdfetex/pdftex, and XeTeX require e-TeX, which |
| 827 | ;; is enabled only in extended mode (activated with a |
| 828 | ;; leading asterisk). We should not use luatex here, |
| 829 | ;; because that would make the generated format files |
| 830 | ;; incompatible with any other TeX engine. |
| 831 | (every |
| 832 | (lambda (format) |
| 833 | (zero? (system* "latex" "-ini" "-interaction=batchmode" |
| 834 | "-output-directory=web2c" |
| 835 | "-translate-file=cp227.tcx" |
| 836 | (string-append "*" format ".ini")))) |
| 837 | '("latex" |
| 838 | "pdflatex" |
| 839 | "pdfetex")) |
| 840 | (every |
| 841 | (lambda (format) |
| 842 | (zero? (system* format "-ini" "-interaction=batchmode" |
| 843 | "-output-directory=web2c" |
| 844 | (string-append "*" format ".ini")))) |
| 845 | '("xetex" |
| 846 | "xelatex")) |
| 847 | (every |
| 848 | (lambda (format) |
| 849 | (zero? (system* "luatex" "-ini" "-interaction=batchmode" |
| 850 | "-output-directory=web2c" |
| 851 | (string-append format ".ini")))) |
| 852 | '("dviluatex" "dvilualatex" "luatex" "lualatex"))))) |
| 853 | (replace 'install |
| 854 | (lambda* (#:key outputs #:allow-other-keys) |
| 855 | (let* ((out (assoc-ref outputs "out")) |
| 856 | (target (string-append |
| 857 | out "/share/texmf-dist/tex/latex/base")) |
| 858 | (web2c (string-append |
| 859 | out "/share/texmf-dist/web2c"))) |
| 860 | (mkdir-p target) |
| 861 | (mkdir-p web2c) |
| 862 | (for-each delete-file (find-files "." "\\.(log|aux)$")) |
| 863 | (for-each (cut install-file <> target) |
| 864 | (find-files "build" ".*")) |
| 865 | (for-each (cut install-file <> web2c) |
| 866 | (find-files "web2c" ".*")) |
| 867 | ;; pdftex is really just the same as pdfetex, but since it |
| 868 | ;; doesn't have its own format file, we need to copy it. |
| 869 | (copy-file "web2c/pdfetex.fmt" |
| 870 | (string-append web2c "/pdftex.fmt")) |
| 871 | #t)))))) |
| 872 | (native-inputs |
| 873 | `(("texlive-bin" ,texlive-bin) |
| 874 | ("texlive-generic-unicode-data" ,texlive-generic-unicode-data) |
| 875 | ("texlive-generic-dehyph-exptl" ,texlive-generic-dehyph-exptl) |
| 876 | ("texlive-generic-tex-ini-files" ,texlive-generic-tex-ini-files) |
| 877 | ("texlive-latex-latexconfig" |
| 878 | ,(texlive-dir "tex/latex/latexconfig/" |
| 879 | "1zb3j49cj8p75yph6c8iysjp7qbdvghwf0mn9j0l7qq3qkbz2xaf")) |
| 880 | ("texlive-generic-hyph-utf8" ,texlive-generic-hyph-utf8) |
| 881 | ("texlive-generic-hyphen" |
| 882 | ,(texlive-dir "tex/generic/hyphen/" |
| 883 | "0xim36wybw2625yd0zwlp9m2c2xrcybw58gl4rih9nkph0wqwwhd")) |
| 884 | ("texlive-generic-ruhyphen" |
| 885 | ,(texlive-dir "tex/generic/ruhyphen/" |
| 886 | "14rjkpl4zkjqs13rcf9kcd24mn2kx7i1jbdwxq8ds94bi66ylzsd")) |
| 887 | ("texlive-generic-ukrhyph" |
| 888 | ,(texlive-dir "tex/generic/ukrhyph/" |
| 889 | "1cfwdg2rhbayl3w0x1xqd36d45zbc96f029myp13s7cb6kbmbppv")) |
| 890 | ("texlive-generic-config" |
| 891 | ,(texlive-dir "tex/generic/config/" |
| 892 | "19vj088p4kkp6xll0141m4kl6ssgdzhs3g10i232khb07aqiag8s")) |
| 893 | ("texlive-tex-plain" ,texlive-tex-plain) |
| 894 | ("texlive-fonts-cm" ,texlive-fonts-cm) |
| 895 | ("texlive-fonts-latex" ,texlive-fonts-latex) |
| 896 | ("texlive-fonts-knuth-lib" ,texlive-fonts-knuth-lib))) |
| 897 | (home-page "http://www.ctan.org/pkg/latex-base") |
| 898 | (synopsis "Base sources of LaTeX") |
| 899 | (description |
| 900 | "This bundle comprises the source of LaTeX itself, together with several |
| 901 | packages which are considered \"part of the kernel\". This bundle, together |
| 902 | with the required packages, constitutes what every LaTeX distribution should |
| 903 | contain.") |
| 904 | (license license:lppl1.3c+)))) |
| 905 | |
| 906 | (define-public texlive-latex-filecontents |
| 907 | (package |
| 908 | (name "texlive-latex-filecontents") |
| 909 | (version (number->string %texlive-revision)) |
| 910 | (source (origin |
| 911 | (method svn-fetch) |
| 912 | (uri (texlive-ref "latex" "filecontents")) |
| 913 | (sha256 |
| 914 | (base32 |
| 915 | "0swkbxv8vg0yizadfnvrwjb4cj0pn34v9wm6v7wqq903fdav7k7q")))) |
| 916 | (build-system texlive-build-system) |
| 917 | (arguments '(#:tex-directory "latex/filecontents")) |
| 918 | (home-page "http://www.ctan.org/pkg/filecontents") |
| 919 | (synopsis "Extended filecontents and filecontents* environments") |
| 920 | (description |
| 921 | "LaTeX2e's @code{filecontents} and @code{filecontents*} environments |
| 922 | enable a LaTeX source file to generate external files as it runs through |
| 923 | LaTeX. However, there are two limitations of these environments: they refuse |
| 924 | to overwrite existing files, and they can only be used in the preamble of a |
| 925 | document. The filecontents package removes these limitations, letting you |
| 926 | overwrite existing files and letting you use @code{filecontents} / |
| 927 | @code{filecontents*} anywhere.") |
| 928 | (license license:lppl1.3c+))) |
| 929 | |
| 930 | (define-public texlive-generic-ifxetex |
| 931 | (package |
| 932 | (name "texlive-generic-ifxetex") |
| 933 | (version (number->string %texlive-revision)) |
| 934 | (source (origin |
| 935 | (method svn-fetch) |
| 936 | (uri (texlive-ref "generic" "ifxetex")) |
| 937 | (sha256 |
| 938 | (base32 |
| 939 | "0w2xj7n0szavj329kds09q626szkc378p3w0sk022q0ln4ksz86d")))) |
| 940 | (build-system texlive-build-system) |
| 941 | (arguments |
| 942 | '(#:tex-directory "generic/ifxetex" |
| 943 | #:tex-format "xelatex")) |
| 944 | (inputs |
| 945 | `(("texlive-latex-filecontents" ,texlive-latex-filecontents))) |
| 946 | (home-page "http://www.ctan.org/pkg/ifxetex") |
| 947 | (synopsis "Am I running under XeTeX?") |
| 948 | (description |
| 949 | "This is a simple package which provides an @code{\\ifxetex} conditional, |
| 950 | so that other code can determine that it is running under XeTeX. The package |
| 951 | requires the e-TeX extensions to the TeX primitive set.") |
| 952 | (license license:lppl1.3c+))) |
| 953 | |
| 954 | (define-public texlive-latex-fancyvrb |
| 955 | (package |
| 956 | (name "texlive-latex-fancyvrb") |
| 957 | (version (number->string %texlive-revision)) |
| 958 | (source (origin |
| 959 | (method svn-fetch) |
| 960 | (uri (texlive-ref "latex" "fancyvrb")) |
| 961 | (sha256 |
| 962 | (base32 |
| 963 | "03l7140y031rr14h02i4z9zqsfvrbn7wzwxbjsrjcgrk6sdr71wv")))) |
| 964 | (build-system texlive-build-system) |
| 965 | (arguments |
| 966 | '(#:tex-directory "latex/fancyvrb" |
| 967 | ;; We exclude "fvrb-ex" to avoid a dependency on texlive-luaotfload and |
| 968 | ;; thus texlive-luatex-lualibs. |
| 969 | #:build-targets '("fancyvrb.ins"))) |
| 970 | (home-page "http://www.ctan.org/pkg/fancyvrb") |
| 971 | (synopsis "Sophisticated verbatim text") |
| 972 | (description |
| 973 | "This package provides tools for the flexible handling of verbatim text |
| 974 | including: verbatim commands in footnotes; a variety of verbatim environments |
| 975 | with many parameters; ability to define new customized verbatim environments; |
| 976 | save and restore verbatim text and environments; write and read files in |
| 977 | verbatim mode; build \"example\" environments (showing both result and |
| 978 | verbatim source).") |
| 979 | (license license:lppl1.0+))) |
| 980 | |
| 981 | (define-public texlive-latex-graphics |
| 982 | (package |
| 983 | (name "texlive-latex-graphics") |
| 984 | (version (number->string %texlive-revision)) |
| 985 | (source (origin |
| 986 | (method svn-fetch) |
| 987 | (uri (texlive-ref "latex" "graphics")) |
| 988 | (sha256 |
| 989 | (base32 |
| 990 | "07azyn0b1s49vbdlr6dmygrminxp72ndl24j1091hiiccvrjq3xc")))) |
| 991 | (build-system texlive-build-system) |
| 992 | (arguments |
| 993 | '(#:tex-directory "latex/graphics" |
| 994 | #:phases |
| 995 | (modify-phases %standard-phases |
| 996 | (add-after 'install 'install-config |
| 997 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 998 | (let ((cfg (assoc-ref inputs "graphics-cfg")) |
| 999 | (target (string-append (assoc-ref outputs "out") |
| 1000 | "/share/texmf-dist/tex/latex/graphics-cfg"))) |
| 1001 | (mkdir-p target) |
| 1002 | (install-file (string-append cfg "/graphics.cfg") target) |
| 1003 | (install-file (string-append cfg "/color.cfg") target) |
| 1004 | #t))) |
| 1005 | (add-after 'install 'install-defs |
| 1006 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1007 | (let ((def (assoc-ref inputs "graphics-def")) |
| 1008 | (target (string-append (assoc-ref outputs "out") |
| 1009 | "/share/texmf-dist/tex/latex/graphics-def"))) |
| 1010 | (mkdir-p target) |
| 1011 | (copy-recursively def target) |
| 1012 | #t)))))) |
| 1013 | (native-inputs |
| 1014 | `(("graphics-cfg" |
| 1015 | ,(origin |
| 1016 | (method git-fetch) |
| 1017 | (uri (git-reference |
| 1018 | (url "https://github.com/latex3/graphics-cfg.git") |
| 1019 | (commit "19d1238af17df376cd46333b229579b0f7f3a41f"))) |
| 1020 | (sha256 |
| 1021 | (base32 |
| 1022 | "12kbgbm52gmmgn8zajb74s8n5rvnxcfdvs3iyj8vcw5vrsw5i6mh")))) |
| 1023 | ("graphics-def" |
| 1024 | ,(origin |
| 1025 | (method svn-fetch) |
| 1026 | (uri (svn-reference |
| 1027 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 1028 | %texlive-tag "/Master/texmf-dist/" |
| 1029 | "/tex/latex/graphics-def")) |
| 1030 | (revision %texlive-revision))) |
| 1031 | (sha256 |
| 1032 | (base32 |
| 1033 | "0gi4qv6378nl84s8n1yx3hjqvv7r4lza7hpbymbl5rzwgw8qrnyb")))))) |
| 1034 | (home-page "http://www.ctan.org/pkg/latex-graphics") |
| 1035 | (synopsis "LaTeX standard graphics bundle") |
| 1036 | (description |
| 1037 | "This is a collection of LaTeX packages for producing color, including |
| 1038 | graphics (e.g. PostScript) files, and rotation and scaling of text in LaTeX |
| 1039 | documents. It comprises the packages color, graphics, graphicx, trig, epsfig, |
| 1040 | keyval, and lscape.") |
| 1041 | ;; The configuration files are released under CC0. |
| 1042 | (license (list license:lppl1.3c+ |
| 1043 | license:cc0)))) |
| 1044 | |
| 1045 | (define-public texlive-latex-xcolor |
| 1046 | (package |
| 1047 | (name "texlive-latex-xcolor") |
| 1048 | (version (number->string %texlive-revision)) |
| 1049 | (source (origin |
| 1050 | (method svn-fetch) |
| 1051 | (uri (texlive-ref "latex" "xcolor")) |
| 1052 | (sha256 |
| 1053 | (base32 |
| 1054 | "01n613s7bcrd2n4jfawm0k4nn2ny3aaifp2jjfif3lz4sbv31494")))) |
| 1055 | (build-system texlive-build-system) |
| 1056 | (arguments '(#:tex-directory "latex/xcolor")) |
| 1057 | (home-page "http://www.ctan.org/pkg/xcolor") |
| 1058 | (synopsis "Driver-independent color extensions for LaTeX and pdfLaTeX") |
| 1059 | (description |
| 1060 | "The package starts from the basic facilities of the colorcolor package, |
| 1061 | and provides easy driver-independent access to several kinds of color tints, |
| 1062 | shades, tones, and mixes of arbitrary colors. It allows a user to select a |
| 1063 | document-wide target color model and offers complete tools for conversion |
| 1064 | between eight color models. Additionally, there is a command for alternating |
| 1065 | row colors plus repeated non-aligned material (like horizontal lines) in |
| 1066 | tables.") |
| 1067 | (license license:lppl1.2+))) |
| 1068 | |
| 1069 | (define-public texlive-latex-hyperref |
| 1070 | (package |
| 1071 | (name "texlive-latex-hyperref") |
| 1072 | (version "6.84a2") |
| 1073 | ;; The sources in the TeX Live SVN repository do not contain hluatex.dtx, |
| 1074 | ;; so we fetch the release from GitHub. |
| 1075 | (source (origin |
| 1076 | (method url-fetch) |
| 1077 | (uri (string-append "https://github.com/ho-tex/hyperref/" |
| 1078 | "archive/release-" version ".tar.gz")) |
| 1079 | (file-name (string-append name "-" version ".tar.gz")) |
| 1080 | (sha256 |
| 1081 | (base32 |
| 1082 | "1d3rmjgzh0025a1dza55zb6nzzlgd1y9snwx45wq1c1vf42m79h2")))) |
| 1083 | (build-system texlive-build-system) |
| 1084 | (arguments '(#:tex-directory "latex/hyperref")) |
| 1085 | (home-page "http://www.ctan.org/pkg/hyperref") |
| 1086 | (synopsis "Extensive support for hypertext in LaTeX") |
| 1087 | (description |
| 1088 | "The hyperref package is used to handle cross-referencing commands in |
| 1089 | LaTeX to produce hypertext links in the document. The package provides |
| 1090 | backends for the special set defined for HyperTeX DVI processors; for embedded |
| 1091 | pdfmark commands for processing by Acrobat Distiller (dvips and dvipsone); for |
| 1092 | dviwindo; for PDF control within pdfTeX and dvipdfm; for TeX4ht; and for VTeX |
| 1093 | pdf and HTML backends. The package is distributed with the backref and |
| 1094 | nameref packages, which make use of the facilities of hyperref.") |
| 1095 | (license license:lppl1.3+))) |
| 1096 | |
| 1097 | (define-public texlive-latex-oberdiek |
| 1098 | (package |
| 1099 | (name "texlive-latex-oberdiek") |
| 1100 | (version (number->string %texlive-revision)) |
| 1101 | (source (origin |
| 1102 | (method svn-fetch) |
| 1103 | (uri (texlive-ref "latex" "oberdiek")) |
| 1104 | (sha256 |
| 1105 | (base32 |
| 1106 | "0aswvsxgsn709xmvpcg50d2xl7vcy1ckdxb9c1cligqqfjjvviqf")))) |
| 1107 | (build-system texlive-build-system) |
| 1108 | (arguments |
| 1109 | '(#:tex-directory "latex/oberdiek" |
| 1110 | #:build-targets '("oberdiek.ins") |
| 1111 | #:phases |
| 1112 | (modify-phases %standard-phases |
| 1113 | ;; "ifpdf.ins" is not generated, so we need to process the dtx file. |
| 1114 | (add-after 'unpack 'do-not-process-ifpdf.ins |
| 1115 | (lambda _ |
| 1116 | (substitute* "oberdiek.ins" |
| 1117 | (("ifpdf.ins") "ifpdf.dtx")) |
| 1118 | #t))))) |
| 1119 | (home-page "http://www.ctan.org/pkg/oberdiek") |
| 1120 | (synopsis "Bundle of packages submitted by Heiko Oberdiek") |
| 1121 | (description |
| 1122 | "The bundle comprises various LaTeX packages, providing among others: |
| 1123 | better accessibility support for PDF files; extensible chemists reaction |
| 1124 | arrows; record information about document class(es) used; and many more.") |
| 1125 | (license license:lppl1.3+))) |
| 1126 | |
| 1127 | (define-public texlive-latex-tools |
| 1128 | (package |
| 1129 | (name "texlive-latex-tools") |
| 1130 | (version (number->string %texlive-revision)) |
| 1131 | (source (origin |
| 1132 | (method svn-fetch) |
| 1133 | (uri (texlive-ref "latex" "tools")) |
| 1134 | (sha256 |
| 1135 | (base32 |
| 1136 | "052a0pch2k5zls5jlay9xxcf93rw3i60a2x28y3ip3rhbsv3xgiz")))) |
| 1137 | (build-system texlive-build-system) |
| 1138 | (arguments |
| 1139 | '(#:tex-directory "latex/tools" |
| 1140 | #:build-targets '("tools.ins"))) |
| 1141 | (home-page "http://www.ctan.org/pkg/latex-tools") |
| 1142 | (synopsis "LaTeX standard tools bundle") |
| 1143 | (description |
| 1144 | "This package is a collection of (variously) simple tools provided as |
| 1145 | part of the LaTeX required tools distribution, comprising the following |
| 1146 | packages: afterpage, array, bm, calc, dcolumn, delarray, enumerate, fileerr, |
| 1147 | fontsmpl, ftnright, hhline, indentfirst, layout, longtable, multicol, |
| 1148 | rawfonts, showkeys, somedefs, tabularx, theorem, trace, varioref, verbatim, |
| 1149 | xr, and xspace.") |
| 1150 | (license license:lppl1.3+))) |
| 1151 | |
| 1152 | (define-public texlive-latex-url |
| 1153 | (package |
| 1154 | (name "texlive-latex-url") |
| 1155 | (version (number->string %texlive-revision)) |
| 1156 | (source (origin |
| 1157 | (method svn-fetch) |
| 1158 | (uri (svn-reference |
| 1159 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 1160 | %texlive-tag "/Master/texmf-dist/" |
| 1161 | "/tex/latex/url")) |
| 1162 | (revision %texlive-revision))) |
| 1163 | (sha256 |
| 1164 | (base32 |
| 1165 | "184s2543cwia5l7iibhlkl1ffbncfhjpv5p56zq0c15by5sghlac")))) |
| 1166 | (build-system trivial-build-system) |
| 1167 | (arguments |
| 1168 | `(#:modules ((guix build utils)) |
| 1169 | #:builder |
| 1170 | (begin |
| 1171 | (use-modules (guix build utils)) |
| 1172 | (let ((target (string-append (assoc-ref %outputs "out") |
| 1173 | "/share/texmf-dist/tex/latex/url"))) |
| 1174 | (mkdir-p target) |
| 1175 | (copy-recursively (assoc-ref %build-inputs "source") target) |
| 1176 | #t)))) |
| 1177 | (home-page "https://www.ctan.org/pkg/url") |
| 1178 | (synopsis "Verbatim with URL-sensitive line breaks") |
| 1179 | (description "The command @code{\\url} is a form of verbatim command that |
| 1180 | allows linebreaks at certain characters or combinations of characters, accepts |
| 1181 | reconfiguration, and can usually be used in the argument to another command. |
| 1182 | The command is intended for email addresses, hypertext links, |
| 1183 | directories/paths, etc., which normally have no spaces, so by default the |
| 1184 | package ignores spaces in its argument. However, a package option allows |
| 1185 | spaces, which is useful for operating systems where spaces are a common part |
| 1186 | of file names.") |
| 1187 | ;; The license header states that it is under LPPL version 2 or later, but |
| 1188 | ;; the latest version is 1.3c. |
| 1189 | (license license:lppl1.3c+))) |
| 1190 | |
| 1191 | (define-public texlive-latex-l3kernel |
| 1192 | (package |
| 1193 | (name "texlive-latex-l3kernel") |
| 1194 | (version (number->string %texlive-revision)) |
| 1195 | (source (origin |
| 1196 | (method svn-fetch) |
| 1197 | (uri (texlive-ref "latex" "l3kernel")) |
| 1198 | (sha256 |
| 1199 | (base32 |
| 1200 | "0r0wfk594j8wkdqhh21haimwsfq8x5jch4ldm21hkzk5dnmvpbg6")))) |
| 1201 | (build-system texlive-build-system) |
| 1202 | (arguments |
| 1203 | '(#:tex-directory "latex/l3kernel")) |
| 1204 | (home-page "http://www.ctan.org/pkg/l3kernel") |
| 1205 | (synopsis "LaTeX3 programmers’ interface") |
| 1206 | (description |
| 1207 | "The l3kernel bundle provides an implementation of the LaTeX3 |
| 1208 | programmers’ interface, as a set of packages that run under LaTeX 2e. The |
| 1209 | interface provides the foundation on which the LaTeX3 kernel and other future |
| 1210 | code are built: it is an API for TeX programmers. The packages are set up so |
| 1211 | that the LaTeX3 conventions can be used with regular LaTeX 2e packages.") |
| 1212 | (license license:lppl1.3c+))) |
| 1213 | |
| 1214 | (define-public texlive-latex-l3packages |
| 1215 | (package |
| 1216 | (name "texlive-latex-l3packages") |
| 1217 | (version (number->string %texlive-revision)) |
| 1218 | (source (origin |
| 1219 | (method svn-fetch) |
| 1220 | (uri (texlive-ref "latex" "l3packages")) |
| 1221 | (sha256 |
| 1222 | (base32 |
| 1223 | "16jplkvzdysfssijq9l051nsks65c2nrarsl17k8gjhc28yznj8y")))) |
| 1224 | (build-system texlive-build-system) |
| 1225 | (arguments |
| 1226 | '(#:tex-directory "latex/l3packages" |
| 1227 | #:phases |
| 1228 | (modify-phases %standard-phases |
| 1229 | ;; All package sources are in sub-directories, so we need to add them |
| 1230 | ;; to TEXINPUTS. |
| 1231 | (add-after 'unpack 'set-TEXINPUTS |
| 1232 | (lambda _ |
| 1233 | (let ((cwd (getcwd))) |
| 1234 | (setenv "TEXINPUTS" |
| 1235 | (string-append cwd "/l3keys2e:" |
| 1236 | cwd "/xparse:" |
| 1237 | cwd "/xfrac:" |
| 1238 | cwd "/xfp:" |
| 1239 | cwd "/xtemplate"))) |
| 1240 | #t))))) |
| 1241 | (inputs |
| 1242 | `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel))) |
| 1243 | (home-page "http://www.ctan.org/pkg/l3packages") |
| 1244 | (synopsis "High-level LaTeX3 concepts") |
| 1245 | (description |
| 1246 | "This bundle holds prototype implementations of concepts for a LaTeX |
| 1247 | designer interface, to be used with the experimental LaTeX kernel as |
| 1248 | programming tools and kernel support. Packages provided in this release are: |
| 1249 | |
| 1250 | @enumerate |
| 1251 | @item l3keys2e, which makes the facilities of the kernel module l3keys |
| 1252 | available for use by LaTeX 2e packages; |
| 1253 | @item xfrac, which provides flexible splitlevel fractions; |
| 1254 | @item xparse, which provides a high-level interface for declaring document |
| 1255 | commands; and |
| 1256 | @item xtemplate, which provides a means of defining generic functions using a |
| 1257 | key-value syntax. |
| 1258 | @end enumerate\n") |
| 1259 | (license license:lppl1.3c+))) |
| 1260 | |
| 1261 | (define-public texlive-latex-fontspec |
| 1262 | (package |
| 1263 | (name "texlive-latex-fontspec") |
| 1264 | (version (number->string %texlive-revision)) |
| 1265 | (source (origin |
| 1266 | (method svn-fetch) |
| 1267 | (uri (texlive-ref "latex" "fontspec")) |
| 1268 | (sha256 |
| 1269 | (base32 |
| 1270 | "1rx43y5xmjqvc27pjdnmqwp4pcw3czcfd6nfpmzc1gnqfl1hlc0q")))) |
| 1271 | (build-system texlive-build-system) |
| 1272 | (arguments |
| 1273 | '(#:tex-directory "latex/fontspec" |
| 1274 | #:build-targets '("fontspec.dtx"))) |
| 1275 | (inputs |
| 1276 | `(("texlive-latex-l3kernel" ,texlive-latex-l3kernel))) |
| 1277 | (home-page "http://www.ctan.org/pkg/fontspec") |
| 1278 | (synopsis "Advanced font selection in XeLaTeX and LuaLaTeX") |
| 1279 | (description |
| 1280 | "Fontspec is a package for XeLaTeX and LuaLaTeX. It provides an |
| 1281 | automatic and unified interface to feature-rich AAT and OpenType fonts through |
| 1282 | the NFSS in LaTeX running on XeTeX or LuaTeX engines. The package requires |
| 1283 | the l3kernel and xparse bundles from the LaTeX 3 development team.") |
| 1284 | (license license:lppl1.3+))) |
| 1285 | |
| 1286 | ;; The SVN directory contains little more than a dtx file that generates three |
| 1287 | ;; of the many lua files that should be installed as part of this package. |
| 1288 | ;; This is why we take the release from GitHub instead. |
| 1289 | (define-public texlive-luatex-lualibs |
| 1290 | (package |
| 1291 | (name "texlive-luatex-lualibs") |
| 1292 | (version "2.5") |
| 1293 | (source (origin |
| 1294 | (method url-fetch) |
| 1295 | (uri (string-append "https://github.com/lualatex/lualibs/" |
| 1296 | "releases/download/v" |
| 1297 | version "/lualibs.zip")) |
| 1298 | (sha256 |
| 1299 | (base32 |
| 1300 | "1xx9blvrmx9hyhrl345lpai9m6xxnw997261a1ahn1bm5r2j5fqy")))) |
| 1301 | (build-system gnu-build-system) |
| 1302 | (arguments |
| 1303 | `(#:make-flags |
| 1304 | (list (string-append "DESTDIR=" |
| 1305 | (assoc-ref %outputs "out") |
| 1306 | "/share/texmf-dist")) |
| 1307 | #:phases |
| 1308 | (modify-phases %standard-phases |
| 1309 | (delete 'configure)))) |
| 1310 | (native-inputs |
| 1311 | `(("texlive-bin" ,texlive-bin) |
| 1312 | ("unzip" ,unzip) |
| 1313 | ("zip" ,zip))) |
| 1314 | (home-page "https://github.com/lualatex/lualibs") |
| 1315 | (synopsis "Lua modules for general programming (in the (La)TeX world)") |
| 1316 | (description |
| 1317 | "Lualibs is a collection of Lua modules useful for general programming. |
| 1318 | The bundle is based on Lua modules shipped with ConTeXt, and made available in |
| 1319 | this bundle for use independent of ConTeXt.") |
| 1320 | ;; GPL version 2 only |
| 1321 | (license license:gpl2))) |
| 1322 | |
| 1323 | (define-public texlive-latex-amsmath |
| 1324 | (package |
| 1325 | (name "texlive-latex-amsmath") |
| 1326 | (version (number->string %texlive-revision)) |
| 1327 | (source (origin |
| 1328 | (method svn-fetch) |
| 1329 | (uri (texlive-ref "latex" "amsmath")) |
| 1330 | (sha256 |
| 1331 | (base32 |
| 1332 | "178ywjpdlv78qmfzqdyn6gy14620zjsn2q9wap76fbr9s4hw6dba")))) |
| 1333 | (build-system texlive-build-system) |
| 1334 | (arguments '(#:tex-directory "latex/amsmath")) |
| 1335 | (home-page "http://www.ctan.org/pkg/amsmath") |
| 1336 | (synopsis "AMS mathematical facilities for LaTeX") |
| 1337 | (description |
| 1338 | "This is the principal package in the AMS-LaTeX distribution. It adapts |
| 1339 | for use in LaTeX most of the mathematical features found in AMS-TeX; it is |
| 1340 | highly recommended as an adjunct to serious mathematical typesetting in LaTeX. |
| 1341 | When amsmath is loaded, AMS-LaTeX packages @code{amsbsyamsbsy} (for bold |
| 1342 | symbols), @code{amsopnamsopn} (for operator names) and |
| 1343 | @code{amstextamstext} (for text embedded in mathematics) are also loaded. |
| 1344 | This package is part of the LaTeX required distribution; however, several |
| 1345 | contributed packages add still further to its appeal; examples are |
| 1346 | @code{empheqempheq}, which provides functions for decorating and highlighting |
| 1347 | mathematics, and @code{ntheoremntheorem}, for specifying theorem (and similar) |
| 1348 | definitions.") |
| 1349 | (license license:lppl1.3c+))) |
| 1350 | |
| 1351 | (define-public texlive-latex-amscls |
| 1352 | (package |
| 1353 | (name "texlive-latex-amscls") |
| 1354 | (version (number->string %texlive-revision)) |
| 1355 | (source (origin |
| 1356 | (method svn-fetch) |
| 1357 | (uri (texlive-ref "latex" "amscls")) |
| 1358 | (sha256 |
| 1359 | (base32 |
| 1360 | "0jmcr37mcdi7drczppvr6lmz5d5yd9m67ii79gp2nglg1xpw934j")))) |
| 1361 | (build-system texlive-build-system) |
| 1362 | (arguments |
| 1363 | `(#:tex-directory "latex/amscls")) |
| 1364 | (home-page "http://www.ctan.org/pkg/amscls") |
| 1365 | (synopsis "AMS document classes for LaTeX") |
| 1366 | (description |
| 1367 | "This bundle contains three AMS classes: @code{amsartamsart} (for writing |
| 1368 | articles for the AMS), @code{amsbookamsbook} (for books) and |
| 1369 | @code{amsprocamsproc} (for proceedings), together with some supporting |
| 1370 | material. The material is made available as part of the AMS-LaTeX |
| 1371 | distribution.") |
| 1372 | (license license:lppl1.3c+))) |
| 1373 | |
| 1374 | (define-public texlive-latex-babel |
| 1375 | (package |
| 1376 | (name "texlive-latex-babel") |
| 1377 | (version (number->string %texlive-revision)) |
| 1378 | (source (origin |
| 1379 | (method svn-fetch) |
| 1380 | (uri (texlive-ref "latex" "babel")) |
| 1381 | (sha256 |
| 1382 | (base32 |
| 1383 | "1n3i5adsyy7jw0imnzrm2i8wkf73i3mjk9h3ic8cb9cd19i4r9r3")))) |
| 1384 | (build-system texlive-build-system) |
| 1385 | (arguments |
| 1386 | '(#:tex-directory "latex/babel" |
| 1387 | #:phases |
| 1388 | (modify-phases %standard-phases |
| 1389 | ;; This package tries to produce babel.aux twice but refuses to |
| 1390 | ;; overwrite the first one. |
| 1391 | (add-before 'build 'fix-ins |
| 1392 | (lambda _ |
| 1393 | (substitute* "babel.ins" |
| 1394 | (("askonceonly") "askforoverwritefalse")) |
| 1395 | #t))))) |
| 1396 | (home-page "http://www.ctan.org/pkg/babel") |
| 1397 | (synopsis "Multilingual support for Plain TeX or LaTeX") |
| 1398 | (description |
| 1399 | "The package manages culturally-determined typographical (and other) |
| 1400 | rules, and hyphenation patterns for a wide range of languages. A document may |
| 1401 | select a single language to be supported, or it may select several, in which |
| 1402 | case the document may switch from one language to another in a variety of |
| 1403 | ways. Babel uses contributed configuration files that provide the detail of |
| 1404 | what has to be done for each language. Users of XeTeX are advised to use the |
| 1405 | polyglossia package rather than Babel.") |
| 1406 | (license license:lppl1.3+))) |
| 1407 | |
| 1408 | (define-public texlive-latex-cyrillic |
| 1409 | (package |
| 1410 | (name "texlive-latex-cyrillic") |
| 1411 | (version (number->string %texlive-revision)) |
| 1412 | (source (origin |
| 1413 | (method svn-fetch) |
| 1414 | (uri (texlive-ref "latex" "cyrillic")) |
| 1415 | (sha256 |
| 1416 | (base32 |
| 1417 | "1mdhl35hwas68ki56qqngzar37dwv4mm64l2canihr255bz34lbv")))) |
| 1418 | (build-system texlive-build-system) |
| 1419 | (arguments |
| 1420 | '(#:tex-directory "latex/cyrillic")) |
| 1421 | (home-page "http://www.ctan.org/pkg/latex-cyrillic") |
| 1422 | (synopsis "Support for Cyrillic fonts in LaTeX") |
| 1423 | (description |
| 1424 | "This bundle of macros files provides macro support (including font |
| 1425 | encoding macros) for the use of Cyrillic characters in fonts encoded under the |
| 1426 | T2* and X2 encodings. These encodings cover (between them) pretty much every |
| 1427 | language that is written in a Cyrillic alphabet.") |
| 1428 | (license license:lppl1.3c+))) |
| 1429 | |
| 1430 | (define-public texlive-latex-psnfss |
| 1431 | (package |
| 1432 | (name "texlive-latex-psnfss") |
| 1433 | (version (number->string %texlive-revision)) |
| 1434 | (source (origin |
| 1435 | (method svn-fetch) |
| 1436 | (uri (texlive-ref "latex" "psnfss")) |
| 1437 | (sha256 |
| 1438 | (base32 |
| 1439 | "1920dcq8613yzprasbg80fh4fcjcidvvl54wkx438nimyxcri7qz")))) |
| 1440 | (build-system texlive-build-system) |
| 1441 | (arguments '(#:tex-directory "latex/psnfss")) |
| 1442 | (home-page "http://www.ctan.org/pkg/psnfss") |
| 1443 | (synopsis "Font support for common PostScript fonts") |
| 1444 | (description |
| 1445 | "The PSNFSS collection includes a set of files that provide a complete |
| 1446 | working setup of the LaTeX font selection scheme (NFSS2) for use with common |
| 1447 | PostScript fonts. It covers the so-called \"Base\" fonts (which are built |
| 1448 | into any Level 2 PostScript printing device and the Ghostscript interpreter) |
| 1449 | and a number of free fonts. It provides font definition files, macros and |
| 1450 | font metrics. The bundle as a whole is part of the LaTeX required set of |
| 1451 | packages.") |
| 1452 | (license license:lppl1.2+))) |
| 1453 | |
| 1454 | (define-public texlive-union |
| 1455 | (lambda* (#:optional (packages '())) |
| 1456 | "Return 'texlive-union' package which is a union of PACKAGES and the |
| 1457 | standard LaTeX packages." |
| 1458 | (let ((default-packages |
| 1459 | (list texlive-bin |
| 1460 | texlive-dvips |
| 1461 | texlive-fonts-cm |
| 1462 | texlive-fonts-latex |
| 1463 | texlive-metafont-base |
| 1464 | texlive-latex-base |
| 1465 | ;; LaTeX packages from the "required" set. |
| 1466 | texlive-latex-amsmath |
| 1467 | texlive-latex-amscls |
| 1468 | texlive-latex-babel |
| 1469 | texlive-latex-cyrillic |
| 1470 | texlive-latex-graphics |
| 1471 | texlive-latex-psnfss |
| 1472 | texlive-latex-tools))) |
| 1473 | (package |
| 1474 | (name "texlive-union") |
| 1475 | (version (number->string %texlive-revision)) |
| 1476 | (source #f) |
| 1477 | (build-system trivial-build-system) |
| 1478 | (arguments |
| 1479 | '(#:modules ((guix build union) |
| 1480 | (guix build utils) |
| 1481 | (guix build texlive-build-system) |
| 1482 | (guix build gnu-build-system) |
| 1483 | (guix build gremlin) |
| 1484 | (guix elf)) |
| 1485 | #:builder |
| 1486 | (begin |
| 1487 | (use-modules (ice-9 match) |
| 1488 | (srfi srfi-26) |
| 1489 | (guix build union) |
| 1490 | (guix build utils) |
| 1491 | (guix build texlive-build-system)) |
| 1492 | (let* ((out (assoc-ref %outputs "out")) |
| 1493 | (texmf.cnf (string-append out "/share/texmf-dist/web2c/texmf.cnf"))) |
| 1494 | ;; Build a modifiable union of all inputs (but exclude bash) |
| 1495 | (match (filter (match-lambda |
| 1496 | ((name . _) |
| 1497 | (not (string=? "bash" name)))) |
| 1498 | %build-inputs) |
| 1499 | (((names . directories) ...) |
| 1500 | (union-build (assoc-ref %outputs "out") |
| 1501 | directories |
| 1502 | #:create-all-directories? #t))) |
| 1503 | |
| 1504 | ;; The configuration file "texmf.cnf" is provided by the |
| 1505 | ;; "texlive-bin" package. We take it and override only the |
| 1506 | ;; setting for TEXMFROOT and TEXMF. This file won't be consulted |
| 1507 | ;; by default, though, so we still need to set TEXMFCNF. |
| 1508 | (substitute* texmf.cnf |
| 1509 | (("^TEXMFROOT = .*") |
| 1510 | (string-append "TEXMFROOT = " out "/share\n")) |
| 1511 | (("^TEXMF = .*") |
| 1512 | "TEXMF = $TEXMFROOT/share/texmf-dist\n")) |
| 1513 | (setenv "PATH" (string-append (assoc-ref %build-inputs "bash") |
| 1514 | "/bin")) |
| 1515 | (for-each |
| 1516 | (cut wrap-program <> |
| 1517 | `("TEXMFCNF" ":" = (,(dirname texmf.cnf))) |
| 1518 | `("TEXMF" ":" = (,(string-append out "/share/texmf-dist")))) |
| 1519 | (find-files (string-append out "/bin") ".*")) |
| 1520 | #t)))) |
| 1521 | (inputs |
| 1522 | `(("bash" ,bash) |
| 1523 | ,@(map (lambda (package) |
| 1524 | (list (package-name package) package)) |
| 1525 | (append default-packages packages)))) |
| 1526 | (home-page (package-home-page texlive-bin)) |
| 1527 | (synopsis "Union of TeX Live packages") |
| 1528 | (description "This package provides a subset of the TeX Live |
| 1529 | distribution.") |
| 1530 | (license (fold (lambda (package result) |
| 1531 | (match (package-license package) |
| 1532 | ((lst ...) |
| 1533 | (append lst result)) |
| 1534 | ((? license:license? license) |
| 1535 | (cons license result)))) |
| 1536 | '() |
| 1537 | (append default-packages packages))))))) |
| 1538 | |
| 1539 | (define-public texlive-tiny |
| 1540 | (package |
| 1541 | (inherit (texlive-union)) |
| 1542 | (name "texlive-tiny") |
| 1543 | (description "This is a very limited subset of the TeX Live distribution. |
| 1544 | It includes little more than the required set of LaTeX packages."))) |
| 1545 | |
| 1546 | (define-public texlive-latex-natbib |
| 1547 | (package |
| 1548 | (name "texlive-latex-natbib") |
| 1549 | (version (number->string %texlive-revision)) |
| 1550 | (source (origin |
| 1551 | (method svn-fetch) |
| 1552 | (uri (texlive-ref "latex" "natbib")) |
| 1553 | (sha256 |
| 1554 | (base32 |
| 1555 | "0aqliq0nwblxyrzhwhv77pnmk7qh2y3prgq7z7qhwcbgz5kisld7")))) |
| 1556 | (build-system texlive-build-system) |
| 1557 | (arguments '(#:tex-directory "latex/natbib")) |
| 1558 | (home-page "http://www.ctan.org/pkg/natbib") |
| 1559 | (synopsis "Flexible bibliography support") |
| 1560 | (description |
| 1561 | "This bundle provides a package that implements both author-year and |
| 1562 | numbered references, as well as much detailed of support for other |
| 1563 | bibliography use. Also provided are versions of the standard BibTeX styles |
| 1564 | that are compatible with @code{natbib}: @code{plainnat}, @code{unsrtnat}, |
| 1565 | @code{abbrnat}. The bibliography styles produced by @code{custom-bib} are |
| 1566 | designed from the start to be compatible with @code{natbib}.") |
| 1567 | (license license:lppl))) |
| 1568 | |
| 1569 | (define-public texlive-latex-seminar |
| 1570 | (package |
| 1571 | (name "texlive-latex-seminar") |
| 1572 | (version (number->string %texlive-revision)) |
| 1573 | (source (origin |
| 1574 | (method svn-fetch) |
| 1575 | (uri (svn-reference |
| 1576 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 1577 | %texlive-tag "/Master/texmf-dist/" |
| 1578 | "/tex/latex/seminar")) |
| 1579 | (revision %texlive-revision))) |
| 1580 | (sha256 |
| 1581 | (base32 |
| 1582 | "0y4i651b75y6006n03x8n86bsqvjsailvvz9bhzy51dzsznqidq0")))) |
| 1583 | (build-system texlive-build-system) |
| 1584 | (arguments '(#:tex-directory "latex/seminar")) |
| 1585 | (home-page "http://www.ctan.org/pkg/seminar") |
| 1586 | (synopsis "Make overhead slides") |
| 1587 | ;; TODO: This package may need fancybox and xcomment at runtime. |
| 1588 | (description |
| 1589 | "This package provides a class that produces overhead |
| 1590 | slides (transparencies), with many facilities. Seminar is not nowadays |
| 1591 | reckoned a good basis for a presentation — users are advised to use more |
| 1592 | recent classes such as powerdot or beamer, both of which are tuned to |
| 1593 | 21st-century presentation styles.") |
| 1594 | (license license:lppl1.2+))) |
| 1595 | |
| 1596 | (define-public texlive-latex-hyperref |
| 1597 | (package |
| 1598 | (name "texlive-latex-hyperref") |
| 1599 | (version (number->string %texlive-revision)) |
| 1600 | (source (origin |
| 1601 | (method svn-fetch) |
| 1602 | (uri (texlive-ref "latex" "hyperref")) |
| 1603 | (sha256 |
| 1604 | (base32 |
| 1605 | "03arf3xvz1jsbvlpgc5qxbxbl9wmk8k09cn6b8gv9pzgpjy4vx4j")))) |
| 1606 | (build-system texlive-build-system) |
| 1607 | (arguments |
| 1608 | '(#:tex-directory "latex/hyperref" |
| 1609 | #:phases |
| 1610 | (modify-phases %standard-phases |
| 1611 | (add-after 'unpack 'remove-hluatex.def |
| 1612 | (lambda _ |
| 1613 | ;; This depends on hluatex.dtx, which does not exist and is |
| 1614 | ;; nowhere to be found in the sources of the TeX Live |
| 1615 | ;; distribution. |
| 1616 | (substitute* "hyperref.ins" |
| 1617 | (("\\\\file\\{hluatex.def\\}.*") "")) |
| 1618 | #t))))) |
| 1619 | ;; The package depends on the kvoptions, ltxcmds, and refcount packages, |
| 1620 | ;; which are part of the oberdiek bundle. |
| 1621 | (inputs |
| 1622 | `(("texlive-latex-oberdiek" ,texlive-latex-oberdiek))) |
| 1623 | (home-page "http://www.ctan.org/pkg/hyperref") |
| 1624 | (synopsis "Extensive support for hypertext in LaTeX") |
| 1625 | (description |
| 1626 | "The @code{hyperref} package is used to handle cross-referencing commands |
| 1627 | in LaTeX to produce hypertext links in the document. The package provides |
| 1628 | backends for the @code{\\special} set defined for HyperTeX DVI processors; for |
| 1629 | embedded @code{pdfmark} commands for processing by Acrobat |
| 1630 | Distiller (@code{dvips} and Y&Y's @code{dvipsone}); for Y&Y's @code{dviwindo}; |
| 1631 | for PDF control within pdfTeX and @code{dvipdfm}; for TeX4ht; and for VTeX's |
| 1632 | pdf and HTML backends. The package is distributed with the @code{backref} and |
| 1633 | @code{nameref} packages, which make use of the facilities of @code{hyperref}.") |
| 1634 | (license license:lppl1.3+))) |
| 1635 | |
| 1636 | (define-public texlive-tex-texinfo |
| 1637 | (package |
| 1638 | (name "texlive-tex-texinfo") |
| 1639 | (version (number->string %texlive-revision)) |
| 1640 | (source (origin |
| 1641 | (method svn-fetch) |
| 1642 | (uri (svn-reference |
| 1643 | (url (string-append "svn://www.tug.org/texlive/tags/" |
| 1644 | %texlive-tag "/Master/texmf-dist/" |
| 1645 | "/tex/texinfo")) |
| 1646 | (revision %texlive-revision))) |
| 1647 | (sha256 |
| 1648 | (base32 |
| 1649 | "09zj2w3lx0y6i2syfjjgizahf86z301dw8p37ln6syfhqhzqdz46")))) |
| 1650 | (build-system trivial-build-system) |
| 1651 | (arguments |
| 1652 | `(#:modules ((guix build utils)) |
| 1653 | #:builder |
| 1654 | (begin |
| 1655 | (use-modules (guix build utils)) |
| 1656 | (let ((target (string-append (assoc-ref %outputs "out") |
| 1657 | "/share/texmf-dist/tex/texinfo"))) |
| 1658 | (mkdir-p target) |
| 1659 | (copy-recursively (assoc-ref %build-inputs "source") target) |
| 1660 | #t)))) |
| 1661 | (home-page "http://www.ctan.org/pkg/texinfo") |
| 1662 | (synopsis "TeX macros to handle Texinfo files") |
| 1663 | (description |
| 1664 | "Texinfo is the preferred format for documentation in the GNU project; |
| 1665 | the format may be used to produce online or printed output from a single |
| 1666 | source. The Texinfo macros may be used to produce printable output using TeX; |
| 1667 | other programs in the distribution offer online interactive use (with |
| 1668 | hypertext linkages in some cases).") |
| 1669 | (license license:gpl3+))) |
| 1670 | |
| 1671 | (define texlive-texmf |
| 1672 | (package |
| 1673 | (name "texlive-texmf") |
| 1674 | (version "2016") |
| 1675 | (source texlive-texmf-src) |
| 1676 | (build-system gnu-build-system) |
| 1677 | (inputs |
| 1678 | `(("texlive-bin" ,texlive-bin) |
| 1679 | ("lua" ,lua) |
| 1680 | ("perl" ,perl) |
| 1681 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
| 1682 | ("ruby" ,ruby) |
| 1683 | ("tcsh" ,tcsh))) |
| 1684 | (arguments |
| 1685 | `(#:modules ((guix build gnu-build-system) |
| 1686 | (guix build utils) |
| 1687 | (srfi srfi-26)) |
| 1688 | |
| 1689 | ;; This package takes 4 GiB, which we can't afford to distribute from |
| 1690 | ;; our servers. |
| 1691 | #:substitutable? #f |
| 1692 | |
| 1693 | #:phases |
| 1694 | (modify-phases (map (cut assq <> %standard-phases) |
| 1695 | '(set-paths unpack patch-source-shebangs)) |
| 1696 | (add-after 'patch-source-shebangs 'install |
| 1697 | (lambda* (#:key outputs #:allow-other-keys) |
| 1698 | (let ((share (string-append (assoc-ref outputs "out") "/share"))) |
| 1699 | (mkdir-p share) |
| 1700 | (system* "mv" "texmf-dist" share)))) |
| 1701 | (add-after 'install 'texmf-config |
| 1702 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1703 | (let* ((out (assoc-ref outputs "out")) |
| 1704 | (share (string-append out "/share")) |
| 1705 | (texmfroot (string-append share "/texmf-dist/web2c")) |
| 1706 | (texmfcnf (string-append texmfroot "/texmf.cnf")) |
| 1707 | (texlive-bin (assoc-ref inputs "texlive-bin")) |
| 1708 | (texbin (string-append texlive-bin "/bin")) |
| 1709 | (tlpkg (string-append texlive-bin "/share/tlpkg"))) |
| 1710 | ;; Register SHARE as TEXMFROOT in texmf.cnf. |
| 1711 | (substitute* texmfcnf |
| 1712 | (("TEXMFROOT = \\$SELFAUTOPARENT") |
| 1713 | (string-append "TEXMFROOT = " share)) |
| 1714 | (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local") |
| 1715 | "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local") |
| 1716 | (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL")) |
| 1717 | ;; Register paths in texmfcnf.lua, needed for context. |
| 1718 | (substitute* (string-append texmfroot "/texmfcnf.lua") |
| 1719 | (("selfautodir:") out) |
| 1720 | (("selfautoparent:") (string-append share "/"))) |
| 1721 | ;; Set path to TeXLive Perl modules |
| 1722 | (setenv "PERL5LIB" |
| 1723 | (string-append (getenv "PERL5LIB") ":" tlpkg)) |
| 1724 | ;; Configure the texmf-dist tree; inspired from |
| 1725 | ;; http://slackbuilds.org/repository/13.37/office/texlive/ |
| 1726 | (setenv "PATH" (string-append (getenv "PATH") ":" texbin)) |
| 1727 | (setenv "TEXMFCNF" texmfroot) |
| 1728 | (system* "updmap-sys" "--nohash" "--syncwithtrees") |
| 1729 | (system* "mktexlsr") |
| 1730 | (system* "fmtutil-sys" "--all"))))))) |
| 1731 | (properties `((max-silent-time . 9600))) ; don't time out while grafting |
| 1732 | (synopsis "TeX Live, a package of the TeX typesetting system") |
| 1733 | (description |
| 1734 | "TeX Live provides a comprehensive TeX document production system. |
| 1735 | It includes all the major TeX-related programs, macro packages, and fonts |
| 1736 | that are free software, including support for many languages around the |
| 1737 | world. |
| 1738 | |
| 1739 | This package contains the complete tree of texmf-dist data.") |
| 1740 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
| 1741 | (home-page "https://www.tug.org/texlive/"))) |
| 1742 | |
| 1743 | (define-public texlive |
| 1744 | (package |
| 1745 | (name "texlive") |
| 1746 | (version "2016") |
| 1747 | (source #f) |
| 1748 | (build-system trivial-build-system) |
| 1749 | (inputs `(("bash" ,bash) ; for wrap-program |
| 1750 | ("texlive-bin" ,texlive-bin) |
| 1751 | ("texlive-texmf" ,texlive-texmf))) |
| 1752 | (native-search-paths |
| 1753 | (list (search-path-specification |
| 1754 | (variable "TEXMFLOCAL") |
| 1755 | (files '("share/texmf-local"))))) |
| 1756 | (arguments |
| 1757 | `(#:modules ((guix build utils)) |
| 1758 | #:builder |
| 1759 | ;; Build the union of texlive-bin and texlive-texmf, but take the |
| 1760 | ;; conflicting subdirectory share/texmf-dist from texlive-texmf. |
| 1761 | (begin |
| 1762 | (use-modules (guix build utils)) |
| 1763 | (let ((out (assoc-ref %outputs "out")) |
| 1764 | (bin (assoc-ref %build-inputs "texlive-bin")) |
| 1765 | (texmf (assoc-ref %build-inputs "texlive-texmf")) |
| 1766 | (bash (assoc-ref %build-inputs "bash"))) |
| 1767 | (mkdir out) |
| 1768 | (with-directory-excursion out |
| 1769 | (for-each |
| 1770 | (lambda (name) |
| 1771 | (symlink (string-append bin "/" name) name)) |
| 1772 | '("include" "lib")) |
| 1773 | (mkdir "bin") |
| 1774 | (with-directory-excursion "bin" |
| 1775 | (setenv "PATH" (string-append bash "/bin")) |
| 1776 | (for-each |
| 1777 | (lambda (name) |
| 1778 | (symlink name (basename name)) |
| 1779 | (wrap-program |
| 1780 | (basename name) |
| 1781 | `("TEXMFCNF" = |
| 1782 | (,(string-append texmf "/share/texmf-dist/web2c"))))) |
| 1783 | (find-files (string-append bin "/bin/") ""))) |
| 1784 | (mkdir "share") |
| 1785 | (with-directory-excursion "share" |
| 1786 | (for-each |
| 1787 | (lambda (name) |
| 1788 | (symlink (string-append bin "/share/" name) name)) |
| 1789 | '("info" "man" "tlpkg")) |
| 1790 | (for-each |
| 1791 | (lambda (name) |
| 1792 | (symlink (string-append texmf "/share/" name) name)) |
| 1793 | '("texmf-dist" "texmf-var")))))))) |
| 1794 | (synopsis "TeX Live, a package of the TeX typesetting system") |
| 1795 | (description |
| 1796 | "TeX Live provides a comprehensive TeX document production system. |
| 1797 | It includes all the major TeX-related programs, macro packages, and fonts |
| 1798 | that are free software, including support for many languages around the |
| 1799 | world. |
| 1800 | |
| 1801 | This package contains the complete TeX Live distribution.") |
| 1802 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
| 1803 | (home-page "https://www.tug.org/texlive/"))) |
| 1804 | |
| 1805 | |
| 1806 | ;; texlive-texmf-minimal is a pruned, small version of the texlive tree, |
| 1807 | ;; in particular dropping documentation and fonts. It weighs in at 470 MiB |
| 1808 | ;; instead of 4 GiB. |
| 1809 | (define texlive-texmf-minimal |
| 1810 | (package (inherit texlive-texmf) |
| 1811 | (name "texlive-texmf-minimal") |
| 1812 | (arguments |
| 1813 | (substitute-keyword-arguments |
| 1814 | (package-arguments texlive-texmf) |
| 1815 | ((#:modules modules) |
| 1816 | `((ice-9 ftw) |
| 1817 | (srfi srfi-1) |
| 1818 | ,@modules)) |
| 1819 | ((#:phases phases) |
| 1820 | `(modify-phases ,phases |
| 1821 | (add-after 'unpack 'prune |
| 1822 | (lambda _ |
| 1823 | (define (delete subdir exclude) |
| 1824 | "Delete all files and directories in SUBDIR except for those |
| 1825 | given in the list EXCLUDE." |
| 1826 | (with-directory-excursion subdir |
| 1827 | (for-each delete-file-recursively |
| 1828 | (lset-difference equal? |
| 1829 | (scandir ".") |
| 1830 | (append '("." "..") |
| 1831 | exclude))))) |
| 1832 | (with-directory-excursion "texmf-dist" |
| 1833 | (for-each delete-file-recursively |
| 1834 | '("doc" "source" "tex4ht")) |
| 1835 | ;; Delete all subdirectories of "fonts", except for "tfm" and |
| 1836 | ;; any directories named "cm". |
| 1837 | (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1")) |
| 1838 | (delete "fonts/afm" '("public")) |
| 1839 | (delete "fonts/afm/public" '("amsfonts")) |
| 1840 | (delete "fonts/afm/public/amsfonts" '("cm")) |
| 1841 | (delete "fonts/map" '("dvips")) |
| 1842 | (delete "fonts/map/dvips" '("cm")) |
| 1843 | (delete "fonts/source" '("public")) |
| 1844 | (delete "fonts/source/public" '("cm")) |
| 1845 | (delete "fonts/tfm" '("public")) |
| 1846 | (delete "fonts/type1" '("public")) |
| 1847 | (delete "fonts/type1/public" '("amsfonts")) |
| 1848 | (delete "fonts/type1/public/amsfonts" '("cm"))) |
| 1849 | #t)))))) |
| 1850 | (description |
| 1851 | "TeX Live provides a comprehensive TeX document production system. |
| 1852 | It includes all the major TeX-related programs, macro packages, and fonts |
| 1853 | that are free software, including support for many languages around the |
| 1854 | world. |
| 1855 | |
| 1856 | This package contains a small subset of the texmf-dist data."))) |
| 1857 | |
| 1858 | |
| 1859 | ;; texlive-minimal is the same as texlive, but using texlive-texmf-minimal |
| 1860 | ;; instead of the full texlive-texmf. It can be used, for instance, as a |
| 1861 | ;; native input to packages that need texlive to build their documentation. |
| 1862 | (define-public texlive-minimal |
| 1863 | (package (inherit texlive) |
| 1864 | (name "texlive-minimal") |
| 1865 | (inputs |
| 1866 | `(("texlive-texmf" ,texlive-texmf-minimal) |
| 1867 | ,@(alist-delete "texlive-texmf" (package-inputs texlive)))) |
| 1868 | (native-search-paths |
| 1869 | (list (search-path-specification |
| 1870 | (variable "TEXMFLOCAL") |
| 1871 | (files '("share/texmf-local"))))) |
| 1872 | (description |
| 1873 | "TeX Live provides a comprehensive TeX document production system. |
| 1874 | It includes all the major TeX-related programs, macro packages, and fonts |
| 1875 | that are free software, including support for many languages around the |
| 1876 | world. |
| 1877 | |
| 1878 | This package contains a small working part of the TeX Live distribution."))) |
| 1879 | |
| 1880 | (define-public perl-text-bibtex |
| 1881 | (package |
| 1882 | (name "perl-text-bibtex") |
| 1883 | (version "0.77") |
| 1884 | (source |
| 1885 | (origin |
| 1886 | (method url-fetch) |
| 1887 | (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-" |
| 1888 | version ".tar.gz")) |
| 1889 | (sha256 |
| 1890 | (base32 |
| 1891 | "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4")))) |
| 1892 | (build-system perl-build-system) |
| 1893 | (arguments |
| 1894 | `(#:phases |
| 1895 | (modify-phases %standard-phases |
| 1896 | (add-after 'unpack 'add-output-directory-to-rpath |
| 1897 | (lambda* (#:key outputs #:allow-other-keys) |
| 1898 | (substitute* "inc/MyBuilder.pm" |
| 1899 | (("-Lbtparse" line) |
| 1900 | (string-append "-Wl,-rpath=" |
| 1901 | (assoc-ref outputs "out") "/lib " line))) |
| 1902 | #t)) |
| 1903 | (add-after 'unpack 'install-libraries-to-/lib |
| 1904 | (lambda* (#:key outputs #:allow-other-keys) |
| 1905 | (substitute* "Build.PL" |
| 1906 | (("lib64") "lib")) |
| 1907 | #t))))) |
| 1908 | (native-inputs |
| 1909 | `(("perl-capture-tiny" ,perl-capture-tiny) |
| 1910 | ("perl-config-autoconf" ,perl-config-autoconf) |
| 1911 | ("perl-extutils-libbuilder" ,perl-extutils-libbuilder) |
| 1912 | ("perl-module-build" ,perl-module-build))) |
| 1913 | (home-page "http://search.cpan.org/dist/Text-BibTeX") |
| 1914 | (synopsis "Interface to read and parse BibTeX files") |
| 1915 | (description "@code{Text::BibTeX} is a Perl library for reading, parsing, |
| 1916 | and processing BibTeX files. @code{Text::BibTeX} gives you access to the data |
| 1917 | at many different levels: you may work with BibTeX entries as simple field to |
| 1918 | string mappings, or get at the original form of the data as a list of simple |
| 1919 | values (strings, macros, or numbers) pasted together.") |
| 1920 | (license license:perl-license))) |
| 1921 | |
| 1922 | (define-public biber |
| 1923 | (package |
| 1924 | (name "biber-next") |
| 1925 | (version "2.6") |
| 1926 | (source (origin |
| 1927 | (method url-fetch) |
| 1928 | (uri (string-append "https://github.com/plk/biber/archive/v" |
| 1929 | version ".tar.gz")) |
| 1930 | (file-name (string-append name "-" version ".tar.gz")) |
| 1931 | (sha256 |
| 1932 | (base32 |
| 1933 | "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp")))) |
| 1934 | (build-system perl-build-system) |
| 1935 | (arguments |
| 1936 | `(#:phases |
| 1937 | (modify-phases %standard-phases |
| 1938 | (add-after 'install 'wrap-programs |
| 1939 | (lambda* (#:key outputs #:allow-other-keys) |
| 1940 | (let* ((out (assoc-ref outputs "out")) |
| 1941 | (perl5lib (getenv "PERL5LIB"))) |
| 1942 | (wrap-program (string-append out "/bin/biber") |
| 1943 | `("PERL5LIB" ":" prefix |
| 1944 | (,(string-append perl5lib ":" out |
| 1945 | "/lib/perl5/site_perl"))))) |
| 1946 | #t))))) |
| 1947 | (inputs |
| 1948 | `(("perl-autovivification" ,perl-autovivification) |
| 1949 | ("perl-class-accessor" ,perl-class-accessor) |
| 1950 | ("perl-data-dump" ,perl-data-dump) |
| 1951 | ("perl-data-compare" ,perl-data-compare) |
| 1952 | ("perl-data-uniqid" ,perl-data-uniqid) |
| 1953 | ("perl-datetime-format-builder" ,perl-datetime-format-builder) |
| 1954 | ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian) |
| 1955 | ("perl-file-slurp" ,perl-file-slurp) |
| 1956 | ("perl-ipc-cmd" ,perl-ipc-cmd) |
| 1957 | ("perl-ipc-run3" ,perl-ipc-run3) |
| 1958 | ("perl-list-allutils" ,perl-list-allutils) |
| 1959 | ("perl-list-moreutils" ,perl-list-moreutils) |
| 1960 | ("perl-mozilla-ca" ,perl-mozilla-ca) |
| 1961 | ("perl-regexp-common" ,perl-regexp-common) |
| 1962 | ("perl-log-log4perl" ,perl-log-log4perl) |
| 1963 | ;; We cannot use perl-unicode-collate here, because otherwise the |
| 1964 | ;; hardcoded hashes in the tests would differ. See |
| 1965 | ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html |
| 1966 | ;;("perl-unicode-collate" ,perl-unicode-collate) |
| 1967 | ("perl-unicode-normalize" ,perl-unicode-normalize) |
| 1968 | ("perl-unicode-linebreak" ,perl-unicode-linebreak) |
| 1969 | ("perl-encode-eucjpascii" ,perl-encode-eucjpascii) |
| 1970 | ("perl-encode-jis2k" ,perl-encode-jis2k) |
| 1971 | ("perl-encode-hanextra" ,perl-encode-hanextra) |
| 1972 | ("perl-xml-libxml" ,perl-xml-libxml) |
| 1973 | ("perl-xml-libxml-simple" ,perl-xml-libxml-simple) |
| 1974 | ("perl-xml-libxslt" ,perl-xml-libxslt) |
| 1975 | ("perl-xml-writer" ,perl-xml-writer) |
| 1976 | ("perl-sort-key" ,perl-sort-key) |
| 1977 | ("perl-text-csv" ,perl-text-csv) |
| 1978 | ("perl-text-csv-xs" ,perl-text-csv-xs) |
| 1979 | ("perl-text-roman" ,perl-text-roman) |
| 1980 | ("perl-uri" ,perl-uri) |
| 1981 | ("perl-text-bibtex" ,perl-text-bibtex) |
| 1982 | ("perl-libwww" ,perl-libwww) |
| 1983 | ("perl-lwp-protocol-https" ,perl-lwp-protocol-https) |
| 1984 | ("perl-business-isbn" ,perl-business-isbn) |
| 1985 | ("perl-business-issn" ,perl-business-issn) |
| 1986 | ("perl-business-ismn" ,perl-business-ismn) |
| 1987 | ("perl-lingua-translit" ,perl-lingua-translit))) |
| 1988 | (native-inputs |
| 1989 | `(("perl-config-autoconf" ,perl-config-autoconf) |
| 1990 | ("perl-extutils-libbuilder" ,perl-extutils-libbuilder) |
| 1991 | ("perl-module-build" ,perl-module-build) |
| 1992 | ;; for tests |
| 1993 | ("perl-file-which" ,perl-file-which) |
| 1994 | ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient |
| 1995 | ("perl-test-differences" ,perl-test-differences))) |
| 1996 | (home-page "http://biblatex-biber.sourceforge.net/") |
| 1997 | (synopsis "Backend for the BibLaTeX citation management tool") |
| 1998 | (description "Biber is a BibTeX replacement for users of biblatex. Among |
| 1999 | other things it comes with full Unicode support.") |
| 2000 | (license license:artistic2.0))) |
| 2001 | |
| 2002 | ;; Our version of texlive comes with biblatex 3.4, which is only compatible |
| 2003 | ;; with biber 2.5 according to the compatibility matrix in the biber |
| 2004 | ;; documentation. |
| 2005 | (define-public biber-2.5 |
| 2006 | (package (inherit biber) |
| 2007 | (name "biber") |
| 2008 | (version "2.5") |
| 2009 | (source (origin |
| 2010 | (method url-fetch) |
| 2011 | (uri (string-append "https://github.com/plk/biber/archive/v" |
| 2012 | version ".tar.gz")) |
| 2013 | (file-name (string-append name "-" version ".tar.gz")) |
| 2014 | (sha256 |
| 2015 | (base32 |
| 2016 | "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv")))) |
| 2017 | (arguments |
| 2018 | (substitute-keyword-arguments (package-arguments biber) |
| 2019 | ((#:phases phases) |
| 2020 | `(modify-phases ,phases |
| 2021 | (add-before 'check 'delete-failing-test |
| 2022 | (lambda _ |
| 2023 | (delete-file "t/sort-order.t") |
| 2024 | #t)))))) |
| 2025 | (inputs |
| 2026 | `(("perl-date-simple" ,perl-date-simple) |
| 2027 | ,@(package-inputs biber))))) |
| 2028 | |
| 2029 | (define-public rubber |
| 2030 | (package |
| 2031 | (name "rubber") |
| 2032 | (version "1.1") |
| 2033 | (source (origin |
| 2034 | (method url-fetch) |
| 2035 | (uri (list (string-append "https://launchpad.net/rubber/trunk/" |
| 2036 | version "/+download/rubber-" |
| 2037 | version ".tar.gz") |
| 2038 | (string-append "http://ebeffara.free.fr/pub/rubber-" |
| 2039 | version ".tar.gz"))) |
| 2040 | (sha256 |
| 2041 | (base32 |
| 2042 | "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq")))) |
| 2043 | (build-system gnu-build-system) |
| 2044 | (arguments '(#:tests? #f)) ; no `check' target |
| 2045 | (inputs `(("texinfo" ,texinfo) |
| 2046 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
| 2047 | ("which" ,which))) |
| 2048 | (home-page "https://launchpad.net/rubber") |
| 2049 | (synopsis "Wrapper for LaTeX and friends") |
| 2050 | (description |
| 2051 | "Rubber is a program whose purpose is to handle all tasks related to the |
| 2052 | compilation of LaTeX documents. This includes compiling the document itself, |
| 2053 | of course, enough times so that all references are defined, and running BibTeX |
| 2054 | to manage bibliographic references. Automatic execution of dvips to produce |
| 2055 | PostScript documents is also included, as well as usage of pdfLaTeX to produce |
| 2056 | PDF documents.") |
| 2057 | (license license:gpl2+))) |
| 2058 | |
| 2059 | (define-public texmaker |
| 2060 | (package |
| 2061 | (name "texmaker") |
| 2062 | (version "4.5") |
| 2063 | (source (origin |
| 2064 | (method url-fetch) |
| 2065 | (uri (string-append "http://www.xm1math.net/texmaker/texmaker-" |
| 2066 | version ".tar.bz2")) |
| 2067 | (sha256 |
| 2068 | (base32 |
| 2069 | "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c")))) |
| 2070 | (build-system gnu-build-system) |
| 2071 | (arguments |
| 2072 | `(#:phases |
| 2073 | (modify-phases %standard-phases |
| 2074 | ;; Qt has its own configuration utility. |
| 2075 | (replace 'configure |
| 2076 | (lambda* (#:key outputs #:allow-other-keys) |
| 2077 | (let ((out (assoc-ref outputs "out"))) |
| 2078 | (zero? (system* "qmake" |
| 2079 | (string-append "PREFIX=" out) |
| 2080 | (string-append "DESKTOPDIR=" out |
| 2081 | "/share/applications") |
| 2082 | (string-append "ICONDIR=" out "/share/pixmaps") |
| 2083 | "texmaker.pro")))))))) |
| 2084 | (inputs |
| 2085 | `(("poppler-qt5" ,poppler-qt5) |
| 2086 | ("qtbase" ,qtbase) |
| 2087 | ("qtscript" ,qtscript) |
| 2088 | ("qtwebkit" ,qtwebkit) |
| 2089 | ("zlib" ,zlib))) |
| 2090 | (native-inputs |
| 2091 | `(("pkg-config" ,pkg-config))) |
| 2092 | (home-page "http://www.xm1math.net/texmaker/") |
| 2093 | (synopsis "LaTeX editor") |
| 2094 | (description "Texmaker is a program that integrates many tools needed to |
| 2095 | develop documents with LaTeX, in a single application.") |
| 2096 | (license license:gpl2+))) |
| 2097 | |
| 2098 | |
| 2099 | (define-public teximpatient |
| 2100 | (package |
| 2101 | (name "teximpatient") |
| 2102 | (version "2.4") |
| 2103 | (source (origin |
| 2104 | (method url-fetch) |
| 2105 | (uri (string-append "mirror://gnu/" name "/" name "-" |
| 2106 | version ".tar.gz")) |
| 2107 | (sha256 |
| 2108 | (base32 |
| 2109 | "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd")))) |
| 2110 | (build-system gnu-build-system) |
| 2111 | (arguments |
| 2112 | `(#:phases |
| 2113 | (modify-phases %standard-phases |
| 2114 | (delete 'check) |
| 2115 | ;; Unfortunately some mistakes have been made in packaging. |
| 2116 | ;; Work around them here ... |
| 2117 | (replace 'unpack |
| 2118 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2119 | (let ((srcdir "teximpatient-2.4")) |
| 2120 | (system* "tar" "-xzf" (assoc-ref inputs "source") |
| 2121 | (string-append "--one-top-level=" srcdir)) |
| 2122 | (delete-file (string-append srcdir "/book.pdf")) |
| 2123 | (install-file (car |
| 2124 | (find-files |
| 2125 | (assoc-ref inputs "automake") |
| 2126 | "^install-sh$")) |
| 2127 | srcdir) |
| 2128 | (chdir srcdir))))))) |
| 2129 | (native-inputs |
| 2130 | `(("texlive" ,texlive) |
| 2131 | ("automake" ,automake))) |
| 2132 | (home-page "https://www.gnu.org/software/teximpatient/") |
| 2133 | (synopsis "Book on TeX, plain TeX and Eplain") |
| 2134 | (description "@i{TeX for the Impatient} is a ~350 page book on TeX, |
| 2135 | plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves, |
| 2136 | and Karl Berry.") |
| 2137 | (license license:fdl1.3+))) |