diff --git a/.envrc b/.envrc index 2f8e1d3..3550a30 100644 --- a/.envrc +++ b/.envrc @@ -1 +1 @@ -use flake --impure +use flake diff --git a/flake.nix b/flake.nix index 624590d..8386939 100644 --- a/flake.nix +++ b/flake.nix @@ -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