Nix: Debugging MacOS / Darwin Sandbox Issues

Bottom Line: Filtering the macos logs for sandbox violations can help flesh out the root cause of sandbox-related crashes when building with nix. I recently started getting some unexpected build failures when trying to rebuild my nix-darwin system: $ nix build -v --print-build-logs github:nixos/nixpkgs/2bdc7039afa38f4330de69360a817e11f7e2f2c5#mpv-unwrapped ... mpv> buildPhase completed in 38…