texFunctions: Use modular texlive instead of tetex
This commit is contained in:
parent
33044458eb
commit
ec795d3632
|
@ -10,24 +10,29 @@ rec {
|
|||
, extraFiles ? []
|
||||
, compressBlanksInIndex ? true
|
||||
, packages ? []
|
||||
, texPackages ? {}
|
||||
, copySources ? false
|
||||
}:
|
||||
|
||||
assert generatePDF -> !generatePS;
|
||||
|
||||
|
||||
let
|
||||
tex = pkgs.texlive.combine texPackages;
|
||||
in
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "doc";
|
||||
|
||||
|
||||
builder = ./run-latex.sh;
|
||||
copyIncludes = ./copy-includes.pl;
|
||||
|
||||
|
||||
inherit rootFile generatePDF generatePS extraFiles
|
||||
compressBlanksInIndex copySources;
|
||||
|
||||
includes = map (x: [x.key (baseNameOf (toString x.key))])
|
||||
(findLaTeXIncludes {inherit rootFile;});
|
||||
|
||||
buildInputs = [ pkgs.tetex pkgs.perl ] ++ packages;
|
||||
|
||||
buildInputs = [ tex pkgs.perl ] ++ packages;
|
||||
};
|
||||
|
||||
|
||||
|
@ -41,7 +46,7 @@ rec {
|
|||
|
||||
builtins.genericClosure {
|
||||
startSet = [{key = rootFile;}];
|
||||
|
||||
|
||||
operator =
|
||||
{key, ...}:
|
||||
|
||||
|
@ -72,7 +77,7 @@ rec {
|
|||
|
||||
in pkgs.lib.fold foundDeps [] deps;
|
||||
};
|
||||
|
||||
|
||||
|
||||
findLhs2TeXIncludes =
|
||||
{ rootFile
|
||||
|
@ -80,7 +85,7 @@ rec {
|
|||
|
||||
builtins.genericClosure {
|
||||
startSet = [{key = rootFile;}];
|
||||
|
||||
|
||||
operator =
|
||||
{key, ...}:
|
||||
|
||||
|
@ -103,10 +108,10 @@ rec {
|
|||
builder = ./dot2pdf.sh;
|
||||
inherit dotGraph fontsConf;
|
||||
buildInputs = [
|
||||
pkgs.perl pkgs.tetex pkgs.graphviz
|
||||
pkgs.perl pkgs.graphviz
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
dot2ps =
|
||||
{ dotGraph
|
||||
|
@ -117,7 +122,7 @@ rec {
|
|||
builder = ./dot2ps.sh;
|
||||
inherit dotGraph;
|
||||
buildInputs = [
|
||||
pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
|
||||
pkgs.perl pkgs.graphviz pkgs.ghostscript
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -132,7 +137,7 @@ rec {
|
|||
includes = map (x: [x.key (baseNameOf (toString x.key))])
|
||||
(findLhs2TeXIncludes {rootFile = source;});
|
||||
};
|
||||
|
||||
|
||||
animateDot = dotGraph: nrFrames: pkgs.stdenv.mkDerivation {
|
||||
name = "dot-frames";
|
||||
builder = ./animatedot.sh;
|
||||
|
@ -163,7 +168,7 @@ rec {
|
|||
|
||||
|
||||
# Convert a Postscript file to a PNG image, trimming it so that
|
||||
# there is no unnecessary surrounding whitespace.
|
||||
# there is no unnecessary surrounding whitespace.
|
||||
postscriptToPNG =
|
||||
{ postscript
|
||||
}:
|
||||
|
@ -173,7 +178,7 @@ rec {
|
|||
inherit postscript;
|
||||
|
||||
buildInputs = [pkgs.imagemagick pkgs.ghostscript];
|
||||
|
||||
|
||||
buildCommand = ''
|
||||
if test -d $postscript; then
|
||||
input=$(ls $postscript/*.ps)
|
||||
|
@ -240,5 +245,5 @@ rec {
|
|||
"${pkgs.ghostscript}/share/ghostscript/fonts"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue