jetbrains: add forceWayland flag

forceWayland makes the jetbrains IDEs to use WLToolkit if Wayland is
detected, allowing to use Wayland natively instead of using XWayland
This commit is contained in:
Alexandru Nechita
2025-07-12 16:28:58 +02:00
parent d8954dfb22
commit 60e667982d
@@ -37,6 +37,7 @@ in
libX11,
vmopts ? null,
forceWayland ? false,
}:
let
@@ -83,9 +84,13 @@ let
inherit
pname
jdk
extraWrapperArgs
extraBuildInputs
;
extraWrapperArgs =
extraWrapperArgs
++ lib.optionals (stdenv.hostPlatform.isLinux && forceWayland) [
''--add-flags "\''${WAYLAND_DISPLAY:+-Dawt.toolkit.name=WLToolkit}"''
];
extraLdPath = extraLdPath ++ lib.optionals (stdenv.hostPlatform.isLinux) [ libGL ];
src =
if fromSource then