Failure when cooking on headless Mac

Even if I pass -nullrhi to RunUAT.sh (BuildCookRun, etc.) when the cook step is performed, the build machine will complain about not finding a window server. I’ve noticed that the -nullrhi option is not passed down to the cooker, but -buildmachine is.

UE4Editor: _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

The solution so far is to run my build agent from a window session over remote desktop, but obviously it would simplify things a lot if I could just run the build as a LaunchDaemon.

I’m using a locally built 4.7.6 editor, running Mac OS X 10.10 with TeamCity 9.0.4.