fix(snixembed): bundle librsvg + wrap with wrapGAppsHook3#195
Open
fix(snixembed): bundle librsvg + wrap with wrapGAppsHook3#195
Conversation
PR #193 patched two source defects in snixembed 0.3.3 but missed the runtime piece. The upstream nixpkgs derivation links against gtk3 + libdbusmenu only and never wraps the binary, so GDK_PIXBUF_MODULE_FILE is unset at runtime and gdk-pixbuf has no SVG loader registered. Modern icon themes ship status and panel icons exclusively as SVG (Qogir-Dark/22/panel/flameshot-tray.svg, hicolor/.../status/org.remmina.Remmina-status.svg). With no SVG loader, Gtk's StatusIcon resolves the cache hit, fails to load the file, and falls back to image-missing. Confirmed via GTK_DEBUG=icontheme: cache returns suffix=2 (SVG) for the right panel/status directories, then "looking up icon image-missing". Add wrapGAppsHook3 + librsvg so the resulting wrapper sets GDK_PIXBUF_MODULE_FILE to a loaders.cache that registers libpixbufloader-svg.so. Verified locally: the wrapped binary's environment shows GDK_PIXBUF_MODULE_FILE pointing at librsvg-2.61.4/.../loaders.cache and no image-missing falls appear in GTK_DEBUG output. Tracked in #194; the override is removed once upstream ships 0.3.4+ with both the source fixes and the librsvg wrap.
Contributor
|
Claude finished @Bad3r's task in 1m 5s —— View job Review
No issues found. |
There was a problem hiding this comment.
Code Review
This pull request updates the snixembed package override in modules/base/custom-packages-overlay.nix to resolve an issue where SVG tray icons failed to render in i3bar. The fix involves adding wrapGAppsHook3 to nativeBuildInputs and librsvg to buildInputs to ensure proper SVG support via gdk-pixbuf. The internal documentation was also updated to describe the three defects addressed by this override. I have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
snixembed0.3.3 but icons remain blank squares after deployGTK_DEBUG=icontheme: snixembed has no SVG loader at runtime. The upstream nixpkgs derivation never wraps the binary and never pullslibrsvg, soGDK_PIXBUF_MODULE_FILEis unset and gdk-pixbuf cannot decode SVG. Modern icon themes ship status and panel icons as SVG only, so every named lookup ends inimage-missing.wrapGAppsHook3+librsvgto the existing override so the wrapper setsGDK_PIXBUF_MODULE_FILEto aloaders.cachethat registerslibpixbufloader-svg.so.Evidence
/proc/$pid/environfor the unwrapped snixembed shows noGDK_PIXBUF_MODULE_FILE. After this change the wrapped binary embeds--set GDK_PIXBUF_MODULE_FILE /nix/store/.../librsvg-2.61.4/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache.Test plan
nix develop -c pre-commit run --files modules/base/custom-packages-overlay.nix --hook-stage manualnix flake check --accept-flake-config --no-build --offlinenix build .#nixosConfigurations.system76.pkgs.snixembedproduces/nix/store/0i8phgxq14ixi69xra0rjhb4pfpbkzxw-snixembed-0.3.3with abin/snixembedwrapper plusbin/.snixembed-wrapped;stringson the wrapper shows the new env varsGDK_PIXBUF_MODULE_FILEconfirmed in the wrapped process environment./build.sh --host system76, thensystemctl --user restart snixembedTracked alongside #193 in #194.