6ce80304a5
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
38 lines
637 B
Nix
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
|
|
};
|
|
|
|
} |