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