summaryrefslogtreecommitdiff
path: root/tests/fonts.nix
blob: d60979c57745212b6f954efbd2b317ad8ac3d32a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ config, pkgs, ... }:

let
  font = pkgs.runCommand "font-0.0.0" {} ''
    mkdir -p $out
    touch $out/Font.ttf
  '';
in

{
  fonts.packages = [ font ];

  test = ''
    echo "checking fonts in /Library/Fonts/Nix Fonts" >&2
    test -e "${config.out}/Library/Fonts/Nix Fonts"/*/Font.ttf

    echo "checking activation of fonts in /activate" >&2
    grep '/Library/Fonts/Nix Fonts' ${config.out}/activate
  '';
}