fix(desktop): wrap with wrapGAppsHook3 so tray icon resolves on NixOS#3197
Conversation
tray-icon -> libappindicator-sys dlopens libayatana-appindicator3.so.1 at runtime with no DT_NEEDED entry. The previous fix (#3052) added the lib dir via `patchelf --add-rpath`, which writes DT_RUNPATH; glibc's ld.so only consults DT_RUNPATH when resolving DT_NEEDED deps, never for dlopen string-name lookups -- so the RPATH was inert and the tray icon silently failed to appear on NixOS (#3192). Switch the desktop derivation to wrapGAppsHook3 and inject the libayatana-appindicator lib dir on LD_LIBRARY_PATH via gappsWrapperArgs. As a bonus this also sets the GTK runtime env (XDG_DATA_DIRS, GIO_MODULE_DIR, GSETTINGS_SCHEMA_DIR) the webview expects. Closes #3192
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The release pipeline currently ships platform bundles (.AppImage/.deb/.dmg/.msi) but no `latest.json` updater manifest -- `tauri-action` silently skips manifest + signature generation when `TAURI_SIGNING_PRIVATE_KEY` is unset. The plugin therefore emits `ERROR tauri_plugin_updater::updater: update endpoint did not respond with a successful status code` on every desktop startup, even though nothing is broken on the user side. Pre-flight the endpoint (HEAD with 5s timeout, URL read from the plugin config so it stays in one place) before invoking `updater.check()`. When the manifest is missing we log one INFO and skip; when CI starts shipping `latest.json` the probe passes and the plugin runs unmodified.
When a PR only touches crates that have zero tests (e.g.
librefang-desktop, which currently has none), the selective lane runs
`cargo nextest run -p librefang-desktop` and nextest exits with code 4
("no tests to run"), failing CI. nextest's default policy is fail-on-
empty; opting in to `--no-tests=pass` keeps the lane green when the
selected crates legitimately have nothing to run, without affecting the
full-workspace fallback.
Surfaced by PR #3197, which only touches flake.nix +
librefang-desktop/src/updater.rs and got blocked on Test/Ubuntu and
Test/macOS for this reason.
|
@FrantaNautilus thanks for the report. Confirmed root cause + fix on a NixOS 25.11 / GNOME 49.2 box:
One caveat I hit while testing — if the GNOME AppIndicator extension you use is v63 on GNOME 49, you'll see the icon flicker because of an upstream extension JS bug ( Would appreciate it if you could rebuild from this branch on your NixOS box and confirm the icon shows up. Two extra commits in this PR ( |
Summary
librefang-desktopon NixOS, while the AppImage build worked on the same machine (Missing tray icon on NixOS #3192).tray-icon→libappindicator-sys0.9.0dlopenslibayatana-appindicator3.so.1at runtime with noDT_NEEDEDentry. The previous fix (Librefang-desktop creates empty window (AppImage and NixOS) #3052) added the lib dir viapatchelf --add-rpath, but modern patchelf writesDT_RUNPATH; glibc'sld.soonly consultsDT_RUNPATHforDT_NEEDEDdeps — never fordlopen()string-name lookups — so the RPATH was inert and the tray plugin silently failed to load.wrapGAppsHook3and injectpkgs.libayatana-appindicatoronLD_LIBRARY_PATHviagappsWrapperArgs. As a bonus this also wires the GTK runtime env (XDG_DATA_DIRS,GIO_MODULE_DIR,GSETTINGS_SCHEMA_DIR) that the webview wants.User confirmed in the issue that adding

libayatana-appindicatortoenvironment.systemPackagesdoesn't help — that's expected, NixOS has no globalld.so.conf, thedlopensimple-name lookup never sees system packages.References
ld.so(8)onDT_RUNPATH: "Such directories are searched only to find those objects required byDT_NEEDEDentries"Test plan
nix build .#librefang-desktopsucceeds on a Linux runner (CI).librefang-desktopand verify the tray icon appears (right-click menu shows Show Window / Quit / etc).cat $(nix path-info .#librefang-desktop)/bin/.librefang-desktop-wrappedshould containLD_LIBRARY_PATH=…libayatana-appindicator….nix build .#librefang-cli(we did not touch that scope).wrapGAppsHook3doesn't regress AppImage / cargo build paths.Closes #3192