summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/zoom-us/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/zoom-us/default.nix116
1 files changed, 44 insertions, 72 deletions
diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
index 692a43629355..2f08e8af6c90 100644
--- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
+++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
@@ -1,14 +1,16 @@
-{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem,
-  alsaLib, dbus, glib, fontconfig, freetype, libpulseaudio,
-  utillinux, zlib, xorg, udev, sqlite, expat, libv4l, procps, libGL }:
+{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook
+, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, procps
+, qtbase, qtdeclarative, qtlocation, qtquickcontrols2, qtscript
+, qtwebchannel, qtwebengine
+}:
 
 let
 
-  version = "2.0.123200.0405";
+  version = "2.2.128100.0627";
   srcs = {
     x86_64-linux = fetchurl {
       url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
-      sha256 = "1ifwa2xf5mw1ll2j1f39qd7mpyxpc6xj3650dmlnxf525dsm573z";
+      sha256 = "1x98zhs75c22x58zj4vzk8gb9yr7a9hfkbiqhjp5jrvccgz6ncin";
     };
   };
 
@@ -17,76 +19,44 @@ in stdenv.mkDerivation {
 
   src = srcs.${system};
 
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
 
-  libPath = stdenv.lib.makeLibraryPath [
-    alsaLib
-    expat
-    glib
-    freetype
-    libGL
-    libpulseaudio
-    zlib
-    dbus
-    fontconfig
-    sqlite
-    utillinux
-    udev
-
-    xorg.libX11
-    xorg.libSM
-    xorg.libICE
-    xorg.libxcb
-    xorg.xcbutilimage
-    xorg.xcbutilkeysyms
-    xorg.libXcursor
-    xorg.libXext
-    xorg.libXfixes
-    xorg.libXdamage
-    xorg.libXtst
-    xorg.libxshmfence
-    xorg.libXi
-    xorg.libXrender
-    xorg.libXcomposite
-    xorg.libXScrnSaver
-    xorg.libXrandr
-
-    stdenv.cc.cc
+  buildInputs = [
+    dbus glib libGL libX11 libXfixes libuuid libxcb qtbase qtdeclarative
+    qtlocation qtquickcontrols2 qtscript qtwebchannel qtwebengine
   ];
 
-  installPhase = ''
-    runHook preInstall
-
-    packagePath=$out/share/zoom-us
-    mkdir -p $packagePath
-    mkdir -p $out/bin
-    cp -ar * $packagePath
-
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)"  $packagePath/zoom
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)"  $packagePath/QtWebEngineProcess
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)"  $packagePath/qtdiag
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)"  $packagePath/zopen
-    # included from https://github.com/NixOS/nixpkgs/commit/fc218766333a05c9352b386e0cbb16e1ae84bf53
-    # it works for me without it, but, well...
-    paxmark m $packagePath/zoom
-    #paxmark m $packagePath/QtWebEngineProcess # is this what dtzWill talked about?
-
-    # RUNPATH set via patchelf is used only for half of libraries (why?), so wrap it
-    makeWrapper $packagePath/zoom $out/bin/zoom-us \
-        --prefix LD_LIBRARY_PATH : "$packagePath:$libPath" \
-        --prefix LD_PRELOAD : "${libv4l}/lib/v4l1compat.so" \
-        --prefix PATH : "${procps}/bin" \
-        --set QT_PLUGIN_PATH "$packagePath/platforms" \
-        --set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
-        --set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale"
-
-    cat > $packagePath/qt.conf <<EOF
-    [Paths]
-    Prefix = $packagePath
-    EOF
-
-    runHook postInstall
-  '';
+  installPhase =
+    let
+      files = stdenv.lib.concatStringsSep " " [
+        "*.pcm"
+        "*.png"
+        "ZXMPPROOT.cer"
+        "ZoomLauncher"
+        "config-dump.sh"
+        "qtdiag"
+        "timezones"
+        "translations"
+        "version.txt"
+        "zcacert.pem"
+        "zoom"
+        "zoom.sh"
+        "zoomlinux"
+        "zopen"
+      ];
+    in ''
+      runHook preInstall
+
+      packagePath=$out/share/zoom-us
+      mkdir -p $packagePath $out/bin
+
+      cp -ar ${files} $packagePath
+
+      makeWrapper $packagePath/zoom $out/bin/zoom-us \
+        --prefix PATH : "${procps}/bin"
+
+      runHook postInstall
+    '';
 
   postInstall = (makeDesktopItem {
     name = "zoom-us";
@@ -98,6 +68,8 @@ in stdenv.mkDerivation {
     mimeType = "x-scheme-handler/zoommtg;";
   }).buildCommand;
 
+  passthru.updateScript = ./update.sh;
+
   meta = {
     homepage = https://zoom.us/;
     description = "zoom.us video conferencing application";