Merge pull request #321516 from lukaslihotzki/zed-gles

zed-editor: add withGLES flag
This commit is contained in:
Thiago Kenji Okada 2024-06-23 02:41:59 +01:00 committed by GitHub
commit 2b593f5750
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,13 +18,18 @@
alsa-lib,
libxkbcommon,
wayland,
libglvnd,
xorg,
stdenv,
darwin,
makeFontsConf,
vulkan-loader,
withGLES ? false
}:
assert withGLES -> stdenv.isLinux;
rustPlatform.buildRustPackage rec {
pname = "zed";
version = "0.137.6";
@ -123,8 +128,11 @@ rustPlatform.buildRustPackage rec {
};
};
RUSTFLAGS = if withGLES then "--cfg gles" else "";
gpu-lib = if withGLES then libglvnd else vulkan-loader;
postFixup = lib.optionalString stdenv.isLinux ''
patchelf --add-rpath ${vulkan-loader}/lib $out/bin/*
patchelf --add-rpath ${gpu-lib}/lib $out/bin/*
patchelf --add-rpath ${wayland}/lib $out/bin/*
'';