Skip to content

[Backport staging-26.05] wrapGAppsHook: prepare for structuredAttrs - #546281

Merged
booxter merged 1 commit into
staging-26.05from
backport-511330-to-staging-26.05
Jul 30, 2026
Merged

booxter merged 1 commit into
staging-26.05from
backport-511330-to-staging-26.05

Conversation

@nixpkgs-ci

@nixpkgs-ci nixpkgs-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Bot-based backport to staging-26.05, triggered by a label in #511330.

Before merging, ensure that this backport is acceptable for the release.

Even as a non-committer, if you find that it is not acceptable, leave a comment.

Tip

If you maintain all packages touched by this pull request, and they are all located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this PR using the nixpkgs-merge-bot.

This hook is called in the fixupPhase via

```
local output
for output in $(getAllOutputNames); do
  prefix="${!output}" runHook fixupOutput
done
```

Without `__structuredAttrs`, `getAllOutputNames` returns the `output` array, in order.
However, with `__structuredAttrs`, it returns the keys of the `output` associative array,
which are no longer necessarily ordered in the same way.

In the case of some packages (e.g. `mate-panel-with-applets`) this means that instead of
`[ "out" "man" ]`, we process `[ "man" "out" ]`. Running the hook for `"man"` then sets
`wrapGAppsHookHasRun` and no wrapping is done for `"out"`, which is what was really needed.

Instead, keep track of whether the hook has run on a per-output basis. That way, the order
does not matter and any executables that are spread around multiple outputs are wrapped.

(cherry picked from commit a0ee897)
@nixpkgs-ci
nixpkgs-ci Bot requested a review from SFrijters July 27, 2026 12:13
@booxter
booxter self-requested a review July 27, 2026 12:13
@nixpkgs-ci
nixpkgs-ci Bot requested a review from Ericson2314 July 27, 2026 12:22
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 4.workflow: backport This targets a stable branch labels Jul 27, 2026
booxter added a commit to booxter/nixpkgs that referenced this pull request Jul 27, 2026
614574d ("firefox/wrapper: enable
strictDeps") was backported to release-26.05 to allow to backport a new
Thunderbird ESR release.

This broke injection of gsettings schema paths into XDG_DATA_DIRS for
both Thunderbird and Firefox (on Linux). This resulted in empty menus
with no text or icons in both apps when running with Wayland (X11 seems
to be not affected).

The issue is not present on master which has a fix to gapps wrapper
hook: a0ee897 ("wrapGAppsHook: prepare
for structuredAttrs") that fixes incorrect output being wrapped for
mozilla wrapped apps (among other things).

We can pursue a backport of the wrapGAppsHook fix in 26.05:
NixOS#546281

But since it will take some time for it to arrive to release-26.05, this
patch attempts to fix the immediate issue in the firefox wrapper
instead.

Fixes NixOS#546204

Not-cherry-picked-because: wrapGAppsHook is already fixed on master.
@SFrijters

Copy link
Copy Markdown
Member

Should this backport also include the followup PR #526688 ?

@booxter

booxter commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@SFrijters I guess no harm in doing it, and it fixes some issues for some other packages I gather? What's the procedure here - do we merge this one, then request another backport, or should I just go and cherry-pick it here on top of this branch and push?

LRFLEW pushed a commit to LRFLEW/nixpkgs that referenced this pull request Jul 29, 2026
614574d ("firefox/wrapper: enable
strictDeps") was backported to release-26.05 to allow to backport a new
Thunderbird ESR release.

This broke injection of gsettings schema paths into XDG_DATA_DIRS for
both Thunderbird and Firefox (on Linux). This resulted in empty menus
with no text or icons in both apps when running with Wayland (X11 seems
to be not affected).

The issue is not present on master which has a fix to gapps wrapper
hook: a0ee897 ("wrapGAppsHook: prepare
for structuredAttrs") that fixes incorrect output being wrapped for
mozilla wrapped apps (among other things).

We can pursue a backport of the wrapGAppsHook fix in 26.05:
NixOS#546281

But since it will take some time for it to arrive to release-26.05, this
patch attempts to fix the immediate issue in the firefox wrapper
instead.

Fixes NixOS#546204

Not-cherry-picked-because: wrapGAppsHook is already fixed on master.
@booxter

booxter commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

I will request backport for the follow-up after this merges.

@booxter
booxter added this pull request to the merge queue Jul 30, 2026
Merged via the queue into staging-26.05 with commit 572e8aa Jul 30, 2026
30 of 32 checks passed
@booxter
booxter deleted the backport-511330-to-staging-26.05 branch July 30, 2026 22:28
@booxter

booxter commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Follow-up backport: #547586

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.workflow: backport This targets a stable branch 10.rebuild-darwin: 101-500 This PR causes between 101 and 500 packages to rebuild on Darwin. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants