nix-darwin
nix-darwin copied to clipboard
`fonts` module currently broken on macOS Ventura
The issue is related to this line: https://github.com/LnL7/nix-darwin/blob/54a24f042f93c79f5679f133faddedec61955cf2/modules/fonts/default.nix#L61
At the moment fontrestore
is killed (SIGKILL) immediately after being launched.
I've filed a report with Apple about this using Feedback Assistant. Hopefully this is addressed before launch, otherwise we'll need to refactor the fonts
module to not use fontrestore
.
Issue is currently present in public beta 2.
Issue is currently present in public beta 7.
Confirmed that this issue has been fixed on public beta 8
Issue is currently present in public beta 8.

I was able to build perfectly fine. Strange.
I'm also seeing failures on Ventura Beta 8
...
user defaults...
setting up user launchd services...
setting up ~/Applications...
setting up pam...
applying patches...
setting up /etc...
system defaults...
setting up launchd services...
reloading nix-daemon...
waiting for nix-daemon
configuring networking...
configuring fonts...
/nix/store/7m2dl2h3ilikjlcws7fwg3z1byhg5nqc-darwin-system-22.11pre400298.bc4b4a50c7a+darwin4.0000000/activate: line 226: 34135 Killed: 9 fontrestore default -n 2>&1
34136 Done | while read -r f; do
case $f in
/Library/Fonts/*)
font=${f##*/}; if [ ! -e "$systemConfig/Library/Fonts/$font" ]; then
echo "removing font $font..." 1>&2; rm "/Library/Fonts/$font";
fi
;;
/*)
;;
esac;
done
[137] cbzehner@Chriss-MBP> fontrestore --help ~/Projects
zsh: killed fontrestore --help
Still seeing this on the latest beta of macOS Ventura (build 22A5358e). From looking at the crash report it seems like a code sign issue maybe?
On my machine /usr/bin/fontrestore
is a symlink to /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Support/fontmover
. The same Support
folder also contains fontd
and fontworker
as executables, both of which crash when run as well.
Crash report summary from Console.app
for fontrestore
:
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: AF91FC0A-35B4-4E0C-B927-721321CA5FC0
CrashReporter Key: D78E9276-041C-774C-35F4-023DF5350DEB
Hardware Model: MacBookPro18,3
Process: fontmover [5270]
Path: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Support/fontmover
Identifier: fontmover
Version: ???
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: bash [5147]
Coalition: com.apple.Terminal [574]
Responsible Process: Terminal [569]
Date/Time: 2022-10-03 00:10:57.1702 +0100
Launch Time: 2022-10-03 00:10:57.1648 +0100
OS Version: macOS 13.0 (22A5358e)
Release Type: User
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL (Code Signature Invalid))
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: CODESIGNING 4 Launch Constraint Violation
Highlighted by Thread: 0
Backtrace not available
No thread state (register information) available
Binary Images:
Binary images description not available
Error Formulating Crash Report:
_dyld_process_info_create failed with 30
dyld_process_snapshot_get_shared_cache failed
Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯
thread_get_state(PAGEIN) returned 0x10000003: (ipc/send) invalid destination port
thread_get_state(EXCEPTION) returned 0x10000003: (ipc/send) invalid destination port
thread_get_state(FLAVOR) returned 0x10000003: (ipc/send) invalid destination port
EOF
This happens on current release Ventura build (22A380) as well. Essentially same crash report as above.
Same issue here. Wonder if this has to do with the new AMFI Launch Constraints introduced in Ventura: https://theevilbit.github.io/posts/amfi_launch_constraints/
From dmesg when running fontrestore default -n
:
AMFI: Launch Constraint Violation (enforcing), error info: c[1]p[1]m[1]e[1], (Constraint not matched) launching proc[vc: 1 pid: 6667]: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Support/fontmover, launch type 0, failure proc [vc: 1 pid: 6667]: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Support/fontmover
Might be also helpful - in feedback app under Ventura notes:
It doesn't look like fontrestore default -n
is doing anything on Monterey. I'd expect this block to delete anything that's not installed by default, but it doesn't delete anything.
Right now, deleting that block would keep the current functionality, and nobody would need to solve the AMFI issue. Fonts won't be deleted when removed from darwin-configuration.nix
, but that's already happening in Monterey.
Resolved by #560.