3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #43426 from tadfisher/zoom-us

zoom-us: fix runtime qt environment
This commit is contained in:
Joachim F 2018-07-14 20:31:23 +00:00 committed by GitHub
commit bc48770871
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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