mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
Merge pull request #321516 from lukaslihotzki/zed-gles
zed-editor: add withGLES flag
This commit is contained in:
commit
2b593f5750
@ -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/*
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user