Compare commits

..

1 Commits
v0.0.1 ... main

Author SHA1 Message Date
Sijmen 3e31d79107
Add shell.nix
continuous-integration/drone/push Build is failing Details
continuous-integration/drone Build is failing Details
2022-08-22 21:47:49 +02:00
1 changed files with 33 additions and 0 deletions

33
shell.nix Normal file
View File

@ -0,0 +1,33 @@
let
pkgs = import <nixpkgs> {};
log_level = "info";
in
pkgs.mkShell {
buildInputs = with pkgs; [
rustc cargo rustfmt rust-analyzer cargo-outdated clippy
# Needed by cargo dependencies.
cmake gcc zlib pkgconfig openssl
# wgpu graphics dependencies
vulkan-loader vulkan-tools
xorg.libXcursor xorg.libXi xorg.libXrandr
# Linker
lld
cargo-outdated
];
shellHook = ''
# Dynamic linking for Vulkan stuff for wgpu graphics
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${
with pkgs; pkgs.lib.makeLibraryPath [ vulkan-loader openssl zlib ]
}"
'';
RUST_BACKTRACE = "1";
RUSTFLAGS = "-C link-arg=-fuse-ld=lld";
RUST_LOG = "calx-ecs=${log_level},vitral=${log_level},calx=${log_level},display=${log_level},world=${log_level},magog=${log_level}";
}