Unverified Commit e300b37a authored by Michaili K's avatar Michaili K
Browse files

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.
parent 4c90a448
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
  '';