Skip to content

Commit

Permalink
Add shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Jan 21, 2024
1 parent 4ced0e9 commit bfc92ca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
with import <nixpkgs> { };
let
dlopen-libs = with xorg; [ vulkan-loader libX11 libXcursor libXrandr libXi ];
in mkShell {
nativeBuildInputs = with pkgs; [ rustChannels.stable.rust pkg-config zstd protobuf ];
shellHook = ''
export RUST_BACKTRACE=1
export ZSTD_SYS_USE_PKG_CONFIG=1
export SHADERC_LIB_DIR="${shaderc.static}/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${lib.makeLibraryPath dlopen-libs}"
#export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
export XDG_DATA_DIRS="$XDG_DATA_DIRS:${vulkan-validation-layers}/share"
export RUST_LOG=client=trace,server=trace,common=trace,vulkan=info
'';
}

0 comments on commit bfc92ca

Please sign in to comment.