-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make font handling match NixOS #665
Conversation
…tf files in any directory in the passed packages
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This prevents non-fonts from being iterated-over in the activationScripts, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable. The NixOS behaviour includes other font types, but I don't think macOS supports any of them.
Can you rebase this against latest |
Apologies for the delay, I just saw this comment. I've merged in the current |
Thanks! |
Ensure that LnL7#665 works correctly.
Ensure that LnL7#665 works correctly.
Ensure that LnL7#665 works correctly.
Ensure that LnL7#665 works correctly.
Previously, nix-darwin would look in the
share/fonts
directory in each of the packages mentioned in thefonts.fonts
option. Not all fonts packaged in nixpkgs place their fonts in this directory. It looks like this logic recently changed to just link every file in every package, whether it's a font or not. This PR changes the handling offonts.fonts
to match NixOS's behavior, which is to usefind
to find all .ttf, .ttc, and .otf files in any of the passed-in paths. This allows usingfonts.fonts
with more font packages.