1import ./make-test-python.nix ({ pkgs, lib, ... }: {
2 name = "noto-fonts";
3 meta = {
4 maintainers = with lib.maintainers; [ nickcao midchildan ];
5 };
6
7 nodes.machine = {
8 imports = [ ./common/x11.nix ];
9 environment.systemPackages = [ pkgs.gnome.gedit ];
10 fonts = {
11 enableDefaultFonts = false;
12 fonts = with pkgs;[
13 noto-fonts
14 noto-fonts-cjk-sans
15 noto-fonts-cjk-serif
16 noto-fonts-emoji
17 ];
18 fontconfig.defaultFonts = {
19 serif = [ "Noto Serif" "Noto Serif CJK SC" ];
20 sansSerif = [ "Noto Sans" "Noto Sans CJK SC" ];
21 monospace = [ "Noto Sans Mono" "Noto Sans Mono CJK SC" ];
22 emoji = [ "Noto Color Emoji" ];
23 };
24 };
25 };
26
27 testScript =
28 # extracted from http://www.clagnut.com/blog/2380/
29 let testText = builtins.toFile "test.txt" ''
30 the quick brown fox jumps over the lazy dog
31 視野無限廣,窗外有藍天
32 Eĥoŝanĝo ĉiuĵaŭde.
33 いろはにほへと ちりぬるを わかよたれそ つねならむ うゐのおくやま けふこえて あさきゆめみし ゑひもせす
34 다람쥐 헌 쳇바퀴에 타고파
35 中国智造,慧及全球
36 ''; in
37 ''
38 machine.wait_for_x()
39 machine.succeed("gedit ${testText} >&2 &")
40 machine.wait_for_window(".* - gedit")
41 machine.sleep(10)
42 machine.screenshot("screen")
43 '';
44})