mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
nix: Fix screen-casting when building Zed with nix (#52690)
Release Notes: - Fixed screen-casting when building Zed with Nix.
This commit is contained in:
parent
3060e4170e
commit
a17a1c10c8
2 changed files with 13 additions and 4 deletions
|
|
@ -77,6 +77,7 @@ let
|
|||
builtins.elem firstComp topLevelIncludes;
|
||||
|
||||
craneLib = crane.overrideToolchain rustToolchain;
|
||||
gpu-lib = if withGLES then libglvnd else vulkan-loader;
|
||||
commonArgs =
|
||||
let
|
||||
zedCargoLock = builtins.fromTOML (builtins.readFile ../crates/zed/Cargo.toml);
|
||||
|
|
@ -178,8 +179,8 @@ let
|
|||
libva
|
||||
libxkbcommon
|
||||
wayland
|
||||
gpu-lib
|
||||
libglvnd
|
||||
vulkan-loader
|
||||
xorg.libX11
|
||||
xorg.libxcb
|
||||
libdrm
|
||||
|
|
@ -236,8 +237,7 @@ let
|
|||
# about them that's special is that they're manually dlopened at runtime
|
||||
NIX_LDFLAGS = lib.optionalString stdenv'.hostPlatform.isLinux "-rpath ${
|
||||
lib.makeLibraryPath [
|
||||
libglvnd
|
||||
vulkan-loader
|
||||
gpu-lib
|
||||
wayland
|
||||
libva
|
||||
]
|
||||
|
|
@ -246,7 +246,7 @@ let
|
|||
NIX_OUTPATH_USED_AS_RANDOM_SEED = "norebuilds";
|
||||
};
|
||||
|
||||
# prevent nix from removing the "unused" wayland rpaths
|
||||
# prevent nix from removing the "unused" wayland/gpu-lib rpaths
|
||||
dontPatchELF = stdenv'.hostPlatform.isLinux;
|
||||
|
||||
# TODO: try craneLib.cargoNextest separate output
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue