nixpkgs/nixos/tests/fontconfig-default-fonts.nix
Vladimír Čunát 9f054b5e1a
treewide: remove worldofpeace from meta.maintainers
(It was requested by them.)
I left one case due to fetching from their personal repo:
pkgs/desktops/pantheon/desktop/extra-elementary-contracts/default.nix
2021-05-07 15:36:40 +02:00

33 lines
887 B
Nix

import ./make-test-python.nix ({ lib, ... }:
{
name = "fontconfig-default-fonts";
meta.maintainers = with lib.maintainers; [
jtojnar
];
machine = { config, pkgs, ... }: {
fonts.enableDefaultFonts = true; # Background fonts
fonts.fonts = with pkgs; [
noto-fonts-emoji
cantarell-fonts
twitter-color-emoji
source-code-pro
gentium
];
fonts.fontconfig.defaultFonts = {
serif = [ "Gentium Plus" ];
sansSerif = [ "Cantarell" ];
monospace = [ "Source Code Pro" ];
emoji = [ "Twitter Color Emoji" ];
};
};
testScript = ''
machine.succeed("fc-match serif | grep '\"Gentium Plus\"'")
machine.succeed("fc-match sans-serif | grep '\"Cantarell\"'")
machine.succeed("fc-match monospace | grep '\"Source Code Pro\"'")
machine.succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'")
'';
})