1import ./make-test-python.nix (
2 { lib, ... }:
3 {
4 name = "fontconfig-default-fonts";
5
6 meta.maintainers = with lib.maintainers; [
7 jtojnar
8 ];
9
10 nodes.machine =
11 { config, pkgs, ... }:
12 {
13 fonts.enableDefaultPackages = true; # Background fonts
14 fonts.packages = with pkgs; [
15 noto-fonts-color-emoji
16 cantarell-fonts
17 twitter-color-emoji
18 source-code-pro
19 gentium
20 ];
21 fonts.fontconfig.defaultFonts = {
22 serif = [ "Gentium Plus" ];
23 sansSerif = [ "Cantarell" ];
24 monospace = [ "Source Code Pro" ];
25 emoji = [ "Twitter Color Emoji" ];
26 };
27 };
28
29 testScript = ''
30 machine.succeed("fc-match serif | grep '\"Gentium Plus\"'")
31 machine.succeed("fc-match sans-serif | grep '\"Cantarell\"'")
32 machine.succeed("fc-match monospace | grep '\"Source Code Pro\"'")
33 machine.succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'")
34 '';
35 }
36)