-
Notifications
You must be signed in to change notification settings - Fork 42
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
Updating shell.nix to flakes #114
base: master
Are you sure you want to change the base?
Conversation
Updating the shell.nix to a flake.nix. See the Issue on gdnative for more understanding godot-rust/gdnative#1069 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I'm not using NixOS myself, so I'll need some other reviewers to check on the content and rationale.
|
||
[Nix](https://nixos.org/) is a package manager that employs a pure functional approach to dependency management. Nix packages are built and ran in isolated environments. It makes them more portable, but also harder to author. This tutorial will walk you through the process of setting up a package for Godot, GDNative and Rust with Nix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the introduction about NixOS? I don't think Flakes should be explained before NixOS itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little redundant since the relation is with flakes feature not nix package manager. But this doesnt change nothing after all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't remove this.
Co-authored-by: Jan Haller <[email protected]>
Co-authored-by: Jan Haller <[email protected]>
Actually, im not a experienced user of NixOs, flakes and all that good stuff. I prefer that some other folks check the content too |
Co-authored-by: Jose Storopoli <[email protected]>
Im commting the nix on non-nixos changes. May the Nixgl is not necessary at all. |
Co-authored-by: Jose Storopoli <[email protected]>
Co-authored-by: Jose Storopoli <[email protected]>
Prevent Errors... gdnative needs to godot be casted as godot
Should the old content really be replaced altogether? On https://nixos.wiki/wiki/Flakes it is stated that (emphasis mine):
Not everyone might want to enable experimental features for their package manager, and not everyone is using NixOS (instead of non-NixOS Nix environments, which the previous author apparently was on, and this setup is stated to not support). I'm not sure if the old directions should be removed, if it isn't superseded entirely. |
Nix flakes are pretty widely used nowadays despite that warning. Even then, I agree we should keep previous instructions regarding Of note, unless we are doing something with some specific cursed dependencies, it's very likely a Nix setup - with flakes or otherwise - would work on non-NixOS environments as well. At least, it's worth testing in other distros with Nix installed (e.g. Ubuntu, Fedora, OpenSUSE). EDIT: From a quick look at the PR, it seems that NixGL is used, so I think there might be problems using this particular setup outside of NixOS, but I'm not sure. Worth testing. |
If you have a Flake.nix it is trivial to extend that to a Nix shell. |
True, you have a point. You can use Alternatively, we can have some more high-level instructions indicating which packages you need to use |
@jaoleal see if you understand these suggestions. |
Well, thinking that is good if we have options to use on Nix... I think that we have to maintain those that work and not hold on to outdated technologies or ways to do the same thing. In every context that i used that file, i had problems. |
So, the non-NixOs environment... In that context, as the previous docs say, we could have some problems with opengl and then we could use NixGl that... is something I couldn't get to work on my environment until now, i`ll give another try. |
No you're right, I hadn't seen the NixGL dependency. That one can definitely be a pain outside of NixOS I believe. So it's fair enough. I do, however, wonder if there's some escape hatch which would allow us to not depend on NixGL for non-NixOS users. But that will suffice for the goal of this PR. |
The goal of this PR is that anyone have to spend some time on managing painfull deps. ill be happy to ensure that non-NixOs nix users have they time saved but i cannot absolutely sure that it will work... i only have a NixOs machine. |
Updating the shell.nix to a flake.nix.
See the Issue on gdnative for more understanding.
godot-rust/gdnative#1069 (comment)