mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
d051b20a39
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
21 lines
418 B
Bash
21 lines
418 B
Bash
source $stdenv/setup
|
|
|
|
ensureDir $out
|
|
|
|
dot2pdf() {
|
|
sourceFile=$1
|
|
targetName=$out/$(basename $(stripHash $sourceFile; echo $strippedName) .dot).pdf
|
|
echo "converting $sourceFile to $targetName..."
|
|
export FONTCONFIG_FILE=$fontsConf
|
|
dot -Tpdf $sourceFile > $targetName
|
|
}
|
|
|
|
for i in $dotGraph; do
|
|
if test -d $i; then
|
|
for j in $i/*; do dot2pdf $j; done
|
|
else
|
|
dot2pdf $i
|
|
fi
|
|
done
|
|
|