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

r2modman: init at 3.1.42 #229551

Merged
merged 1 commit into from
Jun 15, 2023
Merged

r2modman: init at 3.1.42 #229551

merged 1 commit into from
Jun 15, 2023

Conversation

aidalgol
Copy link
Contributor

@aidalgol aidalgol commented May 2, 2023

Description of changes

Add r2modman, an unofficial Thunderstore mod manager.

Builds from source, superseding PR #201708.

Closes #143659

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@huantianad
Copy link
Contributor

Is there a good way to add the steam libraries so it can properly launch modded steam games?

@aidalgol
Copy link
Contributor Author

aidalgol commented May 3, 2023

Is there a good way to add the steam libraries so it can properly launch modded steam games?

I think you would need to run it inside the Steam FHS environment. I think letting the user opt to launch r2modman via steam-run is the best option.

(I've just been using this to install mods, and then launch the game from Steam.)

Copy link
Member

@lilyinstarlight lilyinstarlight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a bunch of review comments, but this looks pretty good! I do wonder if it would benefit from organizing it without mkYarnPackage like how the teams-for-linux derivation does now (which is also an electron app that uses yarn)

pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
@aidalgol aidalgol force-pushed the r2modman branch 2 times, most recently from e9d415e to f8d6d9b Compare May 3, 2023 22:44
@aidalgol
Copy link
Contributor Author

aidalgol commented May 3, 2023

I do wonder if it would benefit from organizing it without mkYarnPackage like how the teams-for-linux derivation does now (which is also an electron app that uses yarn)

That package does look a bit tidier. I will attempt to redo this package following that pattern, and for heroic as well if that works out.

@aidalgol aidalgol marked this pull request as draft May 3, 2023 22:47
@lilyinstarlight
Copy link
Member

That package does look a bit tidier. I will attempt to redo this package following that pattern, and for heroic as well if that works out.

Hopefully we can get back to #210814 soon and have a modern builder instead of mixing and matching yarn2nix-moretea and fetchYarnDeps. I have a few open PRs for fixing up fetchYarnDeps before that, though, and we are currently trying to iron out npm stuff first

@aidalgol aidalgol force-pushed the r2modman branch 2 times, most recently from 3220985 to 298f584 Compare May 4, 2023 02:27
@aidalgol
Copy link
Contributor Author

aidalgol commented May 4, 2023

I have redone the package using stdenv.mkDerivation and fetchYarnDeps. I could not figure out how, or if it's even possible to make quasar run electron-builder offline, so we run quasar build --mode electron --skip-pkg and then copy node_modules into the output directory, instead of getting an .asar archive.

@aidalgol aidalgol marked this pull request as ready for review May 4, 2023 02:30
@aidalgol aidalgol force-pushed the r2modman branch 2 times, most recently from 52a4d9d to 105fc5e Compare May 5, 2023 05:19
pkgs/games/r2modman/default.nix Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@huantianad huantianad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, only thing remaining is launching steam games from the app. For general use I do launch via steam itself, not r2modman, but it would be helpful for user-friendliness. I can't think of a better way than maybe adding an option to derivation to use steam-run, even though that still feels awkward.

@aidalgol
Copy link
Contributor Author

I think we should address supporting steam-run as a separate task. I also think that we should try to work with upstream to add support for customising the launch command.

@huantianad
Copy link
Contributor

Sounds good, I like the idea of having an option to set a launch wrapper, kinda like how Prism Launcher does it.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/973

pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
Comment on lines 73 to 77
(cd public/icons
for img in *png; do
dimensions=''${img#favicon-}
dimensions=''${dimensions%.png}
mkdir -p $out/share/icons/hicolor/$dimensions/apps
cp $img $out/share/icons/hicolor/$dimensions/apps/${pname}.png
done)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(cd public/icons
for img in *png; do
dimensions=''${img#favicon-}
dimensions=''${dimensions%.png}
mkdir -p $out/share/icons/hicolor/$dimensions/apps
cp $img $out/share/icons/hicolor/$dimensions/apps/${pname}.png
done)
cd public/icons
for img in *png; do
dimensions=''${img#favicon-}
dimensions=''${dimensions%.png}
mkdir -p $out/share/icons/hicolor/$dimensions/apps
cp $img $out/share/icons/hicolor/$dimensions/apps/${pname}.png
done
cd ../..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much prefer cd in a subshell in shell scripts, so I would like to keep this bit as it is if that's OK.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
pkgs/games/r2modman/default.nix Outdated Show resolved Hide resolved
@aidalgol aidalgol force-pushed the r2modman branch 2 times, most recently from 9938b91 to 87b3900 Compare June 9, 2023 10:22
@aidalgol aidalgol changed the title r2modman: init at 3.1.41 r2modman: init at 3.1.42 Jun 9, 2023
@aidalgol aidalgol marked this pull request as draft June 10, 2023 07:00
@aidalgol
Copy link
Contributor Author

@huantianad Do you want to be put down as a maintainer on this?

@huantianad
Copy link
Contributor

Yeah sure, I'm down to help maintain.

@aidalgol aidalgol marked this pull request as ready for review June 11, 2023 04:44
@ofborg ofborg bot requested a review from huantianad June 11, 2023 05:01
@SuperSandro2000 SuperSandro2000 merged commit 9f255a0 into NixOS:master Jun 15, 2023
@aidalgol aidalgol deleted the r2modman branch August 19, 2024 05:48
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.

r2modman: Unity games mod manager
6 participants