at 23.11-beta 794 B view raw
1import ./make-test-python.nix ({ pkgs, lib, ... }: { 2 name = "noto-fonts-cjk-qt"; 3 meta.maintainers = with lib.maintainers; [ oxalica ]; 4 5 nodes.machine = { 6 imports = [ ./common/x11.nix ]; 7 fonts = { 8 enableDefaultPackages = false; 9 fonts = [ pkgs.noto-fonts-cjk-sans ]; 10 }; 11 }; 12 13 testScript = 14 let 15 script = pkgs.writers.writePython3 "qt-default-weight" { 16 libraries = [ pkgs.python3Packages.pyqt6 ]; 17 } '' 18 from PyQt6.QtWidgets import QApplication 19 from PyQt6.QtGui import QFont, QRawFont 20 21 app = QApplication([]) 22 f = QRawFont.fromFont(QFont("Noto Sans CJK SC", 20)) 23 24 assert f.styleName() == "Regular", f.styleName() 25 ''; 26 in '' 27 machine.wait_for_x() 28 machine.succeed("${script}") 29 ''; 30})