Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
nix: Fix screen-casting when building Zed with nix (#52690)
Jakub Konkaa17a1c10c875
diff --git a/nix/build.nix b/nix/build.nixindex 02ed6235e54..9270abbe6f7 100644--- a/nix/build.nix+++ b/nix/build.nix@@ -77,6 +77,7 @@ letbuiltins.elem firstComp topLevelIncludes;craneLib = crane.overrideToolchain rustToolchain;+ gpu-lib = if withGLES then libglvnd else vulkan-loader;commonArgs =letzedCargoLock = builtins.fromTOML (builtins.readFile ../crates/zed/Cargo.toml);@@ -178,8 +179,8 @@ letlibvalibxkbcommonwayland+ gpu-liblibglvnd- vulkan-loaderxorg.libX11xorg.libxcblibdrm@@ -236,8 +237,7 @@ let# about them that's special is that they're manually dlopened at runtimeNIX_LDFLAGS = lib.optionalString stdenv'.hostPlatform.isLinux "-rpath ${lib.makeLibraryPath [- libglvnd- vulkan-loader+ gpu-libwaylandlibva]@@ -246,7 +246,7 @@ letNIX_OUTPATH_USED_AS_RANDOM_SEED = "norebuilds";};- # prevent nix from removing the "unused" wayland rpaths+ # prevent nix from removing the "unused" wayland/gpu-lib rpathsdontPatchELF = stdenv'.hostPlatform.isLinux;# TODO: try craneLib.cargoNextest separate outputdiff --git a/nix/livekit-libwebrtc/package.nix b/nix/livekit-libwebrtc/package.nixindex dd7b5808ac6..4c0d9992620 100644--- a/nix/livekit-libwebrtc/package.nix+++ b/nix/livekit-libwebrtc/package.nix@@ -81,6 +81,15 @@ stdenv.mkDerivation {pname = "livekit-libwebrtc";version = "137-unstable-2025-11-24";+ # libwebrtc loads libEGL/libGL at runtime via dlopen() in the Wayland+ # screencast path, so they are not visible as ordinary DT_NEEDED edges.+ # Keep an explicit rpath so the shared object can resolve them at runtime.+ NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux+ "-rpath ${lib.makeLibraryPath [ libGL ]}";++ # Prevent fixup from stripping the rpath above as "unused".+ dontPatchELF = stdenv.hostPlatform.isLinux;+gclientDeps = gclient2nix.importGclientDeps ./sources.json;sourceRoot = "src";