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.

+5
+5
pkgs/by-name/li/libtas/package.nix
··· 14 file, 15 binutils, 16 makeDesktopItem, 17 }: 18 19 stdenv.mkDerivation (finalAttrs: { ··· 73 ffmpeg.lib 74 ] 75 } \ 76 --set-default LIBTAS_SO_PATH $out/lib/libtas.so 77 ''; 78
··· 14 file, 15 binutils, 16 makeDesktopItem, 17 + 18 + # Forces libTAS to run in X11. 19 + # Enabled by default because libTAS does not support Wayland. 20 + withForceX11 ? true, 21 }: 22 23 stdenv.mkDerivation (finalAttrs: { ··· 77 ffmpeg.lib 78 ] 79 } \ 80 + ${lib.optionalString withForceX11 "--set QT_QPA_PLATFORM xcb"} \ 81 --set-default LIBTAS_SO_PATH $out/lib/libtas.so 82 ''; 83