Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create shell.nix for quick Nix(OS) setup #440

Merged
merged 2 commits into from
Jul 12, 2023
Merged

Create shell.nix for quick Nix(OS) setup #440

merged 2 commits into from
Jul 12, 2023

Conversation

MultisampledNight
Copy link
Contributor

@MultisampledNight MultisampledNight commented Jul 6, 2023

This allows nix or NixOS users to just run nix-shell in the repo and get almost everything listed in the getting started guide up and running automagically. Worth noting that following steps need to be taken manually:

  • Git LFS needs to be set up manually, if it's not installed user-wide already.
  • The Android SDK license has to be accepted manually. If you run nix-shell the first time in this repo, it'll error, print the license and tell you how to accept it (through nixpkgs configuration).
  • Most likely you'll need to set up udev rules for Android. This is also on the system level, though if on NixOS, setting programs.adb.enable = true; and adding your user to the adbusers group suffices, see the Android page in the inofficial wiki.
  • For the simulator, there needs to be a working Vulkan setup. This is configured on the system level and also a bit manufacturer-dependent, though if on NixOS, following the advice in the manual (https://nixos.org/manual/nixos/stable/index.html#sec-gpu-accel-vulkan) did the job for me.

Adding --package crab-saber to the cargo apk command was required for me to get it even running, else it complained about not being sure which workspace member to pick.

Note: Since I have no VR device, Android deployment was tested using my mobile phone. I did observe the app building and launching on my phone, however, it gave no display output (but errored still just fine and displayed that on the host PC).

@MultisampledNight
Copy link
Contributor Author

(I'd add the documentation to the wiki after merge.)

@MultisampledNight
Copy link
Contributor Author

clippy failure seems unrelated to the changes made.

Copy link
Collaborator

@kanerogers kanerogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this @MultisampledNight ! Yeah, don't worry about the clippy stuff, that's clearly unrelated.

I don't have access to a nix environment to test this, but given the small impact of a change like this, I'm happy to merge this in for now and address any issues if they arise.

@kanerogers kanerogers merged commit 8e7dc73 into leetvr:main Jul 12, 2023
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants