From 60e60c3ff71c8fdf9326a005d3b5df31bbf062f0 Mon Sep 17 00:00:00 2001 From: rewine Date: Wed, 14 May 2025 09:56:27 +0800 Subject: [PATCH] vivaldi: fix could not find the Qt platform plugin xcb/wayland Qt applications should use wrapQtAppsHook to set the QT_PLUGIN_PATH environment variable and should not rely on the system-installed qt qpa. Since it is used together with makeWrapper, dontWrapQtApps is still set to false, I add the qtWrapperArgs parameter to wrapProgram. Under wayland, Vivaldi is started by xwayland by default. If you set `Preferred Ozone platform` to wayland, it will look for the qtwayland qpa --- pkgs/applications/networking/browsers/vivaldi/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index ecefca97eb3a..099fe0a59cdc 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -98,6 +98,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ patchelf makeWrapper + qt5.wrapQtAppsHook ]; dontWrapQtApps = true; @@ -137,6 +138,7 @@ stdenv.mkDerivation rec { systemd libva qt5.qtbase + qt5.qtwayland freetype fontconfig libXrender @@ -219,6 +221,7 @@ stdenv.mkDerivation rec { --set-default FONTCONFIG_PATH "${fontconfig.out}/etc/fonts" \ --suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \ --prefix PATH : ${coreutils}/bin \ + ''${qtWrapperArgs[@]} \ ${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"} '' + lib.optionalString enableWidevine ''