nixpkgs/pkgs/misc/tex/nix/default.nix
Eelco Dolstra cf04579cc5 * Added pgf/tikz.
* runLaTeX: allow additional TeX packages to be specified.
* teTeX setup hook: TEXMFNIX doesn't seem to work, use TEXINPUTS.

svn path=/nixpkgs/trunk/; revision=8261
2007-03-10 23:51:59 +00:00

81 lines
1.4 KiB
Nix

pkgs:
rec {
runLaTeX =
{ rootFile
, generatePDF ? true
, extraFiles ? []
, compressBlanksInIndex ? true
, packages ? []
}:
pkgs.stdenv.mkDerivation {
name = "doc";
builder = ./run-latex.sh;
copyIncludes = ./copy-includes.pl;
inherit rootFile generatePDF extraFiles
compressBlanksInIndex;
includes = import (findLaTeXIncludes {inherit rootFile;});
buildInputs = [ pkgs.tetex pkgs.perl ] ++ packages;
};
findLaTeXIncludes =
{ rootFile
}:
pkgs.stdenv.mkDerivation {
name = "latex-includes";
realBuilder = pkgs.perl + "/bin/perl";
args = [ ./find-includes.pl ];
rootFile = toString rootFile; # !!! hacky
# Forces rebuilds.
hack = __currentTime;
};
dot2pdf =
{ dotGraph
}:
pkgs.stdenv.mkDerivation {
name = "pdf";
builder = ./dot2pdf.sh;
inherit dotGraph;
buildInputs = [
pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
];
};
dot2ps =
{ dotGraph
}:
pkgs.stdenv.mkDerivation {
name = "ps";
builder = ./dot2ps.sh;
inherit dotGraph;
buildInputs = [
pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
];
};
animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation {
name = "dot-frames";
builder = ./animatedot.sh;
inherit dotGraph nrFrames;
};
}