zed-editor: 0.165.4 -> 0.166.1 (#356757)

authored by Gaétan Lepage and committed by GitHub 019d66fe 7bbe2c85

+713 -82
+6
maintainers/maintainer-list.nix
··· 24072 24072 githubId = 49368953; 24073 24073 keys = [ { fingerprint = "D20F C904 A145 8B28 53D8 FBA0 0422 0096 01E4 87FC"; } ]; 24074 24074 }; 24075 + WeetHet = { 24076 + name = "WeetHet"; 24077 + matrix = "@weethet:catgirl.cloud"; 24078 + github = "WeetHet"; 24079 + githubId = 43210583; 24080 + }; 24075 24081 wegank = { 24076 24082 name = "Weijia Wang"; 24077 24083 email = "contact@weijia.wang";
+15
pkgs/by-name/li/livekit-libwebrtc/0001-shared-libraries.patch
··· 1 + diff --git a/BUILD.gn b/BUILD.gn 2 + index d5289b8..598bbbc 100644 3 + --- a/BUILD.gn 4 + +++ b/BUILD.gn 5 + @@ -138,8 +138,8 @@ config("library_impl_config") { 6 + # target_defaults and direct_dependent_settings. 7 + config("common_inherited_config") { 8 + defines = [] 9 + - cflags = [] 10 + - ldflags = [] 11 + + cflags = [ "-fvisibility=default" ] 12 + + ldflags = [ "-lavutil", "-lavformat", "-lavcodec" ] 13 + 14 + if (rtc_dlog_always_on) { 15 + defines += [ "DLOG_ALWAYS_ON" ]
+61
pkgs/by-name/li/livekit-libwebrtc/gclient2nix.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + flit-core, 6 + click, 7 + nurl, 8 + nix-prefetch-git, 9 + nix, 10 + coreutils, 11 + nixfmt-rfc-style, 12 + makeWrapper, 13 + }: 14 + # Based on https://github.com/milahu/gclient2nix 15 + # but with libwebrtc-specific changes. 16 + let 17 + nativeDeps = [ 18 + nurl 19 + nix-prefetch-git 20 + nix 21 + coreutils 22 + nixfmt-rfc-style 23 + ]; 24 + in 25 + buildPythonPackage { 26 + pname = "gclient2nix"; 27 + version = "0.2.0-unstable-2024-12-19"; 28 + pyproject = true; 29 + 30 + src = fetchFromGitHub { 31 + owner = "WeetHet"; 32 + repo = "gclient2nix"; 33 + rev = "bdf5ab79818595be9dcfc655bd6784cf4bcdb863"; 34 + hash = "sha256-KOXG8E2g30XyZGmM4ZnYPBSybBhHIjOZL8ZXRKYrkZQ="; 35 + }; 36 + 37 + build-system = [ 38 + flit-core 39 + ]; 40 + 41 + dependencies = [ 42 + click 43 + ]; 44 + 45 + nativeBuildInputs = [ makeWrapper ]; 46 + 47 + postFixup = '' 48 + wrapProgram $out/bin/gclient2nix \ 49 + --set PATH ${lib.makeBinPath nativeDeps} 50 + ''; 51 + 52 + meta = { 53 + description = "Generate Nix expressions for projects based on the Google build tools"; 54 + homepage = "https://github.com/WeetHet/gclient2nix"; 55 + license = lib.licenses.mit; 56 + maintainers = with lib.maintainers; [ 57 + WeetHet 58 + ]; 59 + mainProgram = "gclient2nix"; 60 + }; 61 + }
+64
pkgs/by-name/li/livekit-libwebrtc/mkSystemLibraries.nix
··· 1 + { 2 + brotli, 3 + fontconfig, 4 + freetype, 5 + harfbuzz, 6 + icu, 7 + jsoncpp, 8 + libpng, 9 + libwebp, 10 + libxml2, 11 + libxslt, 12 + minizip, 13 + ffmpeg_6, 14 + }: 15 + { 16 + "brotli" = { 17 + package = brotli; 18 + path = "third_party/brotli/BUILD.gn"; 19 + }; 20 + "fontconfig" = { 21 + package = fontconfig; 22 + path = "third_party/fontconfig/BUILD.gn"; 23 + }; 24 + "freetype" = { 25 + package = freetype; 26 + path = "build/config/freetype/freetype.gni"; 27 + }; 28 + "harfbuzz-ng" = { 29 + package = harfbuzz; 30 + path = "third_party/harfbuzz-ng/harfbuzz.gni"; 31 + }; 32 + "jsoncpp" = { 33 + package = jsoncpp; 34 + path = "third_party/jsoncpp/BUILD.gn"; 35 + }; 36 + "icu" = { 37 + package = icu; 38 + path = "third_party/icu/BUILD.gn"; 39 + }; 40 + "libpng" = { 41 + package = libpng; 42 + path = "third_party/libpng/BUILD.gn"; 43 + }; 44 + "libwebp" = { 45 + package = libwebp; 46 + path = "third_party/libwebp/BUILD.gn"; 47 + }; 48 + "libxml" = { 49 + package = libxml2; 50 + path = "third_party/libxml/BUILD.gn"; 51 + }; 52 + "libxslt" = { 53 + package = libxslt; 54 + path = "third_party/libxslt/BUILD.gn"; 55 + }; 56 + "zlib" = { 57 + package = minizip; 58 + path = "third_party/zlib/BUILD.gn"; 59 + }; 60 + "ffmpeg" = { 61 + package = ffmpeg_6; 62 + path = "third_party/ffmpeg/BUILD.gn"; 63 + }; 64 + }
+298
pkgs/by-name/li/livekit-libwebrtc/package.nix
··· 1 + { 2 + stdenv, 3 + clang, 4 + callPackage, 5 + lib, 6 + gn, 7 + fetchurl, 8 + fetchpatch, 9 + xcbuild, 10 + python3, 11 + ninja, 12 + apple-sdk_14, 13 + darwinMinVersionHook, 14 + git, 15 + cpio, 16 + pkg-config, 17 + glib, 18 + alsa-lib, 19 + pulseaudio, 20 + nasm, 21 + brotli, 22 + fontconfig, 23 + freetype, 24 + harfbuzz, 25 + icu, 26 + jsoncpp, 27 + libpng, 28 + libwebp, 29 + libxml2, 30 + libxslt, 31 + minizip, 32 + ffmpeg_6, 33 + writeShellScript, 34 + }: 35 + let 36 + sources = callPackage ./sources.nix { }; 37 + 38 + platformMap = { 39 + "x86_64" = "x64"; 40 + "i686" = "x86"; 41 + "arm" = "arm"; 42 + "aarch64" = "arm64"; 43 + }; 44 + cpuName = stdenv.hostPlatform.parsed.cpu.name; 45 + gnArch = platformMap."${cpuName}" or (throw "unsupported arch ${cpuName}"); 46 + gnOs = 47 + if stdenv.hostPlatform.isLinux then 48 + "linux" 49 + else if stdenv.hostPlatform.isDarwin then 50 + "mac" 51 + else 52 + throw "unknown platform ${stdenv.hostPlatform.config}"; 53 + boringSslSymbols = fetchurl { 54 + url = "https://raw.githubusercontent.com/livekit/rust-sdks/refs/tags/webrtc-dac8015-6/webrtc-sys/libwebrtc/boringssl_prefix_symbols.txt"; 55 + hash = "sha256-dAweArv8zjsFPENEKi9mNBQkt4y+hh3rCqG6QZjRC20="; 56 + }; 57 + gnSystemLibraries = import ./mkSystemLibraries.nix { 58 + inherit 59 + brotli 60 + fontconfig 61 + freetype 62 + harfbuzz 63 + icu 64 + jsoncpp 65 + libpng 66 + libwebp 67 + libxml2 68 + libxslt 69 + minizip 70 + ffmpeg_6 71 + ; 72 + }; 73 + gclient2nix = python3.pkgs.callPackage ./gclient2nix.nix { }; 74 + in 75 + stdenv.mkDerivation { 76 + pname = "livekit-libwebrtc"; 77 + version = "m114"; 78 + 79 + src = "${sources}/src"; 80 + 81 + patches = [ 82 + # Adds missing dependencies to generated LICENSE 83 + (fetchpatch { 84 + url = "https://raw.githubusercontent.com/livekit/rust-sdks/b41861c7b71762d5d85b3de07ae67ffcae7c3fa2/webrtc-sys/libwebrtc/patches/add_licenses.patch"; 85 + hash = "sha256-9A4KyRW1K3eoQxsTbPX0vOnj66TCs2Fxjpsu5wO8mGI="; 86 + }) 87 + # Fixes the certificate chain, required for Let's Encrypt certs 88 + (fetchpatch { 89 + url = "https://raw.githubusercontent.com/livekit/rust-sdks/b41861c7b71762d5d85b3de07ae67ffcae7c3fa2/webrtc-sys/libwebrtc/patches/ssl_verify_callback_with_native_handle.patch"; 90 + hash = "sha256-/gneuCac4VGJCWCjJZlgLKFOTV+x7Lc5KVFnNIKenwM="; 91 + }) 92 + # Adds dependencies and features required by livekit 93 + (fetchpatch { 94 + url = "https://raw.githubusercontent.com/livekit/rust-sdks/b41861c7b71762d5d85b3de07ae67ffcae7c3fa2/webrtc-sys/libwebrtc/patches/add_deps.patch"; 95 + hash = "sha256-EMNYcTcBYh51Tt96+HP43ND11qGKClfx3xIPQmIBSo0="; 96 + }) 97 + # Fixes concurrency and localization issues 98 + (fetchpatch { 99 + url = "https://github.com/zed-industries/webrtc/commit/08f7a701a2eda6407670508fc2154257a3c90308.patch"; 100 + hash = "sha256-oWYZLwqjRSHDt92MqsxsoBSMyZKj1ubNbOXZRbPpbEw="; 101 + }) 102 + # Required for dynamically linking to ffmpeg libraries and exposing symbols 103 + ./0001-shared-libraries.patch 104 + ]; 105 + 106 + postPatch = 107 + '' 108 + substituteInPlace tools/generate_shim_headers/generate_shim_headers.py \ 109 + --replace-fail "OFFICIAL_BUILD" "GOOGLE_CHROME_BUILD" 110 + 111 + substituteInPlace BUILD.gn \ 112 + --replace-fail "rtc_static_library" "rtc_shared_library" \ 113 + --replace-fail "complete_static_lib = true" "" 114 + 115 + substituteInPlace webrtc.gni \ 116 + --replace-fail "!build_with_chromium && is_component_build" "false" 117 + 118 + substituteInPlace rtc_tools/BUILD.gn \ 119 + --replace-fail "\":frame_analyzer\"," "" 120 + 121 + for lib in ${toString (builtins.attrNames gnSystemLibraries)}; do 122 + if [ -d "third_party/$lib" ]; then 123 + find "third_party/$lib" -type f \ 124 + \! -path "third_party/$lib/chromium/*" \ 125 + \! -path "third_party/$lib/google/*" \ 126 + \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \ 127 + \! -regex '.*\.\(gn\|gni\|isolate\)' \ 128 + \! -name 'LICENSE*' \ 129 + \! -name 'COPYING*' \ 130 + -delete 131 + fi 132 + done 133 + '' 134 + + lib.optionalString stdenv.hostPlatform.isLinux '' 135 + ln -sf ${lib.getExe gn} buildtools/linux64/gn 136 + substituteInPlace build/toolchain/linux/BUILD.gn \ 137 + --replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""' 138 + '' 139 + + lib.optionalString stdenv.hostPlatform.isDarwin '' 140 + ln -sf ${lib.getExe gn} buildtools/mac/gn 141 + chmod +x build/toolchain/apple/linker_driver.py 142 + patchShebangs build/toolchain/apple/linker_driver.py 143 + substituteInPlace build/toolchain/apple/toolchain.gni --replace-fail "/bin/cp -Rc" "cp -a" 144 + ''; 145 + 146 + nativeBuildInputs = 147 + (builtins.concatLists ( 148 + lib.mapAttrsToList ( 149 + _: library: if (library.package ? dev) then [ library.package.dev ] else [ ] 150 + ) gnSystemLibraries 151 + )) 152 + ++ [ 153 + gn 154 + (python3.withPackages (ps: [ ps.setuptools ])) 155 + ninja 156 + git 157 + cpio 158 + pkg-config 159 + ] 160 + ++ lib.optionals stdenv.isDarwin [ xcbuild ]; 161 + 162 + buildInputs = 163 + [ nasm ] 164 + ++ (lib.mapAttrsToList (_: library: library.package) gnSystemLibraries) 165 + ++ (lib.optionals stdenv.hostPlatform.isLinux [ 166 + glib 167 + alsa-lib 168 + pulseaudio 169 + ]) 170 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 171 + apple-sdk_14 172 + (darwinMinVersionHook "12.3") 173 + ]; 174 + 175 + preConfigure = '' 176 + echo "generate_location_tags = true" >> build/config/gclient_args.gni 177 + echo "0" > build/util/LASTCHANGE.committime 178 + 179 + python build/linux/unbundle/replace_gn_files.py \ 180 + --system-libraries ${toString (builtins.attrNames gnSystemLibraries)} 181 + ''; 182 + 183 + gnFlags = 184 + [ 185 + "is_debug=false" 186 + "rtc_include_tests=false" 187 + ''target_os="${gnOs}"'' 188 + ''target_cpu="${gnArch}"'' 189 + "treat_warnings_as_errors=false" 190 + "rtc_enable_protobuf=false" 191 + "rtc_include_tests=false" 192 + "rtc_build_examples=false" 193 + "rtc_build_tools=false" 194 + "rtc_libvpx_build_vp9=true" 195 + "enable_libaom=true" 196 + "use_dummy_lastchange=true" 197 + "is_component_build=true" 198 + "enable_stripping=true" 199 + "rtc_use_h264=true" 200 + "use_custom_libcxx=false" 201 + "use_rtti=true" 202 + ] 203 + ++ (lib.optionals stdenv.hostPlatform.isLinux [ 204 + "use_goma=false" 205 + "rtc_use_pipewire=false" 206 + "symbol_level=0" 207 + "enable_iterator_debugging=false" 208 + "rtc_use_x11=false" 209 + "use_sysroot=false" 210 + "is_clang=false" 211 + ]) 212 + ++ (lib.optionals stdenv.hostPlatform.isDarwin [ 213 + ''mac_deployment_target="12.3"'' 214 + "rtc_enable_symbol_export=true" 215 + "rtc_enable_objc_symbol_export=true" 216 + "rtc_include_dav1d_in_internal_decoder_factory=true" 217 + "clang_use_chrome_plugins=false" 218 + "use_lld=false" 219 + ''clang_base_path="${clang}"'' 220 + ]); 221 + 222 + ninjaFlags = 223 + [ ":default" ] 224 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 225 + "api/audio_codecs:builtin_audio_decoder_factory" 226 + "api/task_queue:default_task_queue_factory" 227 + "sdk:native_api" 228 + "sdk:default_codec_factory_objc" 229 + "pc:peerconnection" 230 + "sdk:videocapture_objc" 231 + "sdk:mac_framework_objc" 232 + ]; 233 + 234 + postBuild = 235 + lib.optionalString stdenv.hostPlatform.isLinux '' 236 + objcopy --redefine-syms="${boringSslSymbols}" "libwebrtc.so" 237 + '' 238 + + '' 239 + # Generate licenses 240 + python3 "../../tools_webrtc/libs/generate_licenses.py" \ 241 + --target ${if stdenv.hostPlatform.isDarwin then ":webrtc" else ":default"} $PWD $PWD 242 + ''; 243 + 244 + installPhase = 245 + '' 246 + runHook preInstall 247 + 248 + mkdir -p $out/{lib,include} 249 + cp obj/webrtc.ninja $out/ 250 + cp args.gn $out/ 251 + cp LICENSE.md $out/ 252 + '' 253 + + lib.optionalString stdenv.hostPlatform.isLinux '' 254 + cp libwebrtc.so $out/lib/ 255 + cp libthird_party_boringssl.so $out/lib/ 256 + '' 257 + + lib.optionalString stdenv.hostPlatform.isDarwin '' 258 + mkdir -p $out/Library/Frameworks 259 + cp -r WebRTC.framework $out/Library/Frameworks 260 + cp libwebrtc.dylib $out/lib 261 + cp libthird_party_boringssl.dylib $out/lib/ 262 + '' 263 + + '' 264 + cd ../.. 265 + find . -name "*.h" -print | cpio -pd $out/include 266 + 267 + runHook postInstall 268 + ''; 269 + 270 + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' 271 + boringssl="$out/lib/libthird_party_boringssl.dylib" 272 + webrtc="$out/lib/libwebrtc.dylib" 273 + framework="$out/Library/Frameworks/WebRTC.framework/Versions/A/WebRTC" 274 + 275 + install_name_tool -id "$boringssl" "$boringssl" 276 + install_name_tool -id "$webrtc" "$webrtc" 277 + install_name_tool -change @rpath/libthird_party_boringssl.dylib "$boringssl" "$webrtc" 278 + install_name_tool -id "$framework" "$framework" 279 + install_name_tool -change @rpath/libthird_party_boringssl.dylib "$boringssl" "$framework" 280 + ''; 281 + 282 + passthru.updateScript = writeShellScript "update-livekit-libwebrtc" '' 283 + set -eou pipefail 284 + cd pkgs/by-name/li/livekit-libwebrtc 285 + ${lib.getExe gclient2nix} --main-source-path src https://github.com/webrtc-sdk/webrtc.git m114_release 286 + ''; 287 + 288 + meta = { 289 + description = "WebRTC library used by livekit"; 290 + homepage = "https://github.com/livekit/rust-sdks/"; 291 + license = lib.licenses.bsd3; 292 + maintainers = with lib.maintainers; [ 293 + WeetHet 294 + niklaskorz 295 + ]; 296 + platforms = lib.platforms.linux ++ lib.platforms.darwin; 297 + }; 298 + }
+228
pkgs/by-name/li/livekit-libwebrtc/sources.nix
··· 1 + { 2 + fetchFromGitHub, 3 + fetchFromGitiles, 4 + fetchgit, 5 + fetchurl, 6 + runCommand, 7 + lib, 8 + }: 9 + let 10 + sourceDerivations = { 11 + "src" = fetchFromGitHub { 12 + owner = "webrtc-sdk"; 13 + repo = "webrtc"; 14 + rev = "dac8015ce039c8658706b222746808f01968256b"; 15 + hash = "sha256-T5syfRzX/LfvEllVurzZPKffkciTd2inUEC2py78ZPA="; 16 + }; 17 + "src/base" = fetchFromGitiles { 18 + url = "https://chromium.googlesource.com/chromium/src/base"; 19 + rev = "fe22033c21d399a340b3f4604722463d9da25c6e"; 20 + hash = "sha256-iqtcXEtmCNioKRxfTCwiU/NG0xlQ1R/6GE1M6qC0XTU="; 21 + }; 22 + "src/build" = fetchFromGitiles { 23 + url = "https://chromium.googlesource.com/chromium/src/build"; 24 + rev = "a9d28a095c8b349f8319ee0d241a78e2c849928f"; 25 + hash = "sha256-5NguoLWm6v68fpyHK6SYbM6vHdaOT0quks5/SPW0XOI="; 26 + }; 27 + "src/buildtools" = fetchFromGitiles { 28 + url = "https://chromium.googlesource.com/chromium/src/buildtools"; 29 + rev = "539a6f68735c631f57ae33096e9e7fc059e049cf"; 30 + hash = "sha256-1u4BQqXcW4Z9LPx7lMjBLK8ouKkyb576FRvB2LGwf7Q="; 31 + }; 32 + "src/testing" = fetchFromGitiles { 33 + url = "https://chromium.googlesource.com/chromium/src/testing"; 34 + rev = "ee4801b4e9c2d945fff5236d8518511e6c00a29e"; 35 + hash = "sha256-xUfPwWVPoLxlCWHFKLWtRC1kVJgLgcvSoXPYmrseCXE="; 36 + }; 37 + "src/third_party" = fetchFromGitiles { 38 + url = "https://chromium.googlesource.com/chromium/src/third_party"; 39 + rev = "4f8bf4c6885ab577c7577c4cdd11d04eaf78e9ca"; 40 + hash = "sha256-4ehEerUw9IvghdPPrrh+WCm/XEpVe5PjjIRbQZpIsbY="; 41 + }; 42 + "src/buildtools/clang_format/script" = fetchFromGitiles { 43 + url = "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format"; 44 + rev = "f97059df7f8b205064625cdb5f97b56668a125ef"; 45 + hash = "sha256-IL6ReGM6+urkXfGYe1BBOv+0XgCZv5i3Lib1q9COhig="; 46 + }; 47 + "src/buildtools/third_party/libc++/trunk" = fetchFromGitiles { 48 + url = "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx"; 49 + rev = "bff81b702ff4b7f74b1c0ed02a4bcf6c2744a90b"; 50 + hash = "sha256-i/FGU9F7HlGJJuwoFMV4V05pf4pvsqNxrPBN223YjZQ="; 51 + }; 52 + "src/buildtools/third_party/libc++abi/trunk" = fetchFromGitiles { 53 + url = "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi"; 54 + rev = "307bd163607c315d46103ebe1d68aab44bf93986"; 55 + hash = "sha256-Zka8AHFtHA4AC/Pbzc3pVqz/k2GYZYc8CeP1IXxGBUM="; 56 + }; 57 + "src/buildtools/third_party/libunwind/trunk" = fetchFromGitiles { 58 + url = "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind"; 59 + rev = "2795322d57001de8125cfdf18cef804acff69e35"; 60 + hash = "sha256-u6FMD83JBBusQuWU7Hx5HREvLIFWUA4iN4If8poaHbE="; 61 + }; 62 + "src/third_party/boringssl/src" = fetchFromGitiles { 63 + url = "https://boringssl.googlesource.com/boringssl"; 64 + rev = "6776d5cd8fcdf6c5e05bae2d655076dbeaa56103"; 65 + hash = "sha256-KvQhpkn1pGQ/xPbkHcGgTTvL3GGRL1TfdSPYgfNn5bU="; 66 + }; 67 + "src/third_party/breakpad/breakpad" = fetchFromGitiles { 68 + url = "https://chromium.googlesource.com/breakpad/breakpad"; 69 + rev = "9bf8d1ec526cec139b2d3fba148ce81ccf2cceab"; 70 + hash = "sha256-c3/ksp01+cmSyzaD5SF0Lnnw+t78RwZAKCJnwg1NGXU="; 71 + }; 72 + "src/third_party/catapult" = fetchFromGitiles { 73 + url = "https://chromium.googlesource.com/catapult"; 74 + rev = "cae7ec667dee9f5c012b54ee9ffee94eb7beda14"; 75 + hash = "sha256-vK7rlGshfzPzaEdAxlP5vQ4USR/fC3BzPCh/rn0aAf4="; 76 + }; 77 + "src/third_party/ced/src" = fetchFromGitiles { 78 + url = "https://chromium.googlesource.com/external/github.com/google/compact_enc_det"; 79 + rev = "ba412eaaacd3186085babcd901679a48863c7dd5"; 80 + hash = "sha256-ySG74Rj2i2c/PltEgHVEDq+N8yd9gZmxNktc56zIUiY="; 81 + }; 82 + "src/third_party/colorama/src" = fetchFromGitiles { 83 + url = "https://chromium.googlesource.com/external/colorama"; 84 + rev = "3de9f013df4b470069d03d250224062e8cf15c49"; 85 + hash = "sha256-6ZTdPYSHdQOLYMSnE+Tp7PgsVTs3U2awGu9Qb4Rg/tk="; 86 + }; 87 + "src/third_party/crc32c/src" = fetchFromGitiles { 88 + url = "https://chromium.googlesource.com/external/github.com/google/crc32c"; 89 + rev = "fa5ade41ee480003d9c5af6f43567ba22e4e17e6"; 90 + hash = "sha256-urg0bmnfMfHagLPELp4WrNCz1gBZ6DFOWpDue1KsMtc="; 91 + }; 92 + "src/third_party/depot_tools" = fetchFromGitiles { 93 + url = "https://chromium.googlesource.com/chromium/tools/depot_tools"; 94 + rev = "6e714e6dfe62110c95fafed4bdeb365a69c6a77e"; 95 + hash = "sha256-7jPow77ejToE55KvQ7/eO0alMdMHcypfSyPceFAbZkw="; 96 + }; 97 + "src/third_party/ffmpeg" = fetchFromGitiles { 98 + url = "https://chromium.googlesource.com/chromium/third_party/ffmpeg"; 99 + rev = "8d21d41d8bec5c0b266ee305d1a708dc5c23b594"; 100 + hash = "sha256-UjrZJBtOQiiqxtLb8x24axord3OFvyCcRcgDwiYE/jw="; 101 + }; 102 + "src/third_party/flatbuffers/src" = fetchFromGitiles { 103 + url = "https://chromium.googlesource.com/external/github.com/google/flatbuffers"; 104 + rev = "a56f9ec50e908362e20254fcef28e62a2f148d91"; 105 + hash = "sha256-OQ8E+i30WRz/lPJmVDiF7+TPo4gZVu2Of9loxz3tswI="; 106 + }; 107 + "src/third_party/grpc/src" = fetchFromGitiles { 108 + url = "https://chromium.googlesource.com/external/github.com/grpc/grpc"; 109 + rev = "822dab21d9995c5cf942476b35ca12a1aa9d2737"; 110 + hash = "sha256-64JEVCx/PCM0dvv7kAQvSjLc0QbRAZVBDzwD/FAV6T8="; 111 + }; 112 + "src/third_party/fontconfig/src" = fetchFromGitiles { 113 + url = "https://chromium.googlesource.com/external/fontconfig"; 114 + rev = "06929a556fdc39c8fe12965b69070c8df520a33e"; 115 + hash = "sha256-0R+FEhtGXFiQWHEPRrJqaBW1JVfCojYI4NPDvYMBhoU="; 116 + }; 117 + "src/third_party/freetype/src" = fetchFromGitiles { 118 + url = "https://chromium.googlesource.com/chromium/src/third_party/freetype2"; 119 + rev = "9806414c15230d253d5219ea0dafeddb717307b1"; 120 + hash = "sha256-UbWtRb24U7Cv+PecVtoNG33Q1ItmkvssmW8Bh8qlFvA="; 121 + }; 122 + "src/third_party/harfbuzz-ng/src" = fetchFromGitiles { 123 + url = "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz"; 124 + rev = "2822b589bc837fae6f66233e2cf2eef0f6ce8470"; 125 + hash = "sha256-qwtRORl/Pu4M9EvW8MdK8onFMCw/4+57FEBjoNt4qoY="; 126 + }; 127 + "src/third_party/google_benchmark/src" = fetchFromGitiles { 128 + url = "https://chromium.googlesource.com/external/github.com/google/benchmark"; 129 + rev = "b177433f3ee2513b1075140c723d73ab8901790f"; 130 + hash = "sha256-h2ryAQAuHI54Cni88L85e7Np4KATGVTRdDcmUvCNeWc="; 131 + }; 132 + "src/third_party/gtest-parallel" = fetchFromGitiles { 133 + url = "https://chromium.googlesource.com/external/github.com/google/gtest-parallel"; 134 + rev = "f4d65b555894b301699c7c3c52906f72ea052e83"; 135 + hash = "sha256-dzWXJHPb8RHqxoi/gA9npwnjAsT8gg7A90g/dx8LVwQ="; 136 + }; 137 + "src/third_party/googletest/src" = fetchFromGitiles { 138 + url = "https://chromium.googlesource.com/external/github.com/google/googletest"; 139 + rev = "af29db7ec28d6df1c7f0f745186884091e602e07"; 140 + hash = "sha256-VYRjcM3dDY2FarviXyFMgSkXCqKfWXwtGAj2Msgm7zg="; 141 + }; 142 + "src/third_party/icu" = fetchFromGitiles { 143 + url = "https://chromium.googlesource.com/chromium/deps/icu"; 144 + rev = "d8daa943f64cd5dd2a55e9baf2e655ab4bfa5ae9"; 145 + hash = "sha256-47Xxb5IFbRmdO3oADjn13fm7aIYFXh2R4YVZIJAy22U="; 146 + }; 147 + "src/third_party/jsoncpp/source" = fetchFromGitiles { 148 + url = "https://chromium.googlesource.com/external/github.com/open-source-parsers/jsoncpp"; 149 + rev = "42e892d96e47b1f6e29844cc705e148ec4856448"; 150 + hash = "sha256-bSLNcoYBz3QCt5VuTR056V9mU2PmBuYBa0W6hFg2m8Q="; 151 + }; 152 + "src/third_party/libFuzzer/src" = fetchFromGitiles { 153 + url = "https://chromium.googlesource.com/chromium/llvm-project/compiler-rt/lib/fuzzer"; 154 + rev = "debe7d2d1982e540fbd6bd78604bf001753f9e74"; 155 + hash = "sha256-HG3KHhKQnr4hdnUK/2QhcxRdNxh38fhU54JKKzqZaio="; 156 + }; 157 + "src/third_party/libjpeg_turbo" = fetchFromGitiles { 158 + url = "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo"; 159 + rev = "aa4075f116e4312537d0d3e9dbd5e31096539f94"; 160 + hash = "sha256-QnXMR9qqRiYfV1sUJvKVvLQ9A022lYKbsrI9HOU9LCs="; 161 + }; 162 + "src/third_party/libsrtp" = fetchFromGitiles { 163 + url = "https://chromium.googlesource.com/chromium/deps/libsrtp"; 164 + rev = "5b7c744eb8310250ccc534f3f86a2015b3887a0a"; 165 + hash = "sha256-pfLFh2JGk/g0ZZxBKTaYW9/PBpkCm0rtJeyNePUMTTc="; 166 + }; 167 + "src/third_party/dav1d/libdav1d" = fetchFromGitiles { 168 + url = "https://chromium.googlesource.com/external/github.com/videolan/dav1d"; 169 + rev = "d426d1c91075b9c552b12dd052af1cd0368f05a2"; 170 + hash = "sha256-FivzwqCvlY89q2znGvfNks+hje/iUFHcKPb19FyAZhM="; 171 + }; 172 + "src/third_party/libaom/source/libaom" = fetchFromGitiles { 173 + url = "https://aomedia.googlesource.com/aom"; 174 + rev = "5a0903824082f41123e8365b5b99ddb6ced8971c"; 175 + hash = "sha256-j8b0xM7hHNqYIeUQjf+c7LyzcfZVJx64Xqo9gIRtsYU="; 176 + }; 177 + "src/third_party/perfetto" = fetchFromGitiles { 178 + url = "https://android.googlesource.com/platform/external/perfetto"; 179 + rev = "20b114cd063623e63ef1b0a31167d60081567e51"; 180 + hash = "sha256-6BpUd+BplRR/0eUIYz5SehzrpNHPfUm2Qv6U1+Mxy8g="; 181 + }; 182 + "src/third_party/libvpx/source/libvpx" = fetchFromGitiles { 183 + url = "https://chromium.googlesource.com/webm/libvpx"; 184 + rev = "7aaffe2df4c9426ab204a272ca5ca52286ca86d4"; 185 + hash = "sha256-Uis24FzUtM38ktPG/wDJLiHZYmpmYFGbuQ/SWnmZJSA="; 186 + }; 187 + "src/third_party/libyuv" = fetchFromGitiles { 188 + url = "https://chromium.googlesource.com/libyuv/libyuv"; 189 + rev = "77c2121f7e6b8e694d6e908bbbe9be24214097da"; 190 + hash = "sha256-LLmTW05GxoXgNkLRHp3e6gb7glMgJo1moc6lPLVHk6w="; 191 + }; 192 + "src/third_party/lss" = fetchFromGitiles { 193 + url = "https://chromium.googlesource.com/linux-syscall-support"; 194 + rev = "ce877209e11aa69dcfffbd53ef90ea1d07136521"; 195 + hash = "sha256-hE8uZf9Fst66qJkoVYChiB8G41ie+k9M4X0W+5JUSdw="; 196 + }; 197 + "src/third_party/nasm" = fetchFromGitiles { 198 + url = "https://chromium.googlesource.com/chromium/deps/nasm"; 199 + rev = "7fc833e889d1afda72c06220e5bed8fb43b2e5ce"; 200 + hash = "sha256-L+b3X3vsfpY6FSlIK/AHhxhmq2cXd50vND6uT6yn8Qs="; 201 + }; 202 + "src/third_party/openh264/src" = fetchFromGitiles { 203 + url = "https://chromium.googlesource.com/external/github.com/cisco/openh264"; 204 + rev = "09a4f3ec842a8932341b195c5b01e141c8a16eb7"; 205 + hash = "sha256-J7Eqe2QevZh1xfap19W8AVCcwfRu7ztknnbKFJUAH1c="; 206 + }; 207 + "src/tools" = fetchFromGitiles { 208 + url = "https://chromium.googlesource.com/chromium/src/tools"; 209 + rev = "bafae7909cbbcd277d29c0da0809001a8d6f4a14"; 210 + hash = "sha256-MK5M9RrX+cX4S7vsMgNVQ2YkNbEuvizKueuc1mA5jyU="; 211 + }; 212 + }; 213 + namedSourceDerivations = builtins.mapAttrs ( 214 + path: drv: 215 + drv.overrideAttrs { 216 + name = lib.strings.sanitizeDerivationName path; 217 + } 218 + ) sourceDerivations; 219 + in 220 + runCommand "combined-sources" { } ( 221 + lib.concatLines ( 222 + [ "mkdir $out" ] 223 + ++ (lib.mapAttrsToList (path: drv: '' 224 + mkdir -p $out/${path} 225 + cp --no-preserve=mode --reflink=auto -rfT ${drv} $out/${path} 226 + '') namedSourceDerivations) 227 + ) 228 + )
-55
pkgs/by-name/ze/zed-editor/0002-disable-livekit-darwin.patch
··· 1 - diff --git a/crates/live_kit_client/Cargo.toml b/crates/live_kit_client/Cargo.toml 2 - index e23c63453e..d0142b83d8 100644 3 - --- a/crates/live_kit_client/Cargo.toml 4 - +++ b/crates/live_kit_client/Cargo.toml 5 - @@ -40,10 +40,10 @@ nanoid = { workspace = true, optional = true} 6 - parking_lot.workspace = true 7 - postage.workspace = true 8 - 9 - -[target.'cfg(target_os = "macos")'.dependencies] 10 - +[target.'cfg(target_os = "none")'.dependencies] 11 - core-foundation.workspace = true 12 - 13 - -[target.'cfg(all(not(target_os = "macos")))'.dependencies] 14 - +[target.'cfg(all(not(target_os = "none")))'.dependencies] 15 - async-trait = { workspace = true } 16 - collections = { workspace = true } 17 - gpui = { workspace = true } 18 - diff --git a/crates/live_kit_client/build.rs b/crates/live_kit_client/build.rs 19 - index 2fdfd982bf..7272614b87 100644 20 - --- a/crates/live_kit_client/build.rs 21 - +++ b/crates/live_kit_client/build.rs 22 - @@ -36,7 +36,7 @@ const MACOS_TARGET_VERSION: &str = "10.15.7"; 23 - 24 - fn main() { 25 - if cfg!(all( 26 - - target_os = "macos", 27 - + target_os = "none", 28 - not(any(test, feature = "test-support", feature = "no-webrtc")), 29 - )) { 30 - let swift_target = get_swift_target(); 31 - diff --git a/crates/live_kit_client/src/live_kit_client.rs b/crates/live_kit_client/src/live_kit_client.rs 32 - index 4820a4eedb..6179e6c55a 100644 33 - --- a/crates/live_kit_client/src/live_kit_client.rs 34 - +++ b/crates/live_kit_client/src/live_kit_client.rs 35 - @@ -2,16 +2,16 @@ 36 - 37 - use std::sync::Arc; 38 - 39 - -#[cfg(all(target_os = "macos", not(any(test, feature = "test-support"))))] 40 - +#[cfg(all(target_os = "none", not(any(test, feature = "test-support"))))] 41 - pub mod prod; 42 - 43 - -#[cfg(all(target_os = "macos", not(any(test, feature = "test-support"))))] 44 - +#[cfg(all(target_os = "none", not(any(test, feature = "test-support"))))] 45 - pub use prod::*; 46 - 47 - -#[cfg(any(test, feature = "test-support", not(target_os = "macos")))] 48 - +#[cfg(any(test, feature = "test-support", not(target_os = "none")))] 49 - pub mod test; 50 - 51 - -#[cfg(any(test, feature = "test-support", not(target_os = "macos")))] 52 - +#[cfg(any(test, feature = "test-support", not(target_os = "none")))] 53 - pub use test::*; 54 - 55 - pub type Sid = String;
+41 -27
pkgs/by-name/ze/zed-editor/package.nix
··· 35 35 darwinMinVersionHook, 36 36 makeWrapper, 37 37 nodejs_22, 38 + libGL, 39 + libX11, 40 + libXext, 41 + livekit-libwebrtc, 38 42 39 43 withGLES ? false, 40 44 }: ··· 89 93 in 90 94 rustPlatform.buildRustPackage rec { 91 95 pname = "zed-editor"; 92 - version = "0.165.4"; 96 + version = "0.166.1"; 93 97 94 98 src = fetchFromGitHub { 95 99 owner = "zed-industries"; 96 100 repo = "zed"; 97 - rev = "refs/tags/v${version}"; 98 - hash = "sha256-g+ZHchlxeNDkxUM306OK3BsjrvO3snF4vcQQZJSIhLc="; 101 + tag = "v${version}"; 102 + hash = "sha256-ss4dz9qPAP6eIYbG3S5QJaSR5zEyEqLBjfacj/eb7AE="; 99 103 }; 100 104 101 - patches = 102 - [ 103 - # Zed uses cargo-install to install cargo-about during the script execution. 104 - # We provide cargo-about ourselves and can skip this step. 105 - # Until https://github.com/zed-industries/zed/issues/19971 is fixed, 106 - # we also skip any crate for which the license cannot be determined. 107 - ./0001-generate-licenses.patch 108 - ] 109 - ++ lib.optionals stdenv.hostPlatform.isDarwin [ 110 - # The Swift variant of livekit currently used inside Zed requires 111 - # Swift 6, which is not available in nixpkgs yet: 112 - # https://github.com/NixOS/nixpkgs/issues/343210 113 - # The Rust variant of livekit for Zed is still pending and there is no 114 - # schedule when it will be finished: 115 - # https://github.com/zed-industries/zed/pull/13343 116 - ./0002-disable-livekit-darwin.patch 117 - ]; 105 + patches = [ 106 + # Zed uses cargo-install to install cargo-about during the script execution. 107 + # We provide cargo-about ourselves and can skip this step. 108 + # Until https://github.com/zed-industries/zed/issues/19971 is fixed, 109 + # we also skip any crate for which the license cannot be determined. 110 + ./0001-generate-licenses.patch 111 + # See https://github.com/zed-industries/zed/pull/21661#issuecomment-2524161840 112 + "script/patches/use-cross-platform-livekit.patch" 113 + ]; 114 + 115 + postPatch = 116 + lib.optionalString stdenv.hostPlatform.isLinux '' 117 + # Dynamically link WebRTC instead of static 118 + substituteInPlace ../${pname}-${version}-vendor/webrtc-sys-*/build.rs \ 119 + --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=dylib=webrtc" 120 + '' 121 + + lib.optionalString stdenv.hostPlatform.isDarwin '' 122 + # On Darwin, linking against the dylib results in Rust linker errors, while 123 + # linking against the framework works fine. 124 + substituteInPlace ../${pname}-${version}-vendor/webrtc-sys-*/build.rs \ 125 + --replace-fail "cargo:rustc-link-lib=static=webrtc" "cargo:rustc-link-lib=framework=webrtc" \ 126 + --replace-fail 'println!("cargo:rustc-link-search=native={}", webrtc_lib.to_str().unwrap());' \ 127 + 'println!("cargo:rustc-link-search=framework={}/Library/Frameworks", webrtc_dir.to_str().unwrap());' 128 + ''; 118 129 119 130 useFetchCargoVendor = true; 120 - cargoHash = "sha256-ZNXvuHX9b3T58FUs9TjpfiGYNr9J3IDbz2JE6Vy7Sg0="; 131 + cargoHash = "sha256-HbOdY+6FKGTK5gW2BkWSdciBvTx+oKhCchFvwKEoGNE="; 121 132 122 133 nativeBuildInputs = 123 134 [ ··· 151 162 libxkbcommon 152 163 wayland 153 164 xorg.libxcb 165 + # required by livekit: 166 + libGL 167 + libX11 168 + libXext 154 169 ] 155 170 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 156 171 apple-sdk_15 157 - # This will need to be increased to 12.3 once 158 - # https://github.com/zed-industries/zed/pull/13343 159 - # is merged and released, as ScreenCaptureKit is only available on 12.3 and up: 172 + # ScreenCaptureKit, required by livekit, is only available on 12.3 and up: 160 173 # https://developer.apple.com/documentation/screencapturekit 161 - (darwinMinVersionHook "10.15") 174 + (darwinMinVersionHook "12.3") 162 175 ]; 163 176 164 177 cargoBuildFlags = [ ··· 183 196 ZED_UPDATE_EXPLANATION = "Zed has been installed using Nix. Auto-updates have thus been disabled."; 184 197 # Used by `zed --version` 185 198 RELEASE_VERSION = version; 199 + LK_CUSTOM_WEBRTC = livekit-libwebrtc; 186 200 }; 187 201 188 202 RUSTFLAGS = if withGLES then "--cfg gles" else ""; ··· 286 300 passthru = { 287 301 updateScript = gitUpdater { 288 302 rev-prefix = "v"; 289 - ignoredVersions = "pre"; 303 + ignoredVersions = "(*-pre|0.999999.0|0.9999-temporary)"; 290 304 }; 291 305 fhs = fhs { }; 292 306 fhsWithPackages = f: fhs { additionalPkgs = f; }; ··· 295 309 meta = { 296 310 description = "High-performance, multiplayer code editor from the creators of Atom and Tree-sitter"; 297 311 homepage = "https://zed.dev"; 298 - changelog = "https://github.com/zed-industries/zed/releases/tag/v${version}"; 312 + changelog = "https://github.com/zed-industries/zed/releases/tag/${src.tag}"; 299 313 license = lib.licenses.gpl3Only; 300 314 maintainers = with lib.maintainers; [ 301 315 GaetanLepage