Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 writeScript, 4 stdenv, 5 fetchurl, 6 alsa-lib, 7 at-spi2-atk, 8 at-spi2-core, 9 atk, 10 cairo, 11 cups, 12 dbus, 13 expat, 14 fontconfig, 15 freetype, 16 gdk-pixbuf, 17 glib, 18 gtk3, 19 harfbuzz, 20 libdrm, 21 libgcrypt, 22 libglvnd, 23 libkrb5, 24 libpulseaudio, 25 libsecret, 26 udev, 27 libxcb, 28 libxkbcommon, 29 libxcrypt-legacy, 30 lshw, 31 libgbm, 32 nspr, 33 nss, 34 pango, 35 zlib, 36 libX11, 37 libXcomposite, 38 libXcursor, 39 libXdamage, 40 libXext, 41 libXfixes, 42 libXi, 43 libXrandr, 44 libXrender, 45 libXtst, 46 libxshmfence, 47 xcbutil, 48 xcbutilimage, 49 xcbutilkeysyms, 50 xcbutilrenderutil, 51 xcbutilwm, 52 p7zip, 53 tbb, 54 wayland, 55 libXScrnSaver, 56}: 57 58stdenv.mkDerivation rec { 59 pname = "webex"; 60 version = "45.6.1.32593"; 61 62 src = fetchurl { 63 url = "https://binaries.webex.com/WebexDesktop-Ubuntu-Gold/20250617170507/Webex_ubuntu.7z"; 64 sha256 = "a024d8b9c40309a291d2070123935077579ae5aa9b60366e7aaa52fa818122b0"; 65 }; 66 67 nativeBuildInputs = [ 68 p7zip 69 ]; 70 71 buildInputs = [ 72 alsa-lib 73 at-spi2-atk 74 at-spi2-core 75 atk 76 cairo 77 cups 78 dbus 79 expat 80 fontconfig 81 freetype 82 glib 83 gdk-pixbuf 84 gtk3 85 harfbuzz 86 lshw 87 libgbm 88 nspr 89 nss 90 pango 91 zlib 92 libdrm 93 libgcrypt 94 libglvnd 95 libkrb5 96 libpulseaudio 97 libsecret 98 udev 99 libxcb 100 libxkbcommon 101 libxcrypt-legacy 102 libX11 103 libXcomposite 104 libXcursor 105 libXdamage 106 libXext 107 libXfixes 108 libXi 109 libXrandr 110 libXrender 111 libXtst 112 libxshmfence 113 xcbutil 114 xcbutilimage 115 libXScrnSaver 116 xcbutilkeysyms 117 xcbutilrenderutil 118 xcbutilwm 119 tbb 120 wayland 121 ]; 122 123 libPath = "$out/opt/Webex/lib:$out/opt/Webex/bin:${lib.makeLibraryPath buildInputs}"; 124 125 unpackPhase = '' 126 7z x $src 127 mv Webex_ubuntu/opt . 128 ''; 129 130 postPatch = '' 131 substituteInPlace opt/Webex/bin/webex.desktop --replace /opt $out/opt 132 ''; 133 134 dontPatchELF = true; 135 136 buildPhase = '' 137 patchelf \ 138 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 139 --set-rpath "${libPath}" \ 140 opt/Webex/bin/CiscoCollabHost \ 141 opt/Webex/bin/CiscoCollabHostCef \ 142 opt/Webex/bin/CiscoCollabHostCefWM \ 143 opt/Webex/bin/WebexFileSelector \ 144 opt/Webex/bin/pxgsettings 145 for each in $(find opt/Webex -type f | grep \\.so); do 146 patchelf --set-rpath "${libPath}" "$each" 147 done 148 ''; 149 150 installPhase = '' 151 mkdir -p "$out/bin" "$out/share/applications" 152 cp -r opt "$out" 153 154 ln -s "$out/opt/Webex/bin/CiscoCollabHost" "$out/bin/webex" 155 chmod +x $out/bin/webex 156 157 mv "$out/opt/Webex/bin/webex.desktop" "$out/share/applications/webex.desktop" 158 ''; 159 160 passthru.updateScript = writeScript "webex-update-script" '' 161 #!/usr/bin/env nix-shell 162 #!nix-shell -i bash -p curl jq common-updater-scripts 163 set -eou pipefail; 164 165 channel=gold # blue, green, gold 166 manifest=$(curl -s "https://client-upgrade-a.wbx2.com/client-upgrade/api/v1/webexteamsdesktop/upgrade/@me?channel=$channel&model=ubuntu" | jq '.manifest') 167 168 url=$(jq -r '.packageLocation' <<< "$manifest") 169 version=$(jq -r '.version' <<< "$manifest") 170 hash=$(jq -r '.checksum' <<< "$manifest") 171 172 update-source-version ${pname} "$version" "$hash" "$url" --file=./pkgs/by-name/we/webex/package.nix 173 ''; 174 175 meta = with lib; { 176 description = "All-in-one app to call, meet, message, and get work done"; 177 homepage = "https://webex.com/"; 178 downloadPage = "https://www.webex.com/downloads.html"; 179 license = licenses.unfree; 180 maintainers = with lib.maintainers; [ uvnikita ]; 181 platforms = [ "x86_64-linux" ]; 182 }; 183}