From b747aa0f9fd6363975e90a82210275a12bfbb696 Mon Sep 17 00:00:00 2001 From: Yarny0 <41838844+Yarny0@users.noreply.github.com> Date: Sun, 14 Mar 2021 22:38:37 +0100 Subject: [PATCH] zoom-us: unset Qt env variables to fix dialog boxes Zoom wouldn't show the "Participants" dialog box when used in a plasma environment; precisely, the dialog box failed to show its content. The problem doesn't exist in other environments like Gnome or Xfce. Experiments have shown that clearing the environment variable `QML2_IMPORT_PATH` before calling Zoom fixes the issue. I suspect the reason to be as follows: While the zoom build recipe is called with `libsForQt5xx.callPackage`, putting `qttools.dev` in zoom's `PATH` is the only connection to nixpkgs' Qt ecosystem. Zoom brings its own Qt libraries. Hence it seems to be a good idea to shield zoom from access to nixpkgs' Qt files to avoid problems from version mismatch or similar troubles. So the commit at hand expands zoom's wrapper script to clear the Qt-related enviornemt variables `QML2_IMPORT_PATH` and `QT_PLUGIN_PATH`. Original issue report, with some discussion: https://github.com/NixOS/nixpkgs/issues/107495#issuecomment-764538071 --- .../networking/instant-messengers/zoom-us/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix index efb913fca730..53d21dc78d59 100644 --- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix +++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix @@ -101,8 +101,12 @@ in stdenv.mkDerivation rec { rm $out/bin/zoom # Zoom expects "zopen" executable (needed for web login) to be present in CWD. Or does it expect # everybody runs Zoom only after cd to Zoom package directory? Anyway, :facepalm: + # Also clear Qt environment variables to prevent + # zoom from tripping over "foreign" Qt ressources. makeWrapper $out/opt/zoom/ZoomLauncher $out/bin/zoom \ --run "cd $out/opt/zoom" \ + --unset QML2_IMPORT_PATH \ + --unset QT_PLUGIN_PATH \ --prefix PATH : ${lib.makeBinPath [ coreutils glib.dev pciutils procps qttools.dev util-linux ]} \ --prefix LD_LIBRARY_PATH ":" ${libs}