@@ -1,14 +1,16 @@
1−{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem,
2− alsaLib, dbus, glib, fontconfig, freetype, libpulseaudio,
3− utillinux, zlib, xorg, udev, sqlite, expat, libv4l, procps, libGL }:
1+{ stdenv, fetchurl, system, makeWrapper, makeDesktopItem, autoPatchelfHook
2+, dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, procps
3+, qtbase, qtdeclarative, qtlocation, qtquickcontrols2, qtscript
4+, qtwebchannel, qtwebengine
5+}:
46
57let
68
7− version = "2.0.123200.0405";
9+ version = "2.2.128100.0627";
810 srcs = {
911 x86_64-linux = fetchurl {
1012 url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
11− sha256 = "1ifwa2xf5mw1ll2j1f39qd7mpyxpc6xj3650dmlnxf525dsm573z";
13+ sha256 = "1x98zhs75c22x58zj4vzk8gb9yr7a9hfkbiqhjp5jrvccgz6ncin";
1214 };
1315 };
1416
@@ -17,76 +19,44 @@ in stdenv.mkDerivation {
1719
1820 src = srcs.${system};
1921
20− nativeBuildInputs = [ makeWrapper ];
22+ nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
2123
22− libPath = stdenv.lib.makeLibraryPath [
23− alsaLib
24− expat
25− glib
26− freetype
27− libGL
28− libpulseaudio
29− zlib
30− dbus
31− fontconfig
32− sqlite
33− utillinux
34− udev
35−
36− xorg.libX11
37− xorg.libSM
38− xorg.libICE
39− xorg.libxcb
40− xorg.xcbutilimage
41− xorg.xcbutilkeysyms
42− xorg.libXcursor
43− xorg.libXext
44− xorg.libXfixes
45− xorg.libXdamage
46− xorg.libXtst
47− xorg.libxshmfence
48− xorg.libXi
49− xorg.libXrender
50− xorg.libXcomposite
51− xorg.libXScrnSaver
52− xorg.libXrandr
53−
54− stdenv.cc.cc
24+ buildInputs = [
25+ dbus glib libGL libX11 libXfixes libuuid libxcb qtbase qtdeclarative
26+ qtlocation qtquickcontrols2 qtscript qtwebchannel qtwebengine
5527 ];
5628
57− installPhase = ''
58− runHook preInstall
59−
60− packagePath=$out/share/zoom-us
61− mkdir -p $packagePath
62− mkdir -p $out/bin
63− cp -ar * $packagePath
64−
65− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zoom
66− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/QtWebEngineProcess
67− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/qtdiag
68− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $packagePath/zopen
69− # included from https://github.com/NixOS/nixpkgs/commit/fc218766333a05c9352b386e0cbb16e1ae84bf53
70− # it works for me without it, but, well...
71− paxmark m $packagePath/zoom
72− #paxmark m $packagePath/QtWebEngineProcess # is this what dtzWill talked about?
73−
74− # RUNPATH set via patchelf is used only for half of libraries (why?), so wrap it
75− makeWrapper $packagePath/zoom $out/bin/zoom-us \
76− --prefix LD_LIBRARY_PATH : "$packagePath:$libPath" \
77− --prefix LD_PRELOAD : "${libv4l}/lib/v4l1compat.so" \
78− --prefix PATH : "${procps}/bin" \
79− --set QT_PLUGIN_PATH "$packagePath/platforms" \
80− --set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
81− --set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale"
82−
83− cat > $packagePath/qt.conf <<EOF
84− [Paths]
85− Prefix = $packagePath
86− EOF
87−
88− runHook postInstall
89− '';
29+ installPhase =
30+ let
31+ files = stdenv.lib.concatStringsSep " " [
32+ "*.pcm"
33+ "*.png"
34+ "ZXMPPROOT.cer"
35+ "ZoomLauncher"
36+ "config-dump.sh"
37+ "qtdiag"
38+ "timezones"
39+ "translations"
40+ "version.txt"
41+ "zcacert.pem"
42+ "zoom"
43+ "zoom.sh"
44+ "zoomlinux"
45+ "zopen"
46+ ];
47+ in ''
48+ runHook preInstall
49+
50+ packagePath=$out/share/zoom-us
51+ mkdir -p $packagePath $out/bin
52+
53+ cp -ar ${files} $packagePath
54+
55+ makeWrapper $packagePath/zoom $out/bin/zoom-us \
56+ --prefix PATH : "${procps}/bin"
57+
58+ runHook postInstall
59+ '';
9060
9161 postInstall = (makeDesktopItem {
9262 name = "zoom-us";
@@ -98,6 +68,8 @@ in stdenv.mkDerivation {
9868 mimeType = "x-scheme-handler/zoommtg;";
9969 }).buildCommand;
10070
71+ passthru.updateScript = ./update.sh;
72+
10173 meta = {
10274 homepage = https://zoom.us/;
10375 description = "zoom.us video conferencing application";