bluenoise-raytracer/flake.nix
2024-05-10 15:45:27 +02:00

66 lines
1.6 KiB
Nix

{
description = "Nix flake for developing with vulkan and cpp";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
allSystems = [
"x86_64-linux" # 64bit AMD/Intel x86
];
forAllSystems = fn:
nixpkgs.lib.genAttrs allSystems
(system: fn { pkgs = import nixpkgs { inherit system; }; });
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
name = "vulkan CPP dev shell";
# gcc appears to be broken
nativeBuildInputs = with pkgs ;[
(hiPrio clang-tools.override {
llvmPackages = llvmPackages_16;
enableLibcxx = false;
})
# CPP deps
clang-tools
glm
cmake
# Vulkan Deps
vulkan-tools
vulkan-headers
vulkan-loader
vulkan-validation-layers
shaderc
shaderc.dev
shaderc.lib
shaderc.bin
shaderc.static
glslang
# X11 Deps
xorg.libX11
xorg.libXi
xorg.libXxf86vm
xorg.libXrandr
xorg.libXinerama
xorg.libXcursor
glfw
# Wayland deps
glfw-wayland
waylandpp
wayland
# dev tools
valgrind
# general deps
imgui
];
# TODO: include deps depending on XDG_SESSION_TYPE here (wayland vs X11)
};
});
};
}