2018-09-30 19:42:00 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2018-10-12 22:02:56 +02:00
|
|
|
font = pkgs.runCommand "font-0.0.0" {} ''
|
|
|
|
mkdir -p $out/share/fonts
|
|
|
|
touch $out/share/fonts/Font.ttf
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
2022-09-15 20:26:54 +02:00
|
|
|
fonts.fontDir.enable = true;
|
2018-10-12 22:02:56 +02:00
|
|
|
fonts.fonts = [ font ];
|
2022-09-15 20:26:54 +02:00
|
|
|
|
2018-09-30 19:42:00 +02:00
|
|
|
test = ''
|
2019-02-17 11:21:12 +01:00
|
|
|
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
|
2019-12-22 22:31:34 +01:00
|
|
|
grep 'ln -fn ".*" /Library/Fonts' ${config.out}/activate || grep 'rsync -az --inplace ".*" /Library/Fonts' ${config.out}/activate
|
2019-02-17 11:21:12 +01:00
|
|
|
grep 'rm "/Library/Fonts/.*"' ${config.out}/activate
|
2018-09-30 19:42:00 +02:00
|
|
|
'';
|
|
|
|
}
|