mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-07 11:05:30 +03:00
NixOS Test driver: Display Qemu windows on macOS in interactive mode
This commit is contained in:
parent
01fd8b0355
commit
482beabbbd
1 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
import base64
|
||||
import io
|
||||
import os
|
||||
import platform
|
||||
import queue
|
||||
import re
|
||||
import select
|
||||
|
@ -199,7 +200,13 @@ class StartCommand:
|
|||
allow_reboot: bool = False,
|
||||
) -> str:
|
||||
display_opts = ""
|
||||
|
||||
display_available = any(x in os.environ for x in ["DISPLAY", "WAYLAND_DISPLAY"])
|
||||
if platform.system() == "Darwin":
|
||||
# We have no DISPLAY variables on macOS and seemingly no better way
|
||||
# to find out
|
||||
display_available = "TERM_PROGRAM" in os.environ
|
||||
|
||||
if not display_available:
|
||||
display_opts += " -nographic"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue