Skip to content

Commit 05273a9

Browse files
committed
update linux_dependencies.md for NixOS(and nix)
1 parent b9123e7 commit 05273a9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/linux_dependencies.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ mkShell rec {
122122
pkg-config
123123
];
124124
buildInputs = [
125-
udev alsa-lib vulkan-loader
125+
udev alsa-lib-with-plugins vulkan-loader
126126
xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature
127127
libxkbcommon wayland # To use the wayland feature
128128
];
@@ -134,6 +134,13 @@ And enter it by just running `nix-shell`.
134134
You should be able compile Bevy programs using `cargo run` within this nix-shell.
135135
You can do this in one line with `nix-shell --run "cargo run"`.
136136

137+
If running nix on a non NixOS system (such as ubuntu, arch etc.), [NixGL](https://github.com/nix-community/nixGL) is additionally required,
138+
to link graphics drivers into the context of software installed by nix:
139+
140+
1. Install an appropriate nixGL wrapper ([docs](https://github.com/nix-community/nixGL)).
141+
2. Run `nixGL cargo run` to compile a bevy program. The default `nixGL` often doesn't work,
142+
and has to be replaced with a system specific wrapper, for instance: `nixVulkanNvidia` or `nixGLNvidia`.
143+
137144
This is also possible with [Nix flakes](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html).
138145
Instead of creating `shell.nix`, you just need to add the derivation (`mkShell`)
139146
to your `devShells` in `flake.nix`. Run `nix develop` to enter the shell and

0 commit comments

Comments
 (0)