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
|
||||||
use_flake . --impure
|
|
||||||
|
|
39
flake.nix
39
flake.nix
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
stdenv =
|
stdenv =
|
||||||
if pkgs.hostPlatform.isLinux
|
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;
|
else pkgs.llvmPackages_18.stdenv;
|
||||||
|
|
||||||
sources = import ./_sources/generated.nix {
|
sources = import ./_sources/generated.nix {
|
||||||
|
@ -34,19 +34,17 @@
|
||||||
|
|
||||||
fmt = mkPkg "fmt";
|
fmt = mkPkg "fmt";
|
||||||
|
|
||||||
deps = with pkgs;
|
deps = with pkgs; [
|
||||||
[
|
fmt
|
||||||
fmt
|
glfw
|
||||||
glfw
|
glm
|
||||||
glm
|
vulkan-extension-layer
|
||||||
vulkan-tools
|
vulkan-memory-allocator
|
||||||
]
|
vulkan-utility-libraries
|
||||||
++ lib.optionals stdenv.isDarwin [
|
vulkan-headers
|
||||||
darwin.apple_sdk.frameworks.AppKit
|
vulkan-loader
|
||||||
darwin.apple_sdk.frameworks.Cocoa
|
vulkan-tools
|
||||||
darwin.apple_sdk.frameworks.Metal
|
];
|
||||||
darwin.apple_sdk.frameworks.QuartzCore
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
with pkgs; rec {
|
with pkgs; rec {
|
||||||
packages = rec {
|
packages = rec {
|
||||||
|
@ -88,7 +86,7 @@
|
||||||
|
|
||||||
clang-format = {
|
clang-format = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.clang-tools_18;
|
package = pkgs.llvmPackages_18.clang-tools;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -98,7 +96,7 @@
|
||||||
[
|
[
|
||||||
alejandra
|
alejandra
|
||||||
bear
|
bear
|
||||||
llvmPackages_18.clang-tools
|
(llvmPackages_18.clang-tools.override {enableLibcxx = true;})
|
||||||
lldb
|
lldb
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
|
@ -113,13 +111,8 @@
|
||||||
]
|
]
|
||||||
++ deps;
|
++ deps;
|
||||||
|
|
||||||
shellHook = lib.optionals stdenv.isDarwin ''
|
shellHook = ''
|
||||||
export MOLTENVK_LIBRARY_PATH="${darwin.moltenvk}/lib"
|
export PATH="${llvmPackages_18.clang-tools.override {enableLibcxx = true;}}/bin:$PATH"
|
||||||
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
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
name = "C++";
|
name = "C++";
|
||||||
|
|
|
@ -5,6 +5,7 @@ project(
|
||||||
default_options: [
|
default_options: [
|
||||||
'cpp_std=c++20',
|
'cpp_std=c++20',
|
||||||
'warning_level=everything',
|
'warning_level=everything',
|
||||||
|
'buildtype=debugoptimized'
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -23,11 +24,9 @@ common_cpp_args = [
|
||||||
'-Wno-unsafe-buffer-usage',
|
'-Wno-unsafe-buffer-usage',
|
||||||
'-Wunused-function',
|
'-Wunused-function',
|
||||||
'-fvisibility=hidden',
|
'-fvisibility=hidden',
|
||||||
'-stdlib=libc++'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
add_project_arguments(cpp.get_supported_arguments(common_cpp_args), language: 'cpp')
|
add_project_arguments(cpp.get_supported_arguments(common_cpp_args), language: 'cpp')
|
||||||
add_project_arguments('-stdlib=libc++', language: 'cpp')
|
|
||||||
|
|
||||||
source_file_names = [
|
source_file_names = [
|
||||||
'src/main.cpp',
|
'src/main.cpp',
|
||||||
|
|
Loading…
Reference in a new issue