Merge pull request #109602 from Mic92/zoom

zoom-us: 5.4.53350.1027 -> 5.4.57862.0110

authored by

Jörg Thalheim and committed by
GitHub
040d2415 62903dfc

+86 -96
+86 -96
pkgs/applications/networking/instant-messengers/zoom-us/default.nix
··· 1 - { lib, stdenv, fetchurl, mkDerivation, autoPatchelfHook, bash 1 + { stdenv 2 + , lib 3 + , fetchurl 4 + , mkDerivation 5 + , makeWrapper 2 6 , fetchFromGitHub 3 7 # Dynamic libraries 4 - , dbus, glib, libGL, libX11, libXfixes, libuuid, libxcb, qtbase, qtdeclarative 5 - , qtgraphicaleffects, qtimageformats, qtlocation, qtquickcontrols 6 - , qtquickcontrols2, qtscript, qtsvg , qttools, qtwayland, qtwebchannel 7 - , qtwebengine 8 + , alsaLib 9 + , atk 10 + , cairo 11 + , dbus 12 + , libGL 13 + , fontconfig 14 + , freetype 15 + , gtk3 16 + , gdk-pixbuf 17 + , glib 18 + , pango 19 + , wayland 20 + , xorg 21 + , libxkbcommon 22 + , zlib 8 23 # Runtime 9 - , coreutils, faac, pciutils, procps, util-linux 24 + , coreutils 25 + , pciutils 26 + , procps 27 + , util-linux 28 + , qttools 10 29 , pulseaudioSupport ? true, libpulseaudio ? null 11 - , alsaSupport ? stdenv.isLinux, alsaLib ? null 12 30 }: 13 31 14 32 assert pulseaudioSupport -> libpulseaudio != null; 15 33 16 34 let 17 - inherit (lib) concatStringsSep makeBinPath optional; 18 - 19 - version = "5.4.53350.1027"; 35 + version = "5.4.57862.0110"; 20 36 srcs = { 21 37 x86_64-linux = fetchurl { 22 - url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz"; 23 - sha256 = "11va3px42y81bwy10mxm7mk0kf2sni9gwb422pq9djck2dgchw5x"; 38 + url = "https://zoom.us/client/${version}/zoom_x86_64.pkg.tar.xz"; 39 + sha256 = "sha256-ZAwXhbZ3nT6PGkSC1vnX2y/XUOZfped0r3OuedI62gY="; 24 40 }; 25 41 }; 42 + dontUnpack = true; 26 43 27 - # Used for icons, appdata, and desktop file. 28 - desktopIntegration = fetchFromGitHub { 29 - owner = "flathub"; 30 - repo = "us.zoom.Zoom"; 31 - rev = "25e14f8141cdc682b4f7d9ebe15608619f5a19f2"; 32 - sha256 = "0w3pdd5484r3nsb4iahi37jdlm37vm1053sb8k2zlqb9s554zjwp"; 33 - }; 44 + libs = lib.makeLibraryPath ([ 45 + # $ LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH:$PWD ldd zoom | grep 'not found' 46 + alsaLib 47 + atk 48 + cairo 49 + dbus 50 + libGL 51 + fontconfig 52 + freetype 53 + gtk3 54 + gdk-pixbuf 55 + glib 56 + pango 57 + stdenv.cc.cc 58 + wayland 59 + xorg.libX11 60 + xorg.libxcb 61 + xorg.libXcomposite 62 + xorg.libXext 63 + libxkbcommon 64 + xorg.libXrender 65 + zlib 66 + xorg.xcbutilimage 67 + xorg.xcbutilkeysyms 68 + xorg.libXfixes 69 + xorg.libXtst 70 + ] ++ lib.optional (pulseaudioSupport) libpulseaudio); 34 71 35 - in mkDerivation { 36 - pname = "zoom-us"; 37 - inherit version; 38 - 39 - src = srcs.${stdenv.hostPlatform.system}; 72 + in stdenv.mkDerivation { 73 + name = "zoom-${version}"; 40 74 41 - nativeBuildInputs = [ autoPatchelfHook ]; 75 + dontUnpack = true; 42 76 43 - buildInputs = [ 44 - dbus glib libGL libX11 libXfixes libuuid libxcb faac qtbase 45 - qtdeclarative qtgraphicaleffects qtlocation qtquickcontrols qtquickcontrols2 46 - qtscript qtwebchannel qtwebengine qtimageformats qtsvg qttools qtwayland 77 + nativeBuildInputs = [ 78 + makeWrapper 47 79 ]; 48 80 49 - runtimeDependencies = optional pulseaudioSupport libpulseaudio 50 - ++ optional alsaSupport alsaLib; 51 - 52 - installPhase = 53 - let 54 - files = concatStringsSep " " [ 55 - "*.pcm" 56 - "*.png" 57 - "ZoomLauncher" 58 - "config-dump.sh" 59 - "timezones" 60 - "translations" 61 - "version.txt" 62 - "zcacert.pem" 63 - "zoom" 64 - "zoom.sh" 65 - "zopen" 66 - ]; 67 - in '' 68 - runHook preInstall 69 - 70 - mkdir -p $out/{bin,share/zoom-us} 71 - 72 - cp -ar ${files} $out/share/zoom-us 73 - 74 - # TODO Patch this somehow; tries to dlopen './libturbojpeg.so' from cwd 75 - cp libturbojpeg.so $out/share/zoom-us/libturbojpeg.so 81 + installPhase = '' 82 + runHook preInstall 83 + mkdir $out 84 + tar -C $out -xf ${srcs.${stdenv.hostPlatform.system}} 85 + mv $out/usr/* $out/ 86 + runHook postInstall 87 + ''; 76 88 77 - # Again, requires faac with a nonstandard filename. 78 - ln -s $(readlink -e "${faac}/lib/libfaac.so") $out/share/zoom-us/libfaac1.so 79 - 80 - runHook postInstall 81 - ''; 82 - 83 - postInstall = '' 84 - mkdir -p $out/share/{applications,appdata,icons} 85 - 89 + postFixup = '' 86 90 # Desktop File 87 - cp ${desktopIntegration}/us.zoom.Zoom.desktop $out/share/applications 88 - substituteInPlace $out/share/applications/us.zoom.Zoom.desktop \ 89 - --replace "Exec=zoom" "Exec=$out/bin/zoom-us" 91 + substituteInPlace $out/share/applications/Zoom.desktop \ 92 + --replace "Exec=/usr/bin/zoom" "Exec=$out/bin/zoom" 90 93 91 - # Appdata 92 - cp ${desktopIntegration}/us.zoom.Zoom.appdata.xml $out/share/appdata 93 - 94 - # Icons 95 - for icon_size in 64 96 128 256; do 96 - path=$icon_size'x'$icon_size 97 - icon=${desktopIntegration}/us.zoom.Zoom.$icon_size.png 98 - 99 - mkdir -p $out/share/icons/hicolor/$path/apps 100 - cp $icon $out/share/icons/hicolor/$path/apps/us.zoom.Zoom.png 94 + for i in zopen zoom ZoomLauncher; do 95 + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/opt/zoom/$i 101 96 done 102 - ''; 103 97 104 - # $out/share/zoom-us isn't in auto-wrap directories list, need manual wrapping 105 - dontWrapQtApps = true; 98 + # ZoomLauncher sets LD_LIBRARY_PATH before execing zoom 99 + wrapProgram $out/opt/zoom/zoom \ 100 + --prefix LD_LIBRARY_PATH ":" ${libs} 106 101 107 - qtWrapperArgs = [ 108 - ''--prefix PATH : ${makeBinPath [ coreutils glib.dev pciutils procps qttools.dev util-linux ]}'' 109 - # --run "cd ${placeholder "out"}/share/zoom-us" 110 - # ^^ unfortunately, breaks run arg into multiple array elements, due to 111 - # some bad array propagation. We'll do that in bash below 112 - ]; 113 - 114 - postFixup = '' 102 + rm $out/bin/zoom 115 103 # Zoom expects "zopen" executable (needed for web login) to be present in CWD. Or does it expect 116 104 # everybody runs Zoom only after cd to Zoom package directory? Anyway, :facepalm: 117 - qtWrapperArgs+=( --run "cd ${placeholder "out"}/share/zoom-us" ) 118 - 119 - for app in ZoomLauncher zopen zoom; do 120 - wrapQtApp $out/share/zoom-us/$app 121 - done 105 + makeWrapper $out/opt/zoom/ZoomLauncher $out/bin/zoom \ 106 + --run "cd $out/opt/zoom" \ 107 + --prefix PATH : ${lib.makeBinPath [ coreutils glib.dev pciutils procps qttools.dev util-linux ]} \ 108 + --prefix LD_LIBRARY_PATH ":" ${libs} 122 109 123 - ln -s $out/share/zoom-us/ZoomLauncher $out/bin/zoom-us 110 + # Backwards compatiblity: we used to call it zoom-us 111 + ln -s $out/bin/{zoom,zoom-us} 124 112 ''; 113 + 114 + # already done 115 + dontPatchELF = true; 125 116 126 117 passthru.updateScript = ./update.sh; 127 118 ··· 132 123 platforms = builtins.attrNames srcs; 133 124 maintainers = with lib.maintainers; [ danbst tadfisher doronbehar ]; 134 125 }; 135 - 136 126 }