-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix/nix flake mac #102
base: main
Are you sure you want to change the base?
fix/nix flake mac #102
Conversation
The flake was including packages that are not necessary and do not work on Mac.
required for compiling bevy
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.
Forgive me as I'm viewing this on phone, I am no longer a nix user so testing this will be difficult.
What exactly has changed pkg wise? It looks like predominantly formatting... [Again on phone so apologies if I've missed something. Obvious], if we're missing things that are egregious we should point a pr at the bevy repo as this flake is essentially a copy paste of their official one..
I see. I can try and minimize the formatting changes, but the flake includes a lot of packages that just don't work on aarch64-darwin machines. Trying to use the flake will not work on darwin because packages like systemd are included unconditionally. I just add conditions to check if linux or not. I can look into improving the bevy flake instead. Feel free to close, it should at least be searchable now if other users are trying to just get started. If you know what formatter you use, I can try and use that to minimize the changes. edit: ... it seems like bevy may have also dropped the flake. I could not find it. :/ |
I'm not using nix these days [don't have the time]. But I do like it, and would like to see it supported, both in bevy and here! Maybe we can rename it to flake.nix.example and then update the readme so we point nix users to it? I'm happy to merge it and do that later, but as I'm on the phone [holiday no rig here ..] it'd be speedier if you can update, on the assumption you're happy to do so. I never tested the nix stuff on mac when I had one, and even then I had an old-school Intel mac for which it's likely a lot of the packages are different again... |
Hello, the nix flake was not working on my mac. After these fixes, it works.
I noticed the flake.nix was not formatted. I let my autoformatter do it. I am using the official nix formatter https://github.com/NixOS/nixfmt. I would be happy to alter the nix file to bundle the preferred formatter if you have one. This way, people will not be confused about how to format.
I am not a nix expert, but I do recommend trying out denvenv.nix (https://devenv.sh) instead of using a flake.nix. It works with direnv, it has better caching (basically a flake.nix needs to take in the whole repo, binaries and all to set up.. blegh), it is easier to set up and understand. Respectable if you want to keep the status quo, but devenv is awesome! :)