1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-06 16:57:08 +00:00
nix-darwin/tests/fonts.nix

25 lines
564 B
Nix
Raw Normal View History

2018-09-30 19:42:00 +02:00
{ config, pkgs, ... }:
let
font = pkgs.runCommand "font-0.0.0" {} ''
mkdir -p $out/share/fonts
touch $out/share/fonts/Font.ttf
'';
in
{
fonts.enableFontDir = true;
fonts.fonts = [ font ];
2018-09-30 19:42:00 +02:00
test = ''
echo "checking fonts in /Library/Fonts" >&2
test -e ${config.out}/Library/Fonts/Font.ttf
echo "checking activation of fonts in /activate" >&2
grep "fontrestore default -n 2>&1" ${config.out}/activate
grep 'ln -fn ".*" /Library/Fonts' ${config.out}/activate
grep 'rm "/Library/Fonts/.*"' ${config.out}/activate
2018-09-30 19:42:00 +02:00
'';
}