mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
Match nixos handling of fonts.fonts by looking for .ttf, .ttc, and .otf files in any directory in the passed packages
This commit is contained in:
parent
dfbdabbb3e
commit
bc776e4940
1 changed files with 4 additions and 5 deletions
|
@ -33,13 +33,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
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue