Fix flake.nix for nixos
This commit is contained in:
parent
f7a3d883c6
commit
3208f62b4a
2 changed files with 17 additions and 5 deletions
2
.envrc
2
.envrc
|
@ -1 +1 @@
|
||||||
use flake --impure
|
use flake
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -30,6 +30,13 @@
|
||||||
cargo = rust;
|
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 ]
|
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.isLinux (with pkgs; [ libxkbcommon wayland libGL ])
|
||||||
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin (with pkgs; [ darwin.apple_sdk.frameworks.SystemConfiguration ]);
|
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isDarwin (with pkgs; [ darwin.apple_sdk.frameworks.SystemConfiguration ]);
|
||||||
|
@ -37,10 +44,15 @@
|
||||||
{
|
{
|
||||||
devShells = {
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
inherit nativeBuildInputs;
|
||||||
(rust.override { extensions = ["rust-src" "rust-analyzer"]; })
|
|
||||||
pkg-config
|
buildInputs = libs;
|
||||||
];
|
|
||||||
|
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; [ libxkbcommon wayland libGL ]);
|
||||||
|
};
|
||||||
|
|
||||||
|
with_compatibility = pkgs.mkShell {
|
||||||
|
inherit nativeBuildInputs;
|
||||||
|
|
||||||
buildInputs = libs ++ [
|
buildInputs = libs ++ [
|
||||||
pkgs.nixgl.auto.nixVulkanNvidia pkgs.nixgl.nixVulkanIntel
|
pkgs.nixgl.auto.nixVulkanNvidia pkgs.nixgl.nixVulkanIntel
|
||||||
|
|
Loading…
Reference in a new issue