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

nix shell w/ npins #772

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

phanirithvij
Copy link

@phanirithvij phanirithvij commented Sep 22, 2024

Add a nix shell script for ease of building.

A simple export NIXPKGS_ALLOW_UNFREE=1; nix-shell and cd processing; ./gradlew dist with only nix as the dependency.

A few minor bugs need to be fixed before testing this pr. ie. depends on #771 (the nonexistent vr/libs dir)

The npins/* is a helper script for nix, generated it via nix-shell -p npins --run "npins init", it can be ignored in review.

Signed-off-by: phanirithvij <[email protected]>
Signed-off-by: phanirithvij <[email protected]>
Signed-off-by: phanirithvij <[email protected]>
@SableRaf
Copy link

SableRaf commented Oct 24, 2024

Hey @phanirithvij, thanks for your contribution! I gave your two PRs a try, but I ran into issues on macOS (M1), so I wasn't able to fully test it. I’m not really knowledgeable about Nix (or processing-android for that matter), but it looks like Nix could make it easier for new contributors to set up a consistent local environment? It’d be great if the nix setup could work across platforms like Windows, macOS (ARM), and Linux, even without expert knowledge of Nix.

@phanirithvij
Copy link
Author

On Windows it isn't possible yet (WSL works) but macos and Linux are covered by nix.

@SableRaf
Copy link

Thanks for the clarification, @phanirithvij!

I tried running the Nix setup on macOS (ARM), but I ran into issues (log on pastebin)

I tried to set NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1, NIXPKGS_ALLOW_UNFREE=1, dirty patch the shell.nix file with ChatGPT, and run nix-shell --impure to get things moving, but the build still failed with some platform-specific issues. It doesn't help that I have no idea what I'm doing 🙃

Any guidance on how to adjust the Nix shell for macOS with Apple Silicon compatibility would be super helpful! It seems like this setup could be great for easing the environment setup for new contributors, but right now, I’m struggling to get it working on my M1 mac.

Thanks again for your efforts!

previously I had to use buildfhsuserenv and also glibc for some reason,
that I forget

Signed-off-by: phanirithvij <[email protected]>
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