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