diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 71eaaa2e9ba2..ba84e12d14b3 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -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