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

Add NixOS Flake #247

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

theoparis
Copy link

@theoparis theoparis commented Oct 7, 2024

Based on #154, this PR adds a nix flake.
The changes I've made compared to #154 are:

  • Signed commits
  • Added a Nix derivation
  • Added support for other systems (e.g. riscv64) via nix-systems
  • Used nixfmt (nixfmt-rfc-style package) for formatting

To Do:

  • Fix building on Darwin
  • Add runtime dependencies so you can nix build .# && ./result/bin/redot

Darwin support is still WIP which is why I made this a draft. It seems like AppKit/AppKit.h is not being found despite it being present in buildInputs.
Additionally, I had to temporarily modify platform_methods.py to allow finding moltenVK in ${darwin.moltenvk}/lib/libMoltenVK.dylib. This could probably be improved with a proper lookup of the entire sdk directory instead of looking in lib or other hard coded paths 🤔

Edit: Hmm, AppKit.h is not in an AppKit/ directory an is instead just AppKit.h via something like /nix/store/0nh8rqwsdaj9pj6lw0nkggry8ykkpazg-apple-framework-AppKit-11.0.0/Library/Frameworks/AppKit.framework/Versions/C/Headers/AppKit.h.

@Spartan322
Copy link
Member

Is this still being worked on, and has this been proposed to Godot?

@Spartan322
Copy link
Member

Also does this close #154?

@MichaelFisher1997
Copy link

@Spartan322 I have my eye on this.
#154 is mine, this is an improvement on that (so probs close #154)
its gone a bit far past my knowledge of nix shells, but a few people in the community are asking for it.
ive spoken to a few people, we will be getting back to this, a few use it already to do local builds

@MichaelFisher1997
Copy link

Is this still being worked on, and has this been proposed to Godot?

yes, no

@Spartan322 Spartan322 changed the title Add nix flake Add NixOS Flake Oct 31, 2024
Update the copy command in package.nix to match the output binary names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants