52 lines
1.6 KiB
Nix
52 lines
1.6 KiB
Nix
{pkgs}:
|
|
with pkgs; let
|
|
build = pkgs.callPackage ./default.nix {};
|
|
in
|
|
mkShell {
|
|
inherit build;
|
|
packages = [
|
|
libX11
|
|
libXcursor
|
|
libXrandr
|
|
libXi
|
|
vulkan-headers
|
|
vulkan-loader
|
|
vulkan-validation-layers
|
|
vulkan-tools
|
|
pkg-config
|
|
git
|
|
gcc
|
|
gnumake
|
|
cmake
|
|
glibc
|
|
python3
|
|
shaderc
|
|
];
|
|
|
|
inputsFrom = [
|
|
cmake
|
|
shaderc
|
|
];
|
|
|
|
RUST_BACKTRACE = "1";
|
|
LD_LIBRARY_PATH="${pkgs.libX11}/lib:${pkgs.libXcursor}/lib:${pkgs.libXrandr}/lib:${pkgs.libXi}/lib:${pkgs.vulkan-loader}/lib:${pkgs.vulkan-validation-layers}/lib:${pkgs.vulkan-tools}/lib:${pkgs.vulkan-headers}/lib:${pkgs.stdenv.cc.cc.lib}:${pkgs.stdenv.cc.cc.lib64}:$LD_LIBRARY_PATH";
|
|
|
|
cargoBuildFlags = ["--release --features build-from-source"];
|
|
|
|
shellHook = ''
|
|
export VK_ICD_FILENAMES=${vulkan-loader}/share/vulkan/icd.d/radeon_icd64.json
|
|
export VK_LAYER_PATH=${vulkan-validation-layers}/share/vulkan/explicit_layer.d
|
|
export VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
|
|
export VK_DEVICE_LAYERS=VK_LAYER_KHRONOS_validation
|
|
export VK_LOADER_DEBUG=all
|
|
export VK_LOADER_DEBUG_FILE=/tmp/vulkan.log
|
|
export VK_INSTANCE_EXTENSIONS=VK_EXT_debug_utils
|
|
export VK_DEVICE_EXTENSIONS=VK_EXT_debug_utils
|
|
export VK_LAYER_ENABLES=VK_LAYER_KHRONOS_validation
|
|
export VK_LAYER_DISABLES=VK_LAYER_LUNARG_api_dump
|
|
export VK_LAYER_PATH=${vulkan-validation-layers}/share/vulkan/explicit_layer.d
|
|
|
|
pkg-config --cflags fontconfig fontconfig >= 2.11.1 --libs vulkan
|
|
'';
|
|
}
|