This commit is contained in:
Mars 2024-10-18 19:10:11 -04:00
parent 0caa990a93
commit e2eec3fbeb
Signed by untrusted user: pupbrained
GPG key ID: 0FF5B8826803F895
3 changed files with 20 additions and 40 deletions

View file

@ -45,24 +45,21 @@
IMGUI_BUILD_VULKAN_BINDING = true;
};
deps = with pkgs;
[
deps = with pkgs; [
fmt
glfw
glm
glslang
imgui
shaderc.out
shaderc.dev
shaderc.lib
shaderc.static
vulkan-extension-layer
vulkan-memory-allocator
vulkan-utility-libraries
vulkan-loader
vulkan-tools
]
++ (with pkgsStatic; [
spirv-tools
spirv-cross
spirv-headers
]);
];
in
with pkgs; rec {
packages = rec {
@ -108,7 +105,7 @@
};
};
devShell = mkShell.override {inherit stdenv;} rec {
devShell = mkShell.override {inherit stdenv;} {
buildInputs =
[
alejandra
@ -130,7 +127,6 @@
]
++ deps;
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
VULKAN_SDK = "${vulkan-headers}";
VK_LAYER_PATH = "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
VK_ICD_FILENAMES =

View file

@ -12,14 +12,8 @@ common_cpp_args = [
'-Wno-c++20-extensions',
'-Wno-c++98-compat',
'-Wno-c++98-compat-pedantic',
'-Wno-disabled-macro-expansion',
'-Wno-missing-prototypes',
'-Wno-padded',
'-Wno-pre-c++20-compat-pedantic',
'-Wno-switch-default',
'-Wno-unsafe-buffer-usage',
'-Wunused-function',
'-fvisibility=hidden',
'-Wno-padded',
]
add_project_arguments(cpp.get_supported_arguments(common_cpp_args), language: 'cpp')
@ -29,27 +23,16 @@ deps = [
dependency('glfw3', include_type: 'system'),
dependency('glm', include_type: 'system'),
dependency('vulkan', include_type: 'system'),
dependency('shaderc', include_type: 'system'),
]
spirv_dep = dependency('SPIRV-Tools', required: false, include_type: 'system')
if not spirv_dep.found()
spirv_dep = cpp.find_library('SPIRV-Tools', required: true)
endif
glslang_dep = dependency('glslang', required: false, include_type: 'system')
if not glslang_dep.found()
glslang_dep = cpp.find_library('glslang', required: true)
endif
imgui_dep = dependency('imgui', required: false, include_type: 'system')
if not imgui_dep.found()
imgui_dep = cpp.find_library('imgui', required: true)
endif
deps += [glslang_dep, spirv_dep, imgui_dep]
deps += imgui_dep
executable(
'graphics-test',

1
result-static Symbolic link
View file

@ -0,0 +1 @@
/nix/store/fz1dcf81kwn2gqk8zg3ibiqimmm6j17x-shaderc-2024.0-static