summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2018-07-14 20:31:23 +0000
committerGitHub <noreply@github.com>2018-07-14 20:31:23 +0000
commitbc48770871d253d59a0718cfbfd2b49bead6fb77 (patch)
tree3cc8bc63cd9b2060477ac157974f4168ef56f169 /pkgs/applications/networking/instant-messengers
parent1727513d4dfa49e6c7ba36bd5c592c7979d3904e (diff)
parent5dc1d746cf4b09a61f3364b2eb25b5eb11aa57a9 (diff)
downloadnixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.tar
nixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.tar.gz
nixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.tar.bz2
nixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.tar.lz
nixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.tar.xz
nixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.tar.zst
nixlib-bc48770871d253d59a0718cfbfd2b49bead6fb77.zip
Merge pull request #43426 from tadfisher/zoom-us
zoom-us: fix runtime qt environment
Diffstat (limited to 'pkgs/applications/networking/instant-messengers')
-rw-r--r--pkgs/applications/networking/instant-messengers/zoom-us/default.nix31
1 files changed, 18 insertions, 13 deletions
diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
index dc2bb4ba1e12..196cbb70b4e1 100644
--- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
+++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
@@ -1,16 +1,18 @@
-{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook
+{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook, env
 # Dynamic libraries
 , dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative
-, qtlocation, qtquickcontrols2, qtscript, qtwebchannel, qtwebengine
+, qtimageformats, qtlocation, qtquickcontrols, qtquickcontrols2, qtscript, qtsvg
+, qttools, qtwayland, qtwebchannel, qtwebengine
 # Runtime
-, libjpeg_turbo, pciutils, procps, qtimageformats
+, coreutils, libjpeg_turbo, pciutils, procps, utillinux
 , pulseaudioSupport ? true, libpulseaudio ? null
 }:
 
 assert pulseaudioSupport -> libpulseaudio != null;
 
 let
-  inherit (stdenv.lib) concatStringsSep makeBinPath optional optionalString;
+  inherit (stdenv.lib) concatStringsSep makeBinPath makeLibraryPath
+    makeSearchPath optional optionalString;
 
   version = "2.2.128200.0702";
   srcs = {
@@ -20,6 +22,13 @@ let
     };
   };
 
+  qtDeps = [
+    qtbase qtdeclarative qtlocation qtquickcontrols qtquickcontrols2 qtscript
+    qtwebchannel qtwebengine qtimageformats qtsvg qttools qtwayland
+  ];
+
+  qtEnv = env "zoom-us-qt-${qtbase.version}" qtDeps;
+
 in stdenv.mkDerivation {
   name = "zoom-us-${version}";
 
@@ -28,10 +37,8 @@ in stdenv.mkDerivation {
   nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
 
   buildInputs = [
-    dbus glib libGL libX11 libXfixes libuuid libxcb qtbase qtdeclarative
-    qtlocation qtquickcontrols2 qtscript qtwebchannel qtwebengine
-    libjpeg_turbo
-  ];
+    dbus glib libGL libX11 libXfixes libuuid libxcb qtEnv libjpeg_turbo
+  ] ++ qtDeps;
 
   runtimeDependencies = optional pulseaudioSupport libpulseaudio;
 
@@ -46,7 +53,6 @@ in stdenv.mkDerivation {
         "ZXMPPROOT.cer"
         "ZoomLauncher"
         "config-dump.sh"
-        "qtdiag"
         "timezones"
         "translations"
         "version.txt"
@@ -67,11 +73,10 @@ in stdenv.mkDerivation {
       # TODO Patch this somehow; tries to dlopen './libturbojpeg.so' from cwd
       ln -s $(readlink -e "${libjpeg_turbo.out}/lib/libturbojpeg.so") $packagePath/libturbojpeg.so
 
+      ln -s ${qtEnv}/bin/qt.conf $packagePath
+
       makeWrapper $packagePath/zoom $out/bin/zoom-us \
-        --prefix PATH : "${makeBinPath [ pciutils procps ]}" \
-        --set QSG_INFO 1 \
-        --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-${qtbase.qtCompatVersion}/plugins/platforms \
-        --set QT_PLUGIN_PATH ${qtbase.bin}/${qtbase.qtPluginPrefix}:${qtimageformats}/${qtbase.qtPluginPrefix} \
+        --prefix PATH : "${makeBinPath [ coreutils glib.dev pciutils procps qttools.dev utillinux ]}" \
         --run "cd $packagePath"
 
       runHook postInstall