tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
texFunctions: Use modular texlive instead of tetex
Eelco Dolstra
10 years ago
ec795d36
33044458
+20
-15
1 changed file
expand all
collapse all
unified
split
pkgs
tools
typesetting
tex
nix
default.nix
+20
-15
pkgs/tools/typesetting/tex/nix/default.nix
···
10
10
, extraFiles ? []
11
11
, compressBlanksInIndex ? true
12
12
, packages ? []
13
13
+
, texPackages ? {}
13
14
, copySources ? false
14
15
}:
15
16
16
17
assert generatePDF -> !generatePS;
17
17
-
18
18
+
19
19
+
let
20
20
+
tex = pkgs.texlive.combine texPackages;
21
21
+
in
22
22
+
18
23
pkgs.stdenv.mkDerivation {
19
24
name = "doc";
20
20
-
25
25
+
21
26
builder = ./run-latex.sh;
22
27
copyIncludes = ./copy-includes.pl;
23
23
-
28
28
+
24
29
inherit rootFile generatePDF generatePS extraFiles
25
30
compressBlanksInIndex copySources;
26
31
27
32
includes = map (x: [x.key (baseNameOf (toString x.key))])
28
33
(findLaTeXIncludes {inherit rootFile;});
29
29
-
30
30
-
buildInputs = [ pkgs.tetex pkgs.perl ] ++ packages;
34
34
+
35
35
+
buildInputs = [ tex pkgs.perl ] ++ packages;
31
36
};
32
37
33
38
···
41
46
42
47
builtins.genericClosure {
43
48
startSet = [{key = rootFile;}];
44
44
-
49
49
+
45
50
operator =
46
51
{key, ...}:
47
52
···
72
77
73
78
in pkgs.lib.fold foundDeps [] deps;
74
79
};
75
75
-
80
80
+
76
81
77
82
findLhs2TeXIncludes =
78
83
{ rootFile
···
80
85
81
86
builtins.genericClosure {
82
87
startSet = [{key = rootFile;}];
83
83
-
88
88
+
84
89
operator =
85
90
{key, ...}:
86
91
···
103
108
builder = ./dot2pdf.sh;
104
109
inherit dotGraph fontsConf;
105
110
buildInputs = [
106
106
-
pkgs.perl pkgs.tetex pkgs.graphviz
111
111
+
pkgs.perl pkgs.graphviz
107
112
];
108
113
};
109
109
-
114
114
+
110
115
111
116
dot2ps =
112
117
{ dotGraph
···
117
122
builder = ./dot2ps.sh;
118
123
inherit dotGraph;
119
124
buildInputs = [
120
120
-
pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
125
125
+
pkgs.perl pkgs.graphviz pkgs.ghostscript
121
126
];
122
127
};
123
128
···
132
137
includes = map (x: [x.key (baseNameOf (toString x.key))])
133
138
(findLhs2TeXIncludes {rootFile = source;});
134
139
};
135
135
-
140
140
+
136
141
animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation {
137
142
name = "dot-frames";
138
143
builder = ./animatedot.sh;
···
163
168
164
169
165
170
# Convert a Postscript file to a PNG image, trimming it so that
166
166
-
# there is no unnecessary surrounding whitespace.
171
171
+
# there is no unnecessary surrounding whitespace.
167
172
postscriptToPNG =
168
173
{ postscript
169
174
}:
···
173
178
inherit postscript;
174
179
175
180
buildInputs = [pkgs.imagemagick pkgs.ghostscript];
176
176
-
181
181
+
177
182
buildCommand = ''
178
183
if test -d $postscript; then
179
184
input=$(ls $postscript/*.ps)
···
240
245
"${pkgs.ghostscript}/share/ghostscript/fonts"
241
246
];
242
247
};
243
243
-
248
248
+
244
249
}