1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00
nixpkgs/pkgs/development/libraries/fontconfig/make-fonts-conf.nix

17 lines
603 B
Nix

{ runCommand, libxslt, fontconfig, fontbhttf, fontDirectories }:
runCommand "fonts.conf"
{
buildInputs = [ libxslt fontconfig ];
# Add a default font for non-nixos systems. fontbhttf is only about 1mb.
fontDirectories = fontDirectories ++ [ fontbhttf ];
}
''
xsltproc --stringparam fontDirectories "$fontDirectories" \
--stringparam fontconfig "${fontconfig}" \
--stringparam fontconfigConfigVersion "${fontconfig.configVersion}" \
--path ${fontconfig}/share/xml/fontconfig \
${./make-fonts-conf.xsl} ${fontconfig}/etc/fonts/fonts.conf \
> $out
''