libtas: Add withForceX11 option

libTAS needs to be run under X11 to capture inputs. Since libTAS is a QT app, it can launch in Wayland though. Thus, add an override option (enabled by default) which passes a `QT_QPA_PLATFORM=xcb` environment variable to force QT to run on X11.
This commit is contained in:
Michaili K 2025-08-12 18:29:08 +02:00
parent 4c90a44832
commit e300b37aec
No known key found for this signature in database
GPG Key ID: 520B99D4DFEB8311

View File

@ -14,6 +14,10 @@
file,
binutils,
makeDesktopItem,
# Forces libTAS to run in X11.
# Enabled by default because libTAS does not support Wayland.
withForceX11 ? true,
}:
stdenv.mkDerivation (finalAttrs: {
@ -73,6 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
ffmpeg.lib
]
} \
${lib.optionalString withForceX11 "--set QT_QPA_PLATFORM xcb"} \
--set-default LIBTAS_SO_PATH $out/lib/libtas.so
'';