1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

Merge pull request #665 from quentinmit/fonts

Make font handling match NixOS
This commit is contained in:
Emily 2023-07-20 05:02:34 +01:00 committed by GitHub
commit 531c3de7ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,13 +38,12 @@ in
config = {
system.build.fonts = pkgs.runCommand "fonts"
{ paths = cfg.fonts; preferLocalBuild = true; }
{ preferLocalBuild = true; }
''
mkdir -p $out/Library/Fonts
for path in $paths; do
find -L $path/share/fonts -type f -print0 | while IFS= read -rd "" f; do
ln -sf "$f" $out/Library/Fonts
done
font_regexp='.*\.\(ttf\|ttc\|otf\)'
find -L ${toString cfg.fonts} -regex "$font_regexp" -type f -print0 | while IFS= read -rd "" f; do
ln -sf "$f" $out/Library/Fonts
done
'';