SFTtech / openage

Free (as in freedom) open source clone of the Age of Empires II engine 🚀
http://openage.dev
Other
12.51k stars 1.11k forks source link

feat: added flake #1631

Closed akiross closed 3 months ago

akiross commented 3 months ago

Hello, as discussed on matrix few days ago, I'm proposing this PR to add support for nix.

While possibly not idiomatic, this works and adds also support for nyan.

heinezen commented 3 months ago

Hey thanks a lot,

I just have one small suggestion: Could you add the nix build to our build instructions list? That would make the fact that nix is available as an option more obvious. Also, could you link some info on how to maintain these files inside the docs because I assume it's written down somewhere but we don't know nix well enough to know where to look :D

akiross commented 3 months ago

Sure I can! I will add a bunch of comments inside the nix files to aid maintaining them.

Oh, just for info: this was tested on Linux (amd64 NixOS) only, I am not sure other platforms (e.g. OSX) are working, since I cannot test them at the moment.

akiross commented 3 months ago

I added some build and dev instructions specific for nix. I updated building.md to do what "seems intuitive" (list nix among the dependency section), but it's not just that: this solution is a complete build specification, so it would require a different section in that file altogether. But for the people looking for nix, the current doc might be fine.

I also fixed a couple of things related to the code itself and added comments to the main files (flake.nix and openage.nix).

heinezen commented 3 months ago

Thanks a lot! This will make it much easier to update and check out.