python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / fontconfig / make-fonts-conf.xsl
blobed51b62a1d088867f36153a4c4a922e017bf5e54
1 <?xml version="1.0"?>
3 <!--
4 This script copies the original fonts.conf from the fontconfig
5 distribution, but replaces all <dir> entries with the directories
6 specified in the $fontDirectories parameter.
7 -->
9 <xsl:stylesheet version="1.0"
10 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11 xmlns:str="http://exslt.org/strings"
12 extension-element-prefixes="str"
15 <xsl:output method='xml' encoding="UTF-8" doctype-system="urn:fontconfig:fonts.dtd" />
17 <xsl:param name="fontDirectories" />
19 <xsl:template match="/fontconfig">
21 <fontconfig>
22 <xsl:apply-templates select="child::node()[name() != 'dir' and name() != 'cachedir' and name() != 'include']" />
24 <!-- the first cachedir will be used to store the cache -->
25 <cachedir prefix="xdg">fontconfig</cachedir>
26 <!-- /var/cache/fontconfig is useful for non-nixos systems -->
27 <cachedir>/var/cache/fontconfig</cachedir>
29 <!-- system-wide config -->
30 <include ignore_missing="yes">/etc/fonts/conf.d</include>
32 <dir prefix="xdg">fonts</dir>
33 <xsl:for-each select="str:tokenize($fontDirectories)">
34 <dir><xsl:value-of select="." /></dir>
35 <xsl:text>&#0010;</xsl:text>
36 </xsl:for-each>
38 <!-- nix user profile -->
39 <dir>~/.nix-profile/lib/X11/fonts</dir>
40 <dir>~/.nix-profile/share/fonts</dir>
42 <!-- FHS paths for non-NixOS platforms -->
43 <dir>/usr/share/fonts</dir>
44 <dir>/usr/local/share/fonts</dir>
46 <!-- nix default profile -->
47 <dir>/nix/var/nix/profiles/default/lib/X11/fonts</dir>
48 <dir>/nix/var/nix/profiles/default/share/fonts</dir>
50 </fontconfig>
52 </xsl:template>
55 <!-- New fontconfig >=2.11 doesn't like xml:space added by xsl:copy-of -->
56 <xsl:template match="node()|@*">
57 <xsl:copy>
58 <xsl:apply-templates select="node()|@*[name() != 'xml:space']"/>
59 </xsl:copy>
60 </xsl:template>
62 </xsl:stylesheet>