diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/zoom-us/default.nix')
-rw-r--r-- | pkgs/applications/networking/instant-messengers/zoom-us/default.nix | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix index 2f08e8af6c90..dc2bb4ba1e12 100644 --- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix +++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix @@ -1,16 +1,22 @@ { stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook -, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, procps -, qtbase, qtdeclarative, qtlocation, qtquickcontrols2, qtscript -, qtwebchannel, qtwebengine +# Dynamic libraries +, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative +, qtlocation, qtquickcontrols2, qtscript, qtwebchannel, qtwebengine +# Runtime +, libjpeg_turbo, pciutils, procps, qtimageformats +, pulseaudioSupport ? true, libpulseaudio ? null }: +assert pulseaudioSupport -> libpulseaudio != null; + let + inherit (stdenv.lib) concatStringsSep makeBinPath optional optionalString; - version = "2.2.128100.0627"; + version = "2.2.128200.0702"; srcs = { x86_64-linux = fetchurl { url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz"; - sha256 = "1x98zhs75c22x58zj4vzk8gb9yr7a9hfkbiqhjp5jrvccgz6ncin"; + sha256 = "0n9kyj94bj35gbpwiz4kq7hc8pwfqwnfqf003g4c8gx5pda3g56w"; }; }; @@ -24,11 +30,17 @@ in stdenv.mkDerivation { buildInputs = [ dbus glib libGL libX11 libXfixes libuuid libxcb qtbase qtdeclarative qtlocation qtquickcontrols2 qtscript qtwebchannel qtwebengine + libjpeg_turbo ]; + runtimeDependencies = optional pulseaudioSupport libpulseaudio; + + # Don't remove runtimeDependencies from RPATH via patchelf --shrink-rpath + dontPatchELF = true; + installPhase = let - files = stdenv.lib.concatStringsSep " " [ + files = concatStringsSep " " [ "*.pcm" "*.png" "ZXMPPROOT.cer" @@ -52,8 +64,15 @@ in stdenv.mkDerivation { cp -ar ${files} $packagePath + # TODO Patch this somehow; tries to dlopen './libturbojpeg.so' from cwd + ln -s $(readlink -e "${libjpeg_turbo.out}/lib/libturbojpeg.so") $packagePath/libturbojpeg.so + makeWrapper $packagePath/zoom $out/bin/zoom-us \ - --prefix PATH : "${procps}/bin" + --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} \ + --run "cd $packagePath" runHook postInstall ''; @@ -75,7 +94,7 @@ in stdenv.mkDerivation { description = "zoom.us video conferencing application"; license = stdenv.lib.licenses.unfree; platforms = builtins.attrNames srcs; - maintainers = with stdenv.lib.maintainers; [ danbst ]; + maintainers = with stdenv.lib.maintainers; [ danbst tadfisher ]; }; } |