Skip to content

Commit d18ea95

Browse files
SuperSamusinodentry
SuperSamus
authored andcommitted
linux_dependencies: cleanup NixOS (bevyengine#5086)
# Objective Small cleanup to NixOS dependencies. Switched `clang` and `lld` to `bintools` because of [this](https://matklad.github.io/2022/03/14/rpath-or-why-lld-doesnt-work-on-nixos.html).
1 parent 0d23075 commit d18ea95

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

docs/linux_dependencies.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,20 @@ Add a `shell.nix` file to the root of the project containing:
8080
with pkgs; mkShell {
8181
nativeBuildInputs = [
8282
pkgconfig
83-
clang lld # To use lld linker
83+
llvmPackages.bintools # To use lld linker
8484
];
8585
buildInputs = [
8686
udev alsaLib vulkan-loader
8787
xlibsWrapper xorg.libXcursor xorg.libXrandr xorg.libXi # To use x11 feature
8888
libxkbcommon wayland # To use wayland feature
8989
];
90-
shellHook = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath [
91-
udev alsaLib vulkan-loader
92-
libxkbcommon wayland # To use wayland feature
93-
]}"'';
90+
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
9491
}
9592
```
9693

97-
And enter it by just running `nix-shell`. You should be able compile bevy programs using `cargo` within this nix-shell.
94+
And enter it by just running `nix-shell`. You should be able compile Bevy programs using `cargo run` within this nix-shell. You can do this in one line with `nix-shell --run "cargo run"`.
9895

99-
Note that this template does not add Rust to the environment because there are many ways to do it, each with its pros and cons. For example, to use stable Rust from nixpkgs you can add `cargo` to `nativeBuildInputs`.
96+
Note that this template does not add Rust to the environment because there are many ways to do it. For example, to use stable Rust from nixpkgs you can add `cargo` to `nativeBuildInputs`.
10097

10198
## [OpenSUSE](https://www.opensuse.org/)
10299

0 commit comments

Comments
 (0)