From e300b37aecd531173307a09787c33f416142fd56 Mon Sep 17 00:00:00 2001 From: Michaili K Date: Tue, 12 Aug 2025 18:29:08 +0200 Subject: [PATCH] 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. --- pkgs/by-name/li/libtas/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/li/libtas/package.nix b/pkgs/by-name/li/libtas/package.nix index 2394665fef29..18c8dfa25b23 100644 --- a/pkgs/by-name/li/libtas/package.nix +++ b/pkgs/by-name/li/libtas/package.nix @@ -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 '';