forked from mirrors/nixpkgs
* Include the conf.d directory shipped in the fontconfig distribution.
* Don't use $fontconfig/var/cache/fontconfig as a cache (when running as root), instead use /var/cache/fontconfig. svn path=/nixos/trunk/; revision=9411
This commit is contained in:
parent
5c08d306e5
commit
073c0fec9f
|
@ -125,6 +125,7 @@ import ../helpers/make-etc.nix {
|
|||
inherit (pkgs) fontconfig;
|
||||
}
|
||||
"xsltproc --stringparam fontDirectories \"$fontDirectories\" \\
|
||||
--stringparam fontconfig \"$fontconfig\" \\
|
||||
${./fonts/make-fonts-conf.xsl} $fontconfig/etc/fonts/fonts.conf \\
|
||||
> $out
|
||||
";
|
||||
|
|
|
@ -15,12 +15,19 @@
|
|||
<xsl:output method='xml' encoding="UTF-8" doctype-system="fonts.dtd" />
|
||||
|
||||
<xsl:param name="fontDirectories" />
|
||||
<xsl:param name="fontconfig" />
|
||||
|
||||
<xsl:template match="/fontconfig">
|
||||
|
||||
<fontconfig>
|
||||
<xsl:copy-of select="child::node()[name() != 'dir']" />
|
||||
<xsl:copy-of select="child::node()[name() != 'dir' and name() != 'cachedir' and name() != 'include']" />
|
||||
|
||||
<include xml:space="preserve"><xsl:value-of select="$fontconfig" />/etc/fonts/conf.d</include>
|
||||
<include ignore_missing="yes" xml:space="preserve">/etc/fonts/conf.d</include>
|
||||
|
||||
<cachedir xml:space="preserve">/var/cache/fontconfig</cachedir>
|
||||
<cachedir xml:space="preserve">~/.fontconfig</cachedir>
|
||||
|
||||
<xsl:for-each select="str:tokenize($fontDirectories)">
|
||||
<dir><xsl:value-of select="." /></dir>
|
||||
<xsl:text>
</xsl:text>
|
||||
|
@ -30,4 +37,4 @@
|
|||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
</xsl:stylesheet>
|
||||
|
|
Loading…
Reference in a new issue