2014-04-29 12:25:29 +02:00
|
|
|
{ runCommand, libxslt, fontconfig, fontDirectories }:
|
2008-07-03 16:27:19 +02:00
|
|
|
|
|
|
|
runCommand "fonts.conf"
|
2014-04-29 12:25:29 +02:00
|
|
|
{
|
|
|
|
buildInputs = [ libxslt fontconfig ];
|
2008-07-03 16:27:19 +02:00
|
|
|
inherit fontDirectories;
|
|
|
|
}
|
|
|
|
''
|
2014-08-10 11:47:07 +02:00
|
|
|
for fd in $fontDirectories;
|
|
|
|
do
|
|
|
|
if [ ! -d "$fd/share/fonts" ]; then
|
|
|
|
echo "ERROR: '$fd/share/fonts/' doesn't exist"
|
|
|
|
false
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2008-07-03 16:27:19 +02:00
|
|
|
xsltproc --stringparam fontDirectories "$fontDirectories" \
|
|
|
|
--stringparam fontconfig "${fontconfig}" \
|
2014-04-29 12:25:29 +02:00
|
|
|
--path ${fontconfig}/share/xml/fontconfig \
|
2008-07-03 16:27:19 +02:00
|
|
|
${./make-fonts-conf.xsl} ${fontconfig}/etc/fonts/fonts.conf \
|
|
|
|
> $out
|
|
|
|
''
|