| 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 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 utils) |
| 34 | #:use-module (guix git-download) |
| 35 | #:use-module (gnu packages) |
| 36 | #:use-module (gnu packages autotools) |
| 37 | #:use-module (gnu packages bash) |
| 38 | #:use-module (gnu packages compression) |
| 39 | #:use-module (gnu packages fontutils) |
| 40 | #:use-module (gnu packages gd) |
| 41 | #:use-module (gnu packages ghostscript) |
| 42 | #:use-module (gnu packages gtk) |
| 43 | #:use-module (gnu packages icu4c) |
| 44 | #:use-module (gnu packages image) |
| 45 | #:use-module (gnu packages lua) |
| 46 | #:use-module (gnu packages multiprecision) |
| 47 | #:use-module (gnu packages pdf) |
| 48 | #:use-module (gnu packages perl) |
| 49 | #:use-module (gnu packages pkg-config) |
| 50 | #:use-module (gnu packages python) |
| 51 | #:use-module (gnu packages qt) |
| 52 | #:use-module (gnu packages ruby) |
| 53 | #:use-module (gnu packages shells) |
| 54 | #:use-module (gnu packages base) |
| 55 | #:use-module (gnu packages web) |
| 56 | #:use-module (gnu packages xml) |
| 57 | #:use-module (gnu packages xorg) |
| 58 | #:use-module (gnu packages xdisorg) |
| 59 | #:use-module (gnu packages zip) |
| 60 | #:autoload (gnu packages texinfo) (texinfo) |
| 61 | #:use-module (ice-9 ftw) |
| 62 | #:use-module (srfi srfi-1)) |
| 63 | |
| 64 | (define texlive-extra-src |
| 65 | (origin |
| 66 | (method url-fetch) |
| 67 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-extra.tar.xz") |
| 68 | (sha256 (base32 |
| 69 | "0q4a92zmwhn4ry6xgrp4k8wq11ax2sg9rg9yrsrdkr719y0x887a")))) |
| 70 | |
| 71 | (define texlive-texmf-src |
| 72 | (origin |
| 73 | (method url-fetch) |
| 74 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz") |
| 75 | (sha256 (base32 |
| 76 | "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr")))) |
| 77 | |
| 78 | (define texlive-bin |
| 79 | (package |
| 80 | (name "texlive-bin") |
| 81 | (version "2016") |
| 82 | (source |
| 83 | (origin |
| 84 | (method url-fetch) |
| 85 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz") |
| 86 | (sha256 (base32 |
| 87 | "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8")))) |
| 88 | (build-system gnu-build-system) |
| 89 | (inputs |
| 90 | `(("texlive-extra-src" ,texlive-extra-src) |
| 91 | ("cairo" ,cairo) |
| 92 | ("fontconfig" ,fontconfig) |
| 93 | ("fontforge" ,fontforge) |
| 94 | ("freetype" ,freetype) |
| 95 | ("gd" ,gd) |
| 96 | ("gmp" ,gmp) |
| 97 | ("ghostscript" ,ghostscript) |
| 98 | ("graphite2" ,graphite2) |
| 99 | ("harfbuzz" ,harfbuzz) |
| 100 | ("icu4c" ,icu4c) |
| 101 | ("libpaper" ,libpaper) |
| 102 | ("libpng" ,libpng) |
| 103 | ("libxaw" ,libxaw) |
| 104 | ("libxt" ,libxt) |
| 105 | ("mpfr" ,mpfr) |
| 106 | ("perl" ,perl) |
| 107 | ("pixman" ,pixman) |
| 108 | ("poppler" ,poppler) |
| 109 | ("potrace" ,potrace) |
| 110 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
| 111 | ("ruby" ,ruby) |
| 112 | ("tcsh" ,tcsh) |
| 113 | ("teckit" ,teckit) |
| 114 | ("zlib" ,zlib) |
| 115 | ("zziplib" ,zziplib))) |
| 116 | (native-inputs |
| 117 | `(("pkg-config" ,pkg-config))) |
| 118 | (arguments |
| 119 | `(#:out-of-source? #t |
| 120 | #:configure-flags |
| 121 | `("--disable-native-texlive-build" |
| 122 | "--with-system-cairo" |
| 123 | "--with-system-freetype2" |
| 124 | "--with-system-gd" |
| 125 | "--with-system-gmp" |
| 126 | "--with-system-graphite2" |
| 127 | "--with-system-harfbuzz" |
| 128 | "--with-system-icu" |
| 129 | "--with-system-libgs" |
| 130 | "--with-system-libpaper" |
| 131 | "--with-system-libpng" |
| 132 | "--with-system-mpfr" |
| 133 | "--with-system-pixman" |
| 134 | "--with-system-poppler" |
| 135 | "--with-system-potrace" |
| 136 | "--with-system-teckit" |
| 137 | "--with-system-xpdf" |
| 138 | "--with-system-zlib" |
| 139 | "--with-system-zziplib") |
| 140 | |
| 141 | ;; Disable tests on mips64 to cope with a failure of luajiterr.test. |
| 142 | ;; XXX FIXME fix luajit properly on mips64. |
| 143 | #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system) |
| 144 | (%current-system)))) |
| 145 | #:phases |
| 146 | (modify-phases %standard-phases |
| 147 | (add-after 'install 'postint |
| 148 | (lambda* (#:key inputs outputs #:allow-other-keys #:rest args) |
| 149 | (let* ((out (assoc-ref outputs "out")) |
| 150 | (share (string-append out "/share")) |
| 151 | (texlive-extra (assoc-ref inputs "texlive-extra-src")) |
| 152 | (unpack (assoc-ref %standard-phases 'unpack)) |
| 153 | (patch-source-shebangs |
| 154 | (assoc-ref %standard-phases 'patch-source-shebangs))) |
| 155 | ;; Create symbolic links for the latex variants and their |
| 156 | ;; man pages. |
| 157 | (with-directory-excursion (string-append out "/bin/") |
| 158 | (for-each symlink |
| 159 | '("pdftex" "pdftex" "xetex" "luatex") |
| 160 | '("latex" "pdflatex" "xelatex" "lualatex"))) |
| 161 | (with-directory-excursion (string-append share "/man/man1/") |
| 162 | (symlink "luatex.1" "lualatex.1")) |
| 163 | ;; Unpack texlive-extra and install tlpkg. |
| 164 | (mkdir "texlive-extra") |
| 165 | (with-directory-excursion "texlive-extra" |
| 166 | (apply unpack (list #:source texlive-extra)) |
| 167 | (apply patch-source-shebangs (list #:source texlive-extra)) |
| 168 | (system* "mv" "tlpkg" share)))))))) |
| 169 | (synopsis "TeX Live, a package of the TeX typesetting system") |
| 170 | (description |
| 171 | "TeX Live provides a comprehensive TeX document production system. |
| 172 | It includes all the major TeX-related programs, macro packages, and fonts |
| 173 | that are free software, including support for many languages around the |
| 174 | world. |
| 175 | |
| 176 | This package contains the binaries.") |
| 177 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
| 178 | (home-page "https://www.tug.org/texlive/"))) |
| 179 | |
| 180 | (define texlive-texmf |
| 181 | (package |
| 182 | (name "texlive-texmf") |
| 183 | (version "2016") |
| 184 | (source texlive-texmf-src) |
| 185 | (build-system gnu-build-system) |
| 186 | (inputs |
| 187 | `(("texlive-bin" ,texlive-bin) |
| 188 | ("lua" ,lua) |
| 189 | ("perl" ,perl) |
| 190 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
| 191 | ("ruby" ,ruby) |
| 192 | ("tcsh" ,tcsh))) |
| 193 | (arguments |
| 194 | `(#:modules ((guix build gnu-build-system) |
| 195 | (guix build utils) |
| 196 | (srfi srfi-26)) |
| 197 | |
| 198 | ;; This package takes 4 GiB, which we can't afford to distribute from |
| 199 | ;; our servers. |
| 200 | #:substitutable? #f |
| 201 | |
| 202 | #:phases |
| 203 | (modify-phases (map (cut assq <> %standard-phases) |
| 204 | '(set-paths unpack patch-source-shebangs)) |
| 205 | (add-after 'patch-source-shebangs 'install |
| 206 | (lambda* (#:key outputs #:allow-other-keys) |
| 207 | (let ((share (string-append (assoc-ref outputs "out") "/share"))) |
| 208 | (mkdir-p share) |
| 209 | (system* "mv" "texmf-dist" share)))) |
| 210 | (add-after 'install 'texmf-config |
| 211 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 212 | (let* ((out (assoc-ref outputs "out")) |
| 213 | (share (string-append out "/share")) |
| 214 | (texmfroot (string-append share "/texmf-dist/web2c")) |
| 215 | (texmfcnf (string-append texmfroot "/texmf.cnf")) |
| 216 | (texlive-bin (assoc-ref inputs "texlive-bin")) |
| 217 | (texbin (string-append texlive-bin "/bin")) |
| 218 | (tlpkg (string-append texlive-bin "/share/tlpkg"))) |
| 219 | ;; Register SHARE as TEXMFROOT in texmf.cnf. |
| 220 | (substitute* texmfcnf |
| 221 | (("TEXMFROOT = \\$SELFAUTOPARENT") |
| 222 | (string-append "TEXMFROOT = " share)) |
| 223 | (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local") |
| 224 | "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local") |
| 225 | (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL")) |
| 226 | ;; Register paths in texmfcnf.lua, needed for context. |
| 227 | (substitute* (string-append texmfroot "/texmfcnf.lua") |
| 228 | (("selfautodir:") out) |
| 229 | (("selfautoparent:") (string-append share "/"))) |
| 230 | ;; Set path to TeXLive Perl modules |
| 231 | (setenv "PERL5LIB" |
| 232 | (string-append (getenv "PERL5LIB") ":" tlpkg)) |
| 233 | ;; Configure the texmf-dist tree; inspired from |
| 234 | ;; http://slackbuilds.org/repository/13.37/office/texlive/ |
| 235 | (setenv "PATH" (string-append (getenv "PATH") ":" texbin)) |
| 236 | (setenv "TEXMFCNF" texmfroot) |
| 237 | (system* "updmap-sys" "--nohash" "--syncwithtrees") |
| 238 | (system* "mktexlsr") |
| 239 | (system* "fmtutil-sys" "--all"))))))) |
| 240 | (properties `((max-silent-time . 9600))) ; don't time out while grafting |
| 241 | (synopsis "TeX Live, a package of the TeX typesetting system") |
| 242 | (description |
| 243 | "TeX Live provides a comprehensive TeX document production system. |
| 244 | It includes all the major TeX-related programs, macro packages, and fonts |
| 245 | that are free software, including support for many languages around the |
| 246 | world. |
| 247 | |
| 248 | This package contains the complete tree of texmf-dist data.") |
| 249 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
| 250 | (home-page "https://www.tug.org/texlive/"))) |
| 251 | |
| 252 | (define-public texlive |
| 253 | (package |
| 254 | (name "texlive") |
| 255 | (version "2016") |
| 256 | (source #f) |
| 257 | (build-system trivial-build-system) |
| 258 | (inputs `(("bash" ,bash) ; for wrap-program |
| 259 | ("texlive-bin" ,texlive-bin) |
| 260 | ("texlive-texmf" ,texlive-texmf))) |
| 261 | (native-search-paths |
| 262 | (list (search-path-specification |
| 263 | (variable "TEXMFLOCAL") |
| 264 | (files '("share/texmf-local"))))) |
| 265 | (arguments |
| 266 | `(#:modules ((guix build utils)) |
| 267 | #:builder |
| 268 | ;; Build the union of texlive-bin and texlive-texmf, but take the |
| 269 | ;; conflicting subdirectory share/texmf-dist from texlive-texmf. |
| 270 | (begin |
| 271 | (use-modules (guix build utils)) |
| 272 | (let ((out (assoc-ref %outputs "out")) |
| 273 | (bin (assoc-ref %build-inputs "texlive-bin")) |
| 274 | (texmf (assoc-ref %build-inputs "texlive-texmf")) |
| 275 | (bash (assoc-ref %build-inputs "bash"))) |
| 276 | (mkdir out) |
| 277 | (with-directory-excursion out |
| 278 | (for-each |
| 279 | (lambda (name) |
| 280 | (symlink (string-append bin "/" name) name)) |
| 281 | '("include" "lib")) |
| 282 | (mkdir "bin") |
| 283 | (with-directory-excursion "bin" |
| 284 | (setenv "PATH" (string-append bash "/bin")) |
| 285 | (for-each |
| 286 | (lambda (name) |
| 287 | (symlink name (basename name)) |
| 288 | (wrap-program |
| 289 | (basename name) |
| 290 | `("TEXMFCNF" = |
| 291 | (,(string-append texmf "/share/texmf-dist/web2c"))))) |
| 292 | (find-files (string-append bin "/bin/") ""))) |
| 293 | (mkdir "share") |
| 294 | (with-directory-excursion "share" |
| 295 | (for-each |
| 296 | (lambda (name) |
| 297 | (symlink (string-append bin "/share/" name) name)) |
| 298 | '("info" "man" "tlpkg")) |
| 299 | (for-each |
| 300 | (lambda (name) |
| 301 | (symlink (string-append texmf "/share/" name) name)) |
| 302 | '("texmf-dist" "texmf-var")))))))) |
| 303 | (synopsis "TeX Live, a package of the TeX typesetting system") |
| 304 | (description |
| 305 | "TeX Live provides a comprehensive TeX document production system. |
| 306 | It includes all the major TeX-related programs, macro packages, and fonts |
| 307 | that are free software, including support for many languages around the |
| 308 | world. |
| 309 | |
| 310 | This package contains the complete TeX Live distribution.") |
| 311 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
| 312 | (home-page "https://www.tug.org/texlive/"))) |
| 313 | |
| 314 | |
| 315 | ;; texlive-texmf-minimal is a pruned, small version of the texlive tree, |
| 316 | ;; in particular dropping documentation and fonts. It weighs in at 470 MiB |
| 317 | ;; instead of 4 GiB. |
| 318 | (define texlive-texmf-minimal |
| 319 | (package (inherit texlive-texmf) |
| 320 | (name "texlive-texmf-minimal") |
| 321 | (arguments |
| 322 | (substitute-keyword-arguments |
| 323 | (package-arguments texlive-texmf) |
| 324 | ((#:modules modules) |
| 325 | `((ice-9 ftw) |
| 326 | (srfi srfi-1) |
| 327 | ,@modules)) |
| 328 | ((#:phases phases) |
| 329 | `(modify-phases ,phases |
| 330 | (add-after 'unpack 'prune |
| 331 | (lambda _ |
| 332 | (define (delete subdir exclude) |
| 333 | "Delete all files and directories in SUBDIR except for those |
| 334 | given in the list EXCLUDE." |
| 335 | (with-directory-excursion subdir |
| 336 | (for-each delete-file-recursively |
| 337 | (lset-difference equal? |
| 338 | (scandir ".") |
| 339 | (append '("." "..") |
| 340 | exclude))))) |
| 341 | (with-directory-excursion "texmf-dist" |
| 342 | (for-each delete-file-recursively |
| 343 | '("doc" "source" "tex4ht")) |
| 344 | ;; Delete all subdirectories of "fonts", except for "tfm" and |
| 345 | ;; any directories named "cm". |
| 346 | (delete "fonts" '("afm" "map" "pk" "source" "tfm" "type1")) |
| 347 | (delete "fonts/afm" '("public")) |
| 348 | (delete "fonts/afm/public" '("amsfonts")) |
| 349 | (delete "fonts/afm/public/amsfonts" '("cm")) |
| 350 | (delete "fonts/map" '("dvips")) |
| 351 | (delete "fonts/map/dvips" '("cm")) |
| 352 | (delete "fonts/source" '("public")) |
| 353 | (delete "fonts/source/public" '("cm")) |
| 354 | (delete "fonts/tfm" '("public")) |
| 355 | (delete "fonts/type1" '("public")) |
| 356 | (delete "fonts/type1/public" '("amsfonts")) |
| 357 | (delete "fonts/type1/public/amsfonts" '("cm"))) |
| 358 | #t)))))) |
| 359 | (description |
| 360 | "TeX Live provides a comprehensive TeX document production system. |
| 361 | It includes all the major TeX-related programs, macro packages, and fonts |
| 362 | that are free software, including support for many languages around the |
| 363 | world. |
| 364 | |
| 365 | This package contains a small subset of the texmf-dist data."))) |
| 366 | |
| 367 | |
| 368 | ;; texlive-minimal is the same as texlive, but using texlive-texmf-minimal |
| 369 | ;; instead of the full texlive-texmf. It can be used, for instance, as a |
| 370 | ;; native input to packages that need texlive to build their documentation. |
| 371 | (define-public texlive-minimal |
| 372 | (package (inherit texlive) |
| 373 | (name "texlive-minimal") |
| 374 | (inputs |
| 375 | `(("texlive-texmf" ,texlive-texmf-minimal) |
| 376 | ,@(alist-delete "texlive-texmf" (package-inputs texlive)))) |
| 377 | (native-search-paths |
| 378 | (list (search-path-specification |
| 379 | (variable "TEXMFLOCAL") |
| 380 | (files '("share/texmf-local"))))) |
| 381 | (description |
| 382 | "TeX Live provides a comprehensive TeX document production system. |
| 383 | It includes all the major TeX-related programs, macro packages, and fonts |
| 384 | that are free software, including support for many languages around the |
| 385 | world. |
| 386 | |
| 387 | This package contains a small working part of the TeX Live distribution."))) |
| 388 | |
| 389 | (define-public perl-text-bibtex |
| 390 | (package |
| 391 | (name "perl-text-bibtex") |
| 392 | (version "0.77") |
| 393 | (source |
| 394 | (origin |
| 395 | (method url-fetch) |
| 396 | (uri (string-append "mirror://cpan/authors/id/A/AM/AMBS/Text-BibTeX-" |
| 397 | version ".tar.gz")) |
| 398 | (sha256 |
| 399 | (base32 |
| 400 | "0kkfx8skk763pivz6h2ffy2zdp1lvy6d5sz0kjaj0mdbjffvnnb4")))) |
| 401 | (build-system perl-build-system) |
| 402 | (arguments |
| 403 | `(#:phases |
| 404 | (modify-phases %standard-phases |
| 405 | (add-after 'unpack 'add-output-directory-to-rpath |
| 406 | (lambda* (#:key outputs #:allow-other-keys) |
| 407 | (substitute* "inc/MyBuilder.pm" |
| 408 | (("-Lbtparse" line) |
| 409 | (string-append "-Wl,-rpath=" |
| 410 | (assoc-ref outputs "out") "/lib " line))) |
| 411 | #t)) |
| 412 | (add-after 'unpack 'install-libraries-to-/lib |
| 413 | (lambda* (#:key outputs #:allow-other-keys) |
| 414 | (substitute* "Build.PL" |
| 415 | (("lib64") "lib")) |
| 416 | #t))))) |
| 417 | (native-inputs |
| 418 | `(("perl-capture-tiny" ,perl-capture-tiny) |
| 419 | ("perl-config-autoconf" ,perl-config-autoconf) |
| 420 | ("perl-extutils-libbuilder" ,perl-extutils-libbuilder) |
| 421 | ("perl-module-build" ,perl-module-build))) |
| 422 | (home-page "http://search.cpan.org/dist/Text-BibTeX") |
| 423 | (synopsis "Interface to read and parse BibTeX files") |
| 424 | (description "@code{Text::BibTeX} is a Perl library for reading, parsing, |
| 425 | and processing BibTeX files. @code{Text::BibTeX} gives you access to the data |
| 426 | at many different levels: you may work with BibTeX entries as simple field to |
| 427 | string mappings, or get at the original form of the data as a list of simple |
| 428 | values (strings, macros, or numbers) pasted together.") |
| 429 | (license (package-license perl)))) |
| 430 | |
| 431 | (define-public biber |
| 432 | (package |
| 433 | (name "biber-next") |
| 434 | (version "2.6") |
| 435 | (source (origin |
| 436 | (method url-fetch) |
| 437 | (uri (string-append "https://github.com/plk/biber/archive/v" |
| 438 | version ".tar.gz")) |
| 439 | (file-name (string-append name "-" version ".tar.gz")) |
| 440 | (sha256 |
| 441 | (base32 |
| 442 | "158smzgjhjvyabdv97si5q88zjj5l8j1zbfnddvzy6fkpfhskgkp")))) |
| 443 | (build-system perl-build-system) |
| 444 | (arguments |
| 445 | `(#:phases |
| 446 | (modify-phases %standard-phases |
| 447 | (add-after 'install 'wrap-programs |
| 448 | (lambda* (#:key outputs #:allow-other-keys) |
| 449 | (let* ((out (assoc-ref outputs "out")) |
| 450 | (perl5lib (getenv "PERL5LIB"))) |
| 451 | (wrap-program (string-append out "/bin/biber") |
| 452 | `("PERL5LIB" ":" prefix |
| 453 | (,(string-append perl5lib ":" out |
| 454 | "/lib/perl5/site_perl"))))) |
| 455 | #t))))) |
| 456 | (inputs |
| 457 | `(("perl-autovivification" ,perl-autovivification) |
| 458 | ("perl-class-accessor" ,perl-class-accessor) |
| 459 | ("perl-data-dump" ,perl-data-dump) |
| 460 | ("perl-data-compare" ,perl-data-compare) |
| 461 | ("perl-data-uniqid" ,perl-data-uniqid) |
| 462 | ("perl-datetime-format-builder" ,perl-datetime-format-builder) |
| 463 | ("perl-datetime-calendar-julian" ,perl-datetime-calendar-julian) |
| 464 | ("perl-file-slurp" ,perl-file-slurp) |
| 465 | ("perl-ipc-cmd" ,perl-ipc-cmd) |
| 466 | ("perl-ipc-run3" ,perl-ipc-run3) |
| 467 | ("perl-list-allutils" ,perl-list-allutils) |
| 468 | ("perl-list-moreutils" ,perl-list-moreutils) |
| 469 | ("perl-mozilla-ca" ,perl-mozilla-ca) |
| 470 | ("perl-regexp-common" ,perl-regexp-common) |
| 471 | ("perl-log-log4perl" ,perl-log-log4perl) |
| 472 | ;; We cannot use perl-unicode-collate here, because otherwise the |
| 473 | ;; hardcoded hashes in the tests would differ. See |
| 474 | ;; https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1469249.html |
| 475 | ;;("perl-unicode-collate" ,perl-unicode-collate) |
| 476 | ("perl-unicode-normalize" ,perl-unicode-normalize) |
| 477 | ("perl-unicode-linebreak" ,perl-unicode-linebreak) |
| 478 | ("perl-encode-eucjpascii" ,perl-encode-eucjpascii) |
| 479 | ("perl-encode-jis2k" ,perl-encode-jis2k) |
| 480 | ("perl-encode-hanextra" ,perl-encode-hanextra) |
| 481 | ("perl-xml-libxml" ,perl-xml-libxml) |
| 482 | ("perl-xml-libxml-simple" ,perl-xml-libxml-simple) |
| 483 | ("perl-xml-libxslt" ,perl-xml-libxslt) |
| 484 | ("perl-xml-writer" ,perl-xml-writer) |
| 485 | ("perl-sort-key" ,perl-sort-key) |
| 486 | ("perl-text-csv" ,perl-text-csv) |
| 487 | ("perl-text-csv-xs" ,perl-text-csv-xs) |
| 488 | ("perl-text-roman" ,perl-text-roman) |
| 489 | ("perl-uri" ,perl-uri) |
| 490 | ("perl-text-bibtex" ,perl-text-bibtex) |
| 491 | ("perl-libwww" ,perl-libwww) |
| 492 | ("perl-lwp-protocol-https" ,perl-lwp-protocol-https) |
| 493 | ("perl-business-isbn" ,perl-business-isbn) |
| 494 | ("perl-business-issn" ,perl-business-issn) |
| 495 | ("perl-business-ismn" ,perl-business-ismn) |
| 496 | ("perl-lingua-translit" ,perl-lingua-translit))) |
| 497 | (native-inputs |
| 498 | `(("perl-config-autoconf" ,perl-config-autoconf) |
| 499 | ("perl-extutils-libbuilder" ,perl-extutils-libbuilder) |
| 500 | ("perl-module-build" ,perl-module-build) |
| 501 | ;; for tests |
| 502 | ("perl-file-which" ,perl-file-which) |
| 503 | ("perl-test-more" ,perl-test-most) ; FIXME: "more" would be sufficient |
| 504 | ("perl-test-differences" ,perl-test-differences))) |
| 505 | (home-page "http://biblatex-biber.sourceforge.net/") |
| 506 | (synopsis "Backend for the BibLaTeX citation management tool") |
| 507 | (description "Biber is a BibTeX replacement for users of biblatex. Among |
| 508 | other things it comes with full Unicode support.") |
| 509 | (license license:artistic2.0))) |
| 510 | |
| 511 | ;; Our version of texlive comes with biblatex 3.4, which is only compatible |
| 512 | ;; with biber 2.5 according to the compatibility matrix in the biber |
| 513 | ;; documentation. |
| 514 | (define-public biber-2.5 |
| 515 | (package (inherit biber) |
| 516 | (name "biber") |
| 517 | (version "2.5") |
| 518 | (source (origin |
| 519 | (method url-fetch) |
| 520 | (uri (string-append "https://github.com/plk/biber/archive/v" |
| 521 | version ".tar.gz")) |
| 522 | (file-name (string-append name "-" version ".tar.gz")) |
| 523 | (sha256 |
| 524 | (base32 |
| 525 | "163sd343wkrzwnvj2003m2j0kz517jmjr4savw6f8bjxhj8fdrqv")))) |
| 526 | (arguments |
| 527 | (substitute-keyword-arguments (package-arguments biber) |
| 528 | ((#:phases phases) |
| 529 | `(modify-phases ,phases |
| 530 | (add-before 'check 'delete-failing-test |
| 531 | (lambda _ |
| 532 | (delete-file "t/sort-order.t") |
| 533 | #t)))))) |
| 534 | (inputs |
| 535 | `(("perl-date-simple" ,perl-date-simple) |
| 536 | ,@(package-inputs biber))))) |
| 537 | |
| 538 | (define-public rubber |
| 539 | (package |
| 540 | (name "rubber") |
| 541 | (version "1.1") |
| 542 | (source (origin |
| 543 | (method url-fetch) |
| 544 | (uri (list (string-append "https://launchpad.net/rubber/trunk/" |
| 545 | version "/+download/rubber-" |
| 546 | version ".tar.gz") |
| 547 | (string-append "http://ebeffara.free.fr/pub/rubber-" |
| 548 | version ".tar.gz"))) |
| 549 | (sha256 |
| 550 | (base32 |
| 551 | "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq")))) |
| 552 | (build-system gnu-build-system) |
| 553 | (arguments '(#:tests? #f)) ; no `check' target |
| 554 | (inputs `(("texinfo" ,texinfo) |
| 555 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
| 556 | ("which" ,which))) |
| 557 | (home-page "https://launchpad.net/rubber") |
| 558 | (synopsis "Wrapper for LaTeX and friends") |
| 559 | (description |
| 560 | "Rubber is a program whose purpose is to handle all tasks related to the |
| 561 | compilation of LaTeX documents. This includes compiling the document itself, |
| 562 | of course, enough times so that all references are defined, and running BibTeX |
| 563 | to manage bibliographic references. Automatic execution of dvips to produce |
| 564 | PostScript documents is also included, as well as usage of pdfLaTeX to produce |
| 565 | PDF documents.") |
| 566 | (license license:gpl2+))) |
| 567 | |
| 568 | (define-public texmaker |
| 569 | (package |
| 570 | (name "texmaker") |
| 571 | (version "4.5") |
| 572 | (source (origin |
| 573 | (method url-fetch) |
| 574 | (uri (string-append "http://www.xm1math.net/texmaker/texmaker-" |
| 575 | version ".tar.bz2")) |
| 576 | (sha256 |
| 577 | (base32 |
| 578 | "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c")))) |
| 579 | (build-system gnu-build-system) |
| 580 | (arguments |
| 581 | `(#:phases |
| 582 | (modify-phases %standard-phases |
| 583 | ;; Qt has its own configuration utility. |
| 584 | (replace 'configure |
| 585 | (lambda* (#:key outputs #:allow-other-keys) |
| 586 | (let ((out (assoc-ref outputs "out"))) |
| 587 | (zero? (system* "qmake" |
| 588 | (string-append "PREFIX=" out) |
| 589 | (string-append "DESKTOPDIR=" out |
| 590 | "/share/applications") |
| 591 | (string-append "ICONDIR=" out "/share/pixmaps") |
| 592 | "texmaker.pro")))))))) |
| 593 | (inputs |
| 594 | `(("poppler-qt5" ,poppler-qt5) |
| 595 | ("qtbase" ,qtbase) |
| 596 | ("qtscript" ,qtscript) |
| 597 | ("qtwebkit" ,qtwebkit) |
| 598 | ("zlib" ,zlib))) |
| 599 | (native-inputs |
| 600 | `(("pkg-config" ,pkg-config))) |
| 601 | (home-page "http://www.xm1math.net/texmaker/") |
| 602 | (synopsis "LaTeX editor") |
| 603 | (description "Texmaker is a program that integrates many tools needed to |
| 604 | develop documents with LaTeX, in a single application.") |
| 605 | (license license:gpl2+))) |
| 606 | |
| 607 | |
| 608 | (define-public teximpatient |
| 609 | (package |
| 610 | (name "teximpatient") |
| 611 | (version "2.4") |
| 612 | (source (origin |
| 613 | (method url-fetch) |
| 614 | (uri (string-append "mirror://gnu/" name "/" name "-" |
| 615 | version ".tar.gz")) |
| 616 | (sha256 |
| 617 | (base32 |
| 618 | "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd")))) |
| 619 | (build-system gnu-build-system) |
| 620 | (arguments |
| 621 | `(#:phases |
| 622 | (modify-phases %standard-phases |
| 623 | (delete 'check) |
| 624 | ;; Unfortunately some mistakes have been made in packaging. |
| 625 | ;; Work around them here ... |
| 626 | (replace 'unpack |
| 627 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 628 | (let ((srcdir "teximpatient-2.4")) |
| 629 | (system* "tar" "-xzf" (assoc-ref inputs "source") |
| 630 | (string-append "--one-top-level=" srcdir)) |
| 631 | (delete-file (string-append srcdir "/book.pdf")) |
| 632 | (install-file (car |
| 633 | (find-files |
| 634 | (assoc-ref inputs "automake") |
| 635 | "^install-sh$")) |
| 636 | srcdir) |
| 637 | (chdir srcdir))))))) |
| 638 | (native-inputs |
| 639 | `(("texlive" ,texlive) |
| 640 | ("automake" ,automake))) |
| 641 | (home-page "http://www.gnu.org/software/teximpatient") |
| 642 | (synopsis "Book on TeX, plain TeX and Eplain") |
| 643 | (description "@i{TeX for the Impatient} is a ~350 page book on TeX, |
| 644 | plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves, |
| 645 | and Karl Berry.") |
| 646 | (license license:fdl1.3+))) |