Skip to content

Conversation

@svin24
Copy link

@svin24 svin24 commented Jan 1, 2026

Add a flake.nix to allow building and running the project with Nix, including a dev shell.

Also includes a check in external/CMakeLists.txt 's corrosion package to allow building with Nix.

Usage:

  • Build: nix build
  • Run: nix run
  • Dev shell: nix develop

originally the flake was pinned but it turned out it didn't need to be.

Tested on fedora with nix (GPU usage on non nixos enabled) and with NixOS

@redstrate
Copy link
Owner

Thanks for the contribution! However I have one big problem: I don't use Nix!

This means that the flake will eventually drift out-of-date, since I stopped testing other distribution methods other than Flatpak. I also don't want to put you on the hook for updating this for me forever, so is there a benefit to using the flake on NixOS rather than the Flatpak?

Aside from that, I wonder if there's any way to test this on the CI. That way if we do integrate it, then I'll at least know when it blows up.

@svin24
Copy link
Author

svin24 commented Jan 2, 2026

understandable if you're not willing to adopt it yet. @redstrate
I'm no nix pro myself I just tried to develop my flake for this program and it worked so i decided to make a PR.
I do however recommend adopting the cmake change as it would probably help with packaging in the future in general.

Also something else i noticed while i was poking around... your .gitmodules point to a directory instead of a git repository.
https://github.com/redstrate/Astra/blob/f8c38149d9ff4b47db26d72199103bf2cbb411e5/.gitmodules#L4C1-L6C20

@redstrate
Copy link
Owner

I do however recommend adopting the cmake change as it would probably help with packaging in the future in general.

I very much would appreciate that, can you create a separate PR for that so you're credited still?

Also something else i noticed while i was poking around... your .gitmodules point to a directory instead of a git repository.

Yeah :/ It doesn't hurt, but it should probably be changed to a proper URL. Feel free to create another PR for that as well.

@svin24
Copy link
Author

svin24 commented Jan 3, 2026

I closed this because i separated the flake changes in a different branch in my repo.

I'm not gonna make changes to gitmodules because you are probably actively developing and testing that stuff right now. And you don't want to deal with too many weird submodules on git(it sometimes turns into a pain)

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