nix: fix not opening issue on Sway Linux

This commit is contained in:
hellodword 2024-05-17 02:25:00 +00:00
parent ab1e8d956c
commit ecc2d7389d
No known key found for this signature in database
GPG Key ID: 094D44EBA7DBAE80

View File

@ -16,7 +16,18 @@ with import <nixpkgs>
};
let
x11libs = lib.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXrandr xorg.libXi libglvnd vulkan-loader vulkan-validation-layers libxkbcommon ];
graphicLibs = lib.makeLibraryPath [
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
libglvnd
vulkan-loader
vulkan-validation-layers
libxkbcommon
wayland
];
rustc = (rust-bin.fromRustupToolchainFile ./rust-toolchain).override {
targets = [ ] ++
(lib.optionals (stdenv.isLinux && use_android) [
@ -70,7 +81,7 @@ mkShell ({
} // (
lib.optionalAttrs (!stdenv.isDarwin) {
LD_LIBRARY_PATH = "${x11libs}";
LD_LIBRARY_PATH = "${graphicLibs}";
}
) // (
lib.optionalAttrs use_android (