nixpkgs/pkgs/misc/tex/nix/default.nix
Eelco Dolstra 6ce80304a5 * Handle subdirectories (e.g., \input{foo/bar.tex}). We don't yet
handle relative paths to parent directories (../foo/bar.tex).  This
  can be handled as was done in
  https://svn.cs.uu.nl:12443/repos/trace/nix/trunk/make/lib/compile-c.sh.
  The `copy-includes.pl' script is generic (not LaTeX specific), so it
  should eventually replace most of compile-c.sh and any future
  builders that have to set up a tree of symlinks to simulate the
  original directory hierarchy of the sources.

svn path=/nixpkgs/trunk/; revision=3220
2005-06-20 15:06:58 +00:00

38 lines
637 B
Nix

pkgs:
rec {
runLaTeX =
{ rootFile
, generatePDF ? true
}:
pkgs.stdenv.mkDerivation {
name = "doc";
builder = ./run-latex.sh;
copyIncludes = ./copy-includes.pl;
inherit rootFile generatePDF;
includes = import (findLaTeXIncludes {inherit rootFile;});
buildInputs = [ pkgs.tetex pkgs.perl ];
};
findLaTeXIncludes =
{ rootFile
}:
pkgs.stdenv.mkDerivation {
name = "latex-includes";
realBuilder = pkgs.perl ~ "bin/perl";
args = [ ./find-includes.pl ];
rootFile = toString rootFile; # !!! hacky
};
}