1{
2 lib,
3 fetchurl,
4 tex,
5 extraFonts,
6 chineseFonts,
7 japaneseFonts,
8 koreanFonts,
9}:
10rec {
11 extraFontsSrc = fetchurl {
12 url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-extra-fonts-1.0-noarch.tar.gz";
13 sha256 = "0hylgjmd95y9yahbblmawkkw0i71vb145xxv2xqrmff81301n6k7";
14 };
15
16 fullFontsSrc = fetchurl {
17 url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-windows-fonts-1.0-noarch.tar.gz";
18 sha256 = "1yxzjpqpm7kvx0ly5jmfpzlfhsh41b0ibn1v84qv6xy73r2vis2f";
19 };
20
21 chineseFontsSrc = fetchurl {
22 url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-chinese-fonts.tar.gz";
23 sha256 = "0yprqjsx5mfsaxr525mcm3xqwcadzxp14njm38ir1325baada2fp";
24 };
25
26 japaneseFontsSrc = fetchurl {
27 url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-japanese-fonts.tar.gz";
28 sha256 = "1dn6zvsa7gk59d61xicwpbapab3rm6kz48rp5w1bhmihxixw21jn";
29 };
30
31 koreanFontsSrc = fetchurl {
32 url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-korean-fonts.tar.gz";
33 sha256 = "07axg57mqm3jbnm4lawx0h3r2h56xv9acwzjppryfklw4c27f5hh";
34 };
35
36 postPatch =
37 (
38 if tex == null then
39 ''
40 gunzip < ${fullFontsSrc} | (cd TeXmacs && tar xvf -)
41 ''
42 else
43 lib.optionalString extraFonts ''
44 gunzip < ${extraFontsSrc} | (cd TeXmacs && tar xvf -)
45 ''
46 )
47 + (lib.optionalString chineseFonts ''
48 gunzip < ${chineseFontsSrc} | (cd TeXmacs && tar xvf -)
49 '')
50 + (lib.optionalString japaneseFonts ''
51 gunzip < ${japaneseFontsSrc} | (cd TeXmacs && tar xvf -)
52 '')
53 + (lib.optionalString koreanFonts ''
54 gunzip < ${koreanFontsSrc} | (cd TeXmacs && tar xvf -)
55 '');
56
57 meta = {
58 description = "WYSIWYW editing platform with special features for scientists";
59 longDescription = ''
60 GNU TeXmacs is a free wysiwyw (what you see is what you want)
61 editing platform with special features for scientists. The software
62 aims to provide a unified and user friendly framework for editing
63 structured documents with different types of content (text,
64 graphics, mathematics, interactive content, etc.). The rendering
65 engine uses high-quality typesetting algorithms so as to produce
66 professionally looking documents, which can either be printed out or
67 presented from a laptop.
68
69 The software includes a text editor with support for mathematical
70 formulas, a small technical picture editor and a tool for making
71 presentations from a laptop. Moreover, TeXmacs can be used as an
72 interface for many external systems for computer algebra, numerical
73 analysis, statistics, etc. New presentation styles can be written
74 by the user and new features can be added to the editor using the
75 Scheme extension language. A native spreadsheet and tools for
76 collaborative authoring are planned for later.
77 '';
78 homepage = "http://texmacs.org/";
79 license = lib.licenses.gpl2Plus;
80 };
81}