nixpkgs/pkgs/misc/tex/nix/default.nix

41 lines
691 B
Nix
Raw Normal View History

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;
};
}