Fix flake.nix for nixos

This commit is contained in:
Florian RICHER 2024-12-22 23:35:39 +01:00
parent f7a3d883c6
commit 3208f62b4a
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
2 changed files with 17 additions and 5 deletions

2
.envrc
View file

@ -1 +1 @@
use flake --impure
use flake

View file

@ -30,6 +30,13 @@
cargo = rust;
});
nativeBuildInputs = with pkgs; [
(rust.override { extensions = ["rust-src" "rust-analyzer"]; })
pkg-config
cmake
python312
];
libs = with pkgs; [ vulkan-headers vulkan-loader vulkan-validation-layers ]
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux (with pkgs; [ libxkbcommon wayland libGL ])
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin (with pkgs; [ darwin.apple_sdk.frameworks.SystemConfiguration ]);
@ -37,10 +44,15 @@
{
devShells = {
default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
(rust.override { extensions = ["rust-src" "rust-analyzer"]; })
pkg-config
];
inherit nativeBuildInputs;
buildInputs = libs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [ libxkbcommon wayland libGL ]);
};
with_compatibility = pkgs.mkShell {
inherit nativeBuildInputs;
buildInputs = libs ++ [
pkgs.nixgl.auto.nixVulkanNvidia pkgs.nixgl.nixVulkanIntel