wgpu_compute_shader/default.nix
Julius Koskela 0d701a49b6
🔧 Make nix develop work
Signed-off-by: Julius Koskela <julius.koskela@unikie.com>
2023-12-23 02:41:35 +02:00

42 lines
958 B
Nix

{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;
};
}