forked from mirrors/nixpkgs
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
14 lines
348 B
Nix
14 lines
348 B
Nix
{runCommand, libxslt, fontconfig, fontDirectories}:
|
|
|
|
runCommand "fonts.conf"
|
|
{
|
|
buildInputs = [libxslt];
|
|
inherit fontDirectories;
|
|
}
|
|
''
|
|
xsltproc --stringparam fontDirectories "$fontDirectories" \
|
|
--stringparam fontconfig "${fontconfig}" \
|
|
${./make-fonts-conf.xsl} ${fontconfig}/etc/fonts/fonts.conf \
|
|
> $out
|
|
''
|