* Graphviz updated to 2.20.2. Now built with fontconfig, gd and pango
support. * New function makeFontsConf to generate a fontconfig configuration file. Moved from NixOS. * dot2pdf: use makeFontsConf to generate a fonts.conf containing just the Ghostscript fonts (see NIXPKGS-29). * dot2pdf: generate PDF directly, don't go through PS. Note that this and using fontconfig changes the interpretation of "fontname" attributes in dot graphs. svn path=/nixpkgs/trunk/; revision=12251
This commit is contained in:
@@ -58,9 +58,9 @@ rec {
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "pdf";
|
||||
builder = ./dot2pdf.sh;
|
||||
inherit dotGraph;
|
||||
inherit dotGraph fontsConf;
|
||||
buildInputs = [
|
||||
pkgs.perl pkgs.tetex pkgs.graphviz pkgs.ghostscript
|
||||
pkgs.perl pkgs.tetex pkgs.graphviz
|
||||
];
|
||||
};
|
||||
|
||||
@@ -180,4 +180,13 @@ rec {
|
||||
};
|
||||
|
||||
|
||||
# Some tools (like dot) need a fontconfig configuration file.
|
||||
# This should be extended to allow the called to add additional
|
||||
# fonts.
|
||||
fontsConf = pkgs.makeFontsConf {
|
||||
fontDirectories = [
|
||||
"${pkgs.ghostscript}/share/ghostscript/fonts"
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ dot2pdf() {
|
||||
sourceFile=$1
|
||||
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).pdf
|
||||
echo "converting $sourceFile to $targetName..."
|
||||
dot -Tps $sourceFile > tmp.ps
|
||||
perl $(type -tp epstopdf) --outfile $targetName tmp.ps
|
||||
export FONTCONFIG_FILE=$fontsConf
|
||||
dot -Tpdf $sourceFile > $targetName
|
||||
}
|
||||
|
||||
for i in $dotGraph; do
|
||||
|
||||
Reference in New Issue
Block a user