aboutsummaryrefslogtreecommitdiff
path: root/pkgs/tools/typesetting/tex/nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-12-03 17:36:38 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-12-03 17:40:27 +0100
commitec795d363263a4d78b16c57838e17859bf9e676e (patch)
tree73c717f5d5a7041415beb545e08d355e03298689 /pkgs/tools/typesetting/tex/nix
parent33044458eb0ab9e66ce38f930cdf80e3c3f1f367 (diff)
texFunctions: Use modular texlive instead of tetex
Diffstat (limited to 'pkgs/tools/typesetting/tex/nix')
-rw-r--r--pkgs/tools/typesetting/tex/nix/default.nix35
1 files changed, 20 insertions, 15 deletions
diff --git a/pkgs/tools/typesetting/tex/nix/default.nix b/pkgs/tools/typesetting/tex/nix/default.nix
index 223f72c67855..5cd5515400de 100644
--- a/pkgs/tools/typesetting/tex/nix/default.nix
+++ b/pkgs/tools/typesetting/tex/nix/default.nix
@@ -10,24 +10,29 @@ rec {
, extraFiles ? []
, compressBlanksInIndex ? true
, packages ? []
+ , texPackages ? {}
, copySources ? false
}:
assert generatePDF -> !generatePS;
-
+
+ let
+ tex = pkgs.texlive.combine texPackages;
+ in
+
pkgs.stdenv.mkDerivation {
name = "doc";
-
+
builder = ./run-latex.sh;
copyIncludes = ./copy-includes.pl;
-
+
inherit rootFile generatePDF generatePS extraFiles
compressBlanksInIndex copySources;
includes = map (x: [x.key (baseNameOf (toString x.key))])
(findLaTeXIncludes {inherit rootFile;});
-
- buildInputs = [ pkgs.tetex pkgs.perl ] ++ packages;
+
+ buildInputs = [ tex pkgs.perl ] ++ packages;
};
@@ -41,7 +46,7 @@ rec {
builtins.genericClosure {
startSet = [{key = rootFile;}];
-
+
operator =
{key, ...}:
@@ -72,7 +77,7 @@ rec {
in pkgs.lib.fold foundDeps [] deps;
};
-
+
findLhs2TeXIncludes =
{ rootFile
@@ -80,7 +85,7 @@ rec {
builtins.genericClosure {
startSet = [{key = rootFile;}];
-
+
operator =
{key, ...}:
@@ -103,10 +108,10 @@ rec {
builder = ./dot2pdf.sh;
inherit dotGraph fontsConf;
buildInputs = [
- pkgs.perl pkgs.tetex pkgs.graphviz
+ pkgs.perl pkgs.graphviz
];
};
-
+
dot2ps =
{ dotGraph
@@ -117,7 +122,7 @@ rec {
builder = ./dot2ps.sh;
inherit dotGraph;
buildInputs = [
- pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
+ pkgs.perl pkgs.graphviz pkgs.ghostscript
];
};
@@ -132,7 +137,7 @@ rec {
includes = map (x: [x.key (baseNameOf (toString x.key))])
(findLhs2TeXIncludes {rootFile = source;});
};
-
+
animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation {
name = "dot-frames";
builder = ./animatedot.sh;
@@ -163,7 +168,7 @@ rec {
# Convert a Postscript file to a PNG image, trimming it so that
- # there is no unnecessary surrounding whitespace.
+ # there is no unnecessary surrounding whitespace.
postscriptToPNG =
{ postscript
}:
@@ -173,7 +178,7 @@ rec {
inherit postscript;
buildInputs = [pkgs.imagemagick pkgs.ghostscript];
-
+
buildCommand = ''
if test -d $postscript; then
input=$(ls $postscript/*.ps)
@@ -240,5 +245,5 @@ rec {
"${pkgs.ghostscript}/share/ghostscript/fonts"
];
};
-
+
}