[Merged by Bors] - Update and simplify NixOS documentation#1495
Closed
turboMaCk wants to merge 1 commit intobevyengine:mainfrom
Closed
[Merged by Bors] - Update and simplify NixOS documentation#1495turboMaCk wants to merge 1 commit intobevyengine:mainfrom
turboMaCk wants to merge 1 commit intobevyengine:mainfrom
Conversation
turboMaCk
commented
Feb 21, 2021
turboMaCk
commented
Feb 21, 2021
turboMaCk
commented
Feb 21, 2021
docs/linux_dependencies.md
Outdated
Comment on lines
62
to
82
| `nix-shell -p cargo pkgconfig udev alsaLib x11 xorg.libXcursor xorg.libXrandr xorg.libXi vulkan-tools lutris vulkan-headers vulkan-loader vulkan-validation-layers` | ||
|
|
||
| Alternatively, you can copy the following code block and create a file called `shell.nix`. You can now enter nix-shell just by running `nix-shell`. | ||
| Alternatively, you can define `shell.nix` and enther it by running `nix-shell`. | ||
|
|
||
| ```nix | ||
| # shell.nix | ||
| $ cat > shell.nix <<EOF | ||
|
|
||
| { pkgs ? import <nixpkgs> { } }: | ||
|
|
||
| pkgs.mkShell { | ||
| with pkgs; | ||
| mkShell { | ||
| buildInputs = [ | ||
| pkgs.alsaLib | ||
| pkgs.lutris | ||
| pkgs.pkgconfig | ||
| pkgs.vulkan-headers | ||
| pkgs.vulkan-loader | ||
| pkgs.vulkan-tools | ||
| pkgs.vulkan-validation-layers | ||
| pkgs.x11 | ||
| pkgs.xorg.libXcursor | ||
| pkgs.xorg.libXi | ||
| pkgs.xorg.libXrandr | ||
| cargo | ||
| pkgconfig udev alsaLib | ||
| x11 xorg.libXcursor xorg.libXrandr xorg.libXi | ||
| vulkan-tools lutris vulkan-headers vulkan-loader vulkan-validation-layers | ||
| ]; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
here cargo and udev were added. NixOS is all about having explicit dependencies so assuming there is no global installation of cargo and udev seems to be more natural. I also shrieked related stuff into single lines so we don't take so excessive amount of lines within this document.
turboMaCk
commented
Feb 21, 2021
Comment on lines
-89
to
-92
| 1. `find target -type f -name glslang_validator` in order to find glslang_validator in `target/debug/build/bevy-glsl-to-spirv-<hash>/out/glslang_validator`. The directory containing glslang_validator will be referenced again, so save it for later: `export OUT_DIR="$(dirname $(find target -type f -name glslang_validator))"`. | ||
| 2. Running `ldd $OUT_DIR/glslang_validator` may show `libstdc++.so.6` is not found. If all dependencies are found, then bevy should work. If not, install (globally or in nix-shell) any of the results found by `nix-locate -w libstdc++.so.6`. For example purposes, consider `nixos.gcc-unwrapped`. In theory, any of the ones in `find -L /nix/store -type f -name libstdc++.so.6` will work. | ||
| 3. `patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath /nix/store/784rh7jrfhagbkydjfrv68h9x3g4gqmk-gcc-8.3.0-lib/lib $OUT_DIR/glslang_validator` | ||
| 4. Bevy should now be working correctly! |
Contributor
Author
There was a problem hiding this comment.
these are no longer needed
DJMcNab
approved these changes
Feb 23, 2021
Member
DJMcNab
left a comment
There was a problem hiding this comment.
Seems good, just a few small thoughts.
Please also look at the CI results for markdownlint, and fix those issues.
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
Member
|
I've never used NixOS, so I'll just defer to others here 😄 |
Member
|
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Mar 3, 2021
Some updates and simplifications to the NixOS specific part of documentation.
Contributor
|
Pull request successfully merged into main. Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some updates and simplifications to the NixOS specific part of documentation.