nixpkgs/pkgs/misc/tex/nix/default.nix
Eelco Dolstra fe0981babd * Scan for BibTeX files included by \bibliography.
* Automatically run BibTeX when necessary (i.e., when there are
  \citations in the aux file).

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

41 lines
691 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
# Forces rebuilds.
hack = __currentTime;
};
}