1 { runCommand, stdenv, lib, libxslt, fontconfig, dejavu_fonts, fontDirectories }:
3 runCommand "fonts.conf"
5 nativeBuildInputs = [ libxslt ];
6 buildInputs = [ fontconfig ];
7 # Add a default font for non-nixos systems, <1MB and in nixos defaults.
8 fontDirectories = fontDirectories ++ [ dejavu_fonts.minimal ]
9 # further non-nixos fonts on darwin
10 ++ lib.optionals stdenv.isDarwin [ "/System/Library/Fonts" "/Library/Fonts" "~/Library/Fonts" ];
13 xsltproc --stringparam fontDirectories "$fontDirectories" \
14 --path ${fontconfig.out}/share/xml/fontconfig \
15 ${./make-fonts-conf.xsl} ${fontconfig.out}/etc/fonts/fonts.conf \