Add fallback to our mesa package for non-NixOS hosts

This commit is contained in:
Val Packett 2025-11-27 21:59:05 -03:00
parent c164db06c1
commit 59137223a9
3 changed files with 12 additions and 2 deletions

9
munix
View file

@ -15,6 +15,10 @@ PIPEWIRE=1
X11=0
export TMP=/tmp TMPDIR=/tmp TEMP=/tmp TEMPDIR=/tmp LC_ALL=C
if [ ! -e "$HOST_OPENGL_DRIVER" ]; then
HOST_OPENGL_DRIVER="$FALLBACK_OPENGL_DRIVER"
fi
while [ "$#" -gt 0 ]; do
case "$1" in
-u|--uid) MICROVM_UID="$2"; shift 2;;
@ -58,6 +62,11 @@ if [ "$PASST_PATH" = "" ]; then
exit 1
fi
if [ ! -e "$HOST_OPENGL_DRIVER" ]; then
echo "munix: host graphics driver not found, provide a --host-opengl-driver" >&2
exit 1
fi
# Resolve symlinks automatically
MICROVM_CLOSURE=$(realpath "$MICROVM_CLOSURE")