This commit is contained in:
Mars 2024-10-18 19:10:11 -04:00
parent 0caa990a93
commit e2eec3fbeb
Signed by: 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; IMGUI_BUILD_VULKAN_BINDING = true;
}; };
deps = with pkgs; deps = with pkgs; [
[ fmt
fmt glfw
glfw glm
glm imgui
glslang shaderc.out
imgui shaderc.dev
vulkan-extension-layer shaderc.lib
vulkan-memory-allocator shaderc.static
vulkan-utility-libraries vulkan-extension-layer
vulkan-loader vulkan-memory-allocator
vulkan-tools vulkan-utility-libraries
] vulkan-loader
++ (with pkgsStatic; [ vulkan-tools
spirv-tools ];
spirv-cross
spirv-headers
]);
in in
with pkgs; rec { with pkgs; rec {
packages = rec { packages = rec {
@ -108,7 +105,7 @@
}; };
}; };
devShell = mkShell.override {inherit stdenv;} rec { devShell = mkShell.override {inherit stdenv;} {
buildInputs = buildInputs =
[ [
alejandra alejandra
@ -130,7 +127,6 @@
] ]
++ deps; ++ deps;
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
VULKAN_SDK = "${vulkan-headers}"; VULKAN_SDK = "${vulkan-headers}";
VK_LAYER_PATH = "${vulkan-validation-layers}/share/vulkan/explicit_layer.d"; VK_LAYER_PATH = "${vulkan-validation-layers}/share/vulkan/explicit_layer.d";
VK_ICD_FILENAMES = VK_ICD_FILENAMES =

View file

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

1
result-static Symbolic link
View file

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