2023-05-24 13:37:59 +00:00
|
|
|
{ runCommand, stdenv, lib, libxslt, fontconfig, dejavu_fonts, fontDirectories }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runCommand "fonts.conf"
|
|
|
|
{
|
|
|
|
nativeBuildInputs = [ libxslt ];
|
|
|
|
buildInputs = [ fontconfig ];
|
|
|
|
# Add a default font for non-nixos systems, <1MB and in nixos defaults.
|
2023-05-24 13:37:59 +00:00
|
|
|
fontDirectories = fontDirectories ++ [ dejavu_fonts.minimal ]
|
|
|
|
# further non-nixos fonts on darwin
|
|
|
|
++ lib.optionals stdenv.isDarwin [ "/System/Library/Fonts" "/Library/Fonts" "~/Library/Fonts" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|
|
|
|
''
|
|
|
|
xsltproc --stringparam fontDirectories "$fontDirectories" \
|
|
|
|
--path ${fontconfig.out}/share/xml/fontconfig \
|
|
|
|
${./make-fonts-conf.xsl} ${fontconfig.out}/etc/fonts/fonts.conf \
|
|
|
|
> $out
|
|
|
|
''
|