forked from pupbrained/vulkan-test
bleh
This commit is contained in:
parent
95eafb2432
commit
3b3cb5bec3
3
.envrc
3
.envrc
|
@ -1,2 +1 @@
|
|||
export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1
|
||||
use_flake . --impure
|
||||
use_flake
|
||||
|
|
39
flake.nix
39
flake.nix
|
@ -20,7 +20,7 @@
|
|||
|
||||
stdenv =
|
||||
if pkgs.hostPlatform.isLinux
|
||||
then pkgs.stdenvAdapters.useMoldLinker pkgs.llvmPackages_18.stdenv
|
||||
then pkgs.stdenvAdapters.useMoldLinker pkgs.llvmPackages_18.libcxxStdenv
|
||||
else pkgs.llvmPackages_18.stdenv;
|
||||
|
||||
sources = import ./_sources/generated.nix {
|
||||
|
@ -34,19 +34,17 @@
|
|||
|
||||
fmt = mkPkg "fmt";
|
||||
|
||||
deps = with pkgs;
|
||||
[
|
||||
fmt
|
||||
glfw
|
||||
glm
|
||||
vulkan-tools
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.AppKit
|
||||
darwin.apple_sdk.frameworks.Cocoa
|
||||
darwin.apple_sdk.frameworks.Metal
|
||||
darwin.apple_sdk.frameworks.QuartzCore
|
||||
];
|
||||
deps = with pkgs; [
|
||||
fmt
|
||||
glfw
|
||||
glm
|
||||
vulkan-extension-layer
|
||||
vulkan-memory-allocator
|
||||
vulkan-utility-libraries
|
||||
vulkan-headers
|
||||
vulkan-loader
|
||||
vulkan-tools
|
||||
];
|
||||
in
|
||||
with pkgs; rec {
|
||||
packages = rec {
|
||||
|
@ -88,7 +86,7 @@
|
|||
|
||||
clang-format = {
|
||||
enable = true;
|
||||
package = pkgs.clang-tools_18;
|
||||
package = pkgs.llvmPackages_18.clang-tools;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -98,7 +96,7 @@
|
|||
[
|
||||
alejandra
|
||||
bear
|
||||
llvmPackages_18.clang-tools
|
||||
(llvmPackages_18.clang-tools.override {enableLibcxx = true;})
|
||||
lldb
|
||||
meson
|
||||
ninja
|
||||
|
@ -113,13 +111,8 @@
|
|||
]
|
||||
++ deps;
|
||||
|
||||
shellHook = lib.optionals stdenv.isDarwin ''
|
||||
export MOLTENVK_LIBRARY_PATH="${darwin.moltenvk}/lib"
|
||||
export PATH="${llvmPackages_18.clang-tools}/bin:$PATH"
|
||||
export VK_ICD_FILENAMES="${darwin.moltenvk}/share/vulkan/icd.d/MoltenVK_icd.json"
|
||||
export VK_LAYER_PATH="${vulkan-validation-layers}/share/vulkan/explicit_layer.d"
|
||||
export VULKAN_INCLUDE_DIRS="${darwin.moltenvk.dev}/include:${vulkan-headers}/include"
|
||||
export VK_LOADER_DEBUG=all
|
||||
shellHook = ''
|
||||
export PATH="${llvmPackages_18.clang-tools.override {enableLibcxx = true;}}/bin:$PATH"
|
||||
'';
|
||||
|
||||
name = "C++";
|
||||
|
|
|
@ -5,6 +5,7 @@ project(
|
|||
default_options: [
|
||||
'cpp_std=c++20',
|
||||
'warning_level=everything',
|
||||
'buildtype=debugoptimized'
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -23,11 +24,9 @@ common_cpp_args = [
|
|||
'-Wno-unsafe-buffer-usage',
|
||||
'-Wunused-function',
|
||||
'-fvisibility=hidden',
|
||||
'-stdlib=libc++'
|
||||
]
|
||||
|
||||
add_project_arguments(cpp.get_supported_arguments(common_cpp_args), language: 'cpp')
|
||||
add_project_arguments('-stdlib=libc++', language: 'cpp')
|
||||
|
||||
source_file_names = [
|
||||
'src/main.cpp',
|
||||
|
|
Loading…
Reference in a new issue