etternagame / etterna

Advanced cross-platform rhythm game focused on keyboard play
https://etternaonline.com/
MIT License
474 stars 132 forks source link

Configurable virtual fs mounts based on environment variables #1282

Closed phantamanta44 closed 9 months ago

phantamanta44 commented 9 months ago

This PR is a first step towards addressing #651. It allows users (or package maintainers) to customize the Etterna virtual filesystem mounts using environment variables so that the game installation itself can remain immutable while any variable data is stored elsewhere. This is especially necessary for a NixOS release, as the Nix store is read-only.

More specifically, this PR does the following:

This last change comes up because the crashpad build task attempts to run built-in build tools (e.g. extern/crashpad/buildtools/linux64/gn) that fail to run on NixOS because of linking issues. Potentially, a more drastic refactoring of the build tools could fall back to the system installs of the build tools, but that wasn't a priority for me in this PR.

If these changes make it into release, the plan is to then PR nixpkgs with an expression for Etterna. The idea is to wrap the Etterna binary so that the game's root mount is bound to ~/.local/share/etterna in the user's home directory by environment variables, and then to add the game's immutable installation/asset directory as an additional mount.

poco0317 commented 9 months ago

the changes look fine. does it work? i wont test it

phantamanta44 commented 9 months ago

Tested and working on my amd64 nixos install, but that's the only system I have

fgaz commented 4 months ago

@phantamanta44 I was looking into packaging etterna for NixOS and found this. How's your package going?

phantamanta44 commented 4 months ago

I have a nixpkgs expression ready to be PR'd, but I'm waiting on an official Etterna release that includes this patch

fgaz commented 4 months ago

When that happens feel free to ping me for a review

poco0317 commented 4 months ago

although the repo activity is no indicator, it is likely that we will see a release in roughly a month. if you want to pr something to here open at any time. if you mean pr to nix or whatever just keep in mind that whatever you do for the love of god do not point a publicly available repackaging or distribution to anything other than master tags