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") |
eb0119ef | 75 | (sha256 (base32 |
29a56d8e | 76 | "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr")))) |
eb0119ef | 77 | |
8bcdc23f | 78 | (define texlive-bin |
eb0119ef | 79 | (package |
0aa34e82 | 80 | (name "texlive-bin") |
7a15a68f | 81 | (version "2016") |
0aa34e82 AE |
82 | (source |
83 | (origin | |
84 | (method url-fetch) | |
29a56d8e | 85 | (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz") |
0aa34e82 | 86 | (sha256 (base32 |
29a56d8e | 87 | "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8")))) |
eb0119ef | 88 | (build-system gnu-build-system) |
0aa34e82 AE |
89 | (inputs |
90 | `(("texlive-extra-src" ,texlive-extra-src) | |
91 | ("cairo" ,cairo) | |
92 | ("fontconfig" ,fontconfig) | |
93 | ("fontforge" ,fontforge) | |
94 | ("freetype" ,freetype) | |
95 | ("gd" ,gd) | |
0256c746 | 96 | ("gmp" ,gmp) |
0aa34e82 AE |
97 | ("ghostscript" ,ghostscript) |
98 | ("graphite2" ,graphite2) | |
99 | ("harfbuzz" ,harfbuzz) | |
100 | ("icu4c" ,icu4c) | |
101 | ("libpaper" ,libpaper) | |
102 | ("libpng" ,libpng) | |
103 | ("libxaw" ,libxaw) | |
104 | ("libxt" ,libxt) | |
0256c746 | 105 | ("mpfr" ,mpfr) |
0aa34e82 AE |
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))) | |
c4c4cc05 | 116 | (native-inputs |
e9a6d225 | 117 | `(("pkg-config" ,pkg-config))) |
eb0119ef AE |
118 | (arguments |
119 | `(#:out-of-source? #t | |
120 | #:configure-flags | |
121 | `("--disable-native-texlive-build" | |
fd89b36b | 122 | "--with-system-cairo" |
eb0119ef | 123 | "--with-system-freetype2" |
fd89b36b | 124 | "--with-system-gd" |
0256c746 | 125 | "--with-system-gmp" |
be2c88ca | 126 | "--with-system-graphite2" |
c70cf7eb | 127 | "--with-system-harfbuzz" |
eb0119ef AE |
128 | "--with-system-icu" |
129 | "--with-system-libgs" | |
609578a7 | 130 | "--with-system-libpaper" |
eb0119ef | 131 | "--with-system-libpng" |
0256c746 | 132 | "--with-system-mpfr" |
fd89b36b | 133 | "--with-system-pixman" |
eb0119ef | 134 | "--with-system-poppler" |
75916982 | 135 | "--with-system-potrace" |
eb0119ef AE |
136 | "--with-system-teckit" |
137 | "--with-system-xpdf" | |
138 | "--with-system-zlib" | |
139 | "--with-system-zziplib") | |
2f4640e3 MW |
140 | |
141 | ;; Disable tests on mips64 to cope with a failure of luajiterr.test. | |
142 | ;; XXX FIXME fix luajit properly on mips64. | |
d2e84281 | 143 | #:tests? ,(not (string-prefix? "mips64" (or (%current-target-system) |
2f4640e3 | 144 | (%current-system)))) |
eb0119ef | 145 | #:phases |
4a6635f3 AE |
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)))))))) | |
0aa34e82 AE |
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.") | |
132e14b4 EF |
177 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
178 | (home-page "https://www.tug.org/texlive/"))) | |
0aa34e82 | 179 | |
8bcdc23f | 180 | (define texlive-texmf |
0aa34e82 AE |
181 | (package |
182 | (name "texlive-texmf") | |
7a15a68f | 183 | (version "2016") |
0aa34e82 AE |
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)) | |
a348af40 LC |
197 | |
198 | ;; This package takes 4 GiB, which we can't afford to distribute from | |
199 | ;; our servers. | |
200 | #:substitutable? #f | |
201 | ||
0aa34e82 | 202 | #:phases |
4a6635f3 AE |
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") | |
2d634d9b FB |
222 | (string-append "TEXMFROOT = " share)) |
223 | (("TEXMFLOCAL = \\$SELFAUTOGRANDPARENT/texmf-local") | |
224 | "TEXMFLOCAL = $SELFAUTODIR/share/texmf-local") | |
225 | (("!!\\$TEXMFLOCAL") "$TEXMFLOCAL")) | |
4a6635f3 AE |
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"))))))) | |
7a15a68f | 240 | (properties `((max-silent-time . 9600))) ; don't time out while grafting |
0aa34e82 | 241 | (synopsis "TeX Live, a package of the TeX typesetting system") |
eb0119ef AE |
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 | |
0aa34e82 AE |
246 | world. |
247 | ||
248 | This package contains the complete tree of texmf-dist data.") | |
132e14b4 EF |
249 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
250 | (home-page "https://www.tug.org/texlive/"))) | |
0aa34e82 AE |
251 | |
252 | (define-public texlive | |
253 | (package | |
254 | (name "texlive") | |
7a15a68f | 255 | (version "2016") |
0aa34e82 AE |
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))) | |
2d634d9b FB |
261 | (native-search-paths |
262 | (list (search-path-specification | |
263 | (variable "TEXMFLOCAL") | |
264 | (files '("share/texmf-local"))))) | |
0aa34e82 AE |
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.") | |
132e14b4 EF |
311 | (license (license:fsf-free "https://www.tug.org/texlive/copying.html")) |
312 | (home-page "https://www.tug.org/texlive/"))) | |
231eae53 | 313 | |
6b5eb840 AE |
314 | |
315 | ;; texlive-texmf-minimal is a pruned, small version of the texlive tree, | |
a348af40 LC |
316 | ;; in particular dropping documentation and fonts. It weighs in at 470 MiB |
317 | ;; instead of 4 GiB. | |
6b5eb840 AE |
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)))) | |
2d634d9b FB |
377 | (native-search-paths |
378 | (list (search-path-specification | |
379 | (variable "TEXMFLOCAL") | |
380 | (files '("share/texmf-local"))))) | |
6b5eb840 AE |
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 | ||
ebcf74da RW |
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 | ||
d4000680 RW |
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 | ||
6b5eb840 | 511 | |
231eae53 LC |
512 | (define-public rubber |
513 | (package | |
514 | (name "rubber") | |
515 | (version "1.1") | |
516 | (source (origin | |
517 | (method url-fetch) | |
518 | (uri (list (string-append "https://launchpad.net/rubber/trunk/" | |
519 | version "/+download/rubber-" | |
520 | version ".tar.gz") | |
521 | (string-append "http://ebeffara.free.fr/pub/rubber-" | |
522 | version ".tar.gz"))) | |
523 | (sha256 | |
524 | (base32 | |
525 | "1xbkv8ll889933gyi2a5hj7hhh216k04gn8fwz5lfv5iz8s34gbq")))) | |
526 | (build-system gnu-build-system) | |
527 | (arguments '(#:tests? #f)) ; no `check' target | |
528 | (inputs `(("texinfo" ,texinfo) | |
9bee5d6c | 529 | ("python" ,python-2) ; incompatible with Python 3 (print syntax) |
231eae53 LC |
530 | ("which" ,which))) |
531 | (home-page "https://launchpad.net/rubber") | |
35b9e423 | 532 | (synopsis "Wrapper for LaTeX and friends") |
231eae53 LC |
533 | (description |
534 | "Rubber is a program whose purpose is to handle all tasks related to the | |
535 | compilation of LaTeX documents. This includes compiling the document itself, | |
536 | of course, enough times so that all references are defined, and running BibTeX | |
537 | to manage bibliographic references. Automatic execution of dvips to produce | |
538 | PostScript documents is also included, as well as usage of pdfLaTeX to produce | |
539 | PDF documents.") | |
540 | (license license:gpl2+))) | |
4791876c RJ |
541 | |
542 | (define-public texmaker | |
543 | (package | |
544 | (name "texmaker") | |
545 | (version "4.5") | |
546 | (source (origin | |
547 | (method url-fetch) | |
548 | (uri (string-append "http://www.xm1math.net/texmaker/texmaker-" | |
549 | version ".tar.bz2")) | |
550 | (sha256 | |
551 | (base32 | |
552 | "056njk6j8wma23mlp7xa3rgfaxx0q8ynwx8wkmj7iy0b85p9ds9c")))) | |
553 | (build-system gnu-build-system) | |
554 | (arguments | |
555 | `(#:phases | |
556 | (modify-phases %standard-phases | |
557 | ;; Qt has its own configuration utility. | |
558 | (replace 'configure | |
559 | (lambda* (#:key outputs #:allow-other-keys) | |
560 | (let ((out (assoc-ref outputs "out"))) | |
561 | (zero? (system* "qmake" | |
562 | (string-append "PREFIX=" out) | |
563 | (string-append "DESKTOPDIR=" out | |
564 | "/share/applications") | |
565 | (string-append "ICONDIR=" out "/share/pixmaps") | |
566 | "texmaker.pro")))))))) | |
567 | (inputs | |
568 | `(("poppler-qt5" ,poppler-qt5) | |
bd917486 TD |
569 | ("qtbase" ,qtbase) |
570 | ("qtscript" ,qtscript) | |
571 | ("qtwebkit" ,qtwebkit) | |
4791876c RJ |
572 | ("zlib" ,zlib))) |
573 | (native-inputs | |
574 | `(("pkg-config" ,pkg-config))) | |
575 | (home-page "http://www.xm1math.net/texmaker/") | |
576 | (synopsis "LaTeX editor") | |
577 | (description "Texmaker is a program that integrates many tools needed to | |
578 | develop documents with LaTeX, in a single application.") | |
579 | (license license:gpl2+))) | |
83457fe0 JD |
580 | |
581 | ||
582 | (define-public teximpatient | |
583 | (package | |
584 | (name "teximpatient") | |
585 | (version "2.4") | |
586 | (source (origin | |
587 | (method url-fetch) | |
588 | (uri (string-append "mirror://gnu/" name "/" name "-" | |
589 | version ".tar.gz")) | |
590 | (sha256 | |
591 | (base32 | |
592 | "0h56w22d99dh4fgld4ssik8ggnmhmrrbnrn1lnxi1zr0miphn1sd")))) | |
593 | (build-system gnu-build-system) | |
594 | (arguments | |
595 | `(#:phases | |
596 | (modify-phases %standard-phases | |
597 | (delete 'check) | |
598 | ;; Unfortunately some mistakes have been made in packaging. | |
599 | ;; Work around them here ... | |
600 | (replace 'unpack | |
601 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
602 | (let ((srcdir "teximpatient-2.4")) | |
603 | (system* "tar" "-xzf" (assoc-ref inputs "source") | |
604 | (string-append "--one-top-level=" srcdir)) | |
605 | (delete-file (string-append srcdir "/book.pdf")) | |
606 | (install-file (car | |
607 | (find-files | |
608 | (assoc-ref inputs "automake") | |
609 | "^install-sh$")) | |
610 | srcdir) | |
611 | (chdir srcdir))))))) | |
612 | (native-inputs | |
613 | `(("texlive" ,texlive) | |
614 | ("automake" ,automake))) | |
615 | (home-page "http://www.gnu.org/software/teximpatient") | |
616 | (synopsis "Book on TeX, plain TeX and Eplain") | |
617 | (description "@i{TeX for the Impatient} is a ~350 page book on TeX, | |
618 | plain TeX, and Eplain, originally written by Paul Abrahams, Kathryn Hargreaves, | |
619 | and Karl Berry.") | |
620 | (license license:fdl1.3+))) |