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