{pkgs}: let manifest = (pkgs.lib.importTOML ./Cargo.toml).package; buildInputs = with pkgs; [ udev alsa-lib vulkan-loader vulkan-headers vulkan-tools vulkan-validation-layers xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature libxkbcommon wayland # To use the wayland feature ]; in pkgs.rustPlatform.buildRustPackage { inherit buildInputs; pname = manifest.name; version = manifest.version; src = pkgs.lib.cleanSource ./.; nativeBuildInputs = with pkgs; [ pkg-config ]; preConfigure = '' LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath buildInputs} ''; LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs; cargoBuildFlags = ["--release"]; cargoLock = { lockFile = ./Cargo.lock; allowBuiltinFetchGit = true; }; }