ayatana-indicator-messages: Fix desktop parsing

Not *great*, but a start.

MessagingMenu has a function for mapping an app to desktop file data. This relies on GLib to parse the desktop file,
which needs the binary from the 'Exec=' entry on PATH, otherwise it bails.

messaging_menu_app_set_desktop_id calls g_desktop_app_info_new:
334668ad5a/libmessaging-menu/messaging-menu-app.c (L245-L252)

Which, after some jumps inbetween, ends up in g_desktop_app_info_load_from_keyfile and calls g_find_program_for_path:
204a76669b/gio/gdesktopappinfo.c (L1920-L1951)

Which uses PATH:
204a76669b/glib/gutils.c (L371)
This commit is contained in:
OPNA2608 2024-04-10 13:46:56 +02:00 committed by Weijia Wang
parent 8d0a5773b2
commit 93e91c150e
1 changed files with 9 additions and 0 deletions

View File

@ -119,6 +119,15 @@ stdenv.mkDerivation (finalAttrs: {
chmod +w doc/reference/html/*
'';
# Indicators that talk to it may issue requests to parse desktop files, which needs binaries in Exec on PATH
# messaging_menu_app_set_desktop_id -> g_desktop_app_info_new -...-> g_desktop_app_info_load_from_keyfile -> g_find_program_for_path
# When launched via systemd, PATH is very narrow
preFixup = ''
gappsWrapperArgs+=(
--suffix PATH : '/run/current-system/sw/bin'
)
'';
passthru = {
ayatana-indicators = [
"ayatana-indicator-messages"