Skip to content

modrinth-app: fix build - #542808

Merged
SuperSandro2000 merged 1 commit into
NixOS:masterfrom
encode42:fix/modrinth-app-gapps-hook
Jul 31, 2026
Merged

SuperSandro2000 merged 1 commit into
NixOS:masterfrom
encode42:fix/modrinth-app-gapps-hook

Conversation

@encode42

@encode42 encode42 commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

Run wrapGApp on executable rather than wrapGAppsHook to prevent future build failures due to hook changes.

Recent changes to how wrapGAppsHook is run broke the build. Since symlinkJoin doesn't run the conventional derivation hooks, the documented convention of appending gappsWrapperArgs during the preFix phase is impossible, we must override the postBuild phase regardless.

More testing to make sure this doesn't break GTK/non-GTK setups would be appreciated. It appears to work as expected on my machine.

Closes #541756
Closes #541942 (superseded)

Things done

@encode42

Copy link
Copy Markdown
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 542808 --package modrinth-app
Commit: db5ae25d299ef730700145de755f55647668a3b0


x86_64-linux

✅ 1 package built:
  • modrinth-app

@encode42
encode42 requested review from Hythera and getchoo July 17, 2026 04:35
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jul 17, 2026
@encode42 encode42 mentioned this pull request Jul 17, 2026
4 of 13 tasks
@encode42
encode42 force-pushed the fix/modrinth-app-gapps-hook branch from db5ae25 to 714153f Compare July 17, 2026 04:43
@encode42 encode42 added the backport release-26.05 Backport PR automatically label Jul 17, 2026
@Hythera

Hythera commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

SGTM at a first glance.

@geri1701

Copy link
Copy Markdown
Member

symlinkJoin does not run the regular phases here, so preFixup doesn't run. The build will then turn green, but it will remain unwrapped. On release-26.05, the working wrapper would be replaced.

@encode42
encode42 force-pushed the fix/modrinth-app-gapps-hook branch from 714153f to caad451 Compare July 17, 2026 21:45
@encode42

Copy link
Copy Markdown
Member Author

symlinkJoin does not run the regular phases here, so preFixup doesn't run. The build will then turn green, but it will remain unwrapped. On release-26.05, the working wrapper would be replaced.

That's fun, this behavior doesn't seem to be documented at all. Had to dive into the source to confirm.

I'll revert this idea and switch this over to @Hythera's idea, as it appears to work just fine. Unfortunate that we still have to manually execute these hooks, but it is what it is.

Run `wrapGApp` on executable rather than `wrapGAppsHook` to prevent future build failures due to hook changes
@encode42
encode42 force-pushed the fix/modrinth-app-gapps-hook branch from caad451 to 183da97 Compare July 17, 2026 21:48
@geri1701

Copy link
Copy Markdown
Member

That's fun, this behavior doesn't seem to be documented at all. Had to dive into the source to confirm.

Yes. That is funny. It's good that it was found before the backport.

eveeifyeve added a commit to eveeifyeve/nix-config that referenced this pull request Jul 22, 2026
:( I wish this was fixed... I guess the modrinth package in nixpkgs took
success at all costs. I blame
NixOS/nixpkgs#526688 for that. I could choose to
use NixOS/nixpkgs#542808 but I won't because it
could change at anytime.
@eveeifyeve

Copy link
Copy Markdown
Member

Tested at eveeifyeve/nix-config@98f54dc

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 31, 2026
@SuperSandro2000
SuperSandro2000 added this pull request to the merge queue Jul 31, 2026
Merged via the queue into NixOS:master with commit cdcdbc2 Jul 31, 2026
27 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Successfully created backport PR for release-26.05:

@github-actions github-actions Bot added the 8.has: port to stable This PR already has a backport to the stable release. label Jul 31, 2026
@Hythera Hythera mentioned this pull request Aug 8, 2026
4 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person. backport release-26.05 Backport PR automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: modrinth-app

5 participants