We are migrating packages that meet below requirements:
1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration
The tool is here: https://github.com/Aleksanaa/by-name-migrate.
This was achieved using the following command:
sd 'wrapGAppsHook\b' wrapGAppsHook3 (rg -l 'wrapGAppsHook\b')
And then manually reverted the following changes:
- alias in top-level.nix
- function name in wrap-gapps-hook.sh
- comment in postFixup of at-spi2-core
- comment in gtk4
- comment in preFixup of 1password-gui/linux.nix
- comment in postFixup of qgis/unwrapped-ltr.nix and qgis/unwrapped.nix
- comment in postFixup of telegram-desktop
- comment in postFixup of fwupd
- buildCommand of mongodb-compass
- postFixup of xflux-gui
- comment in a patch in kdePackages.kde-gtk-config and plasma5Packages.kde-gtk-config
- description of programs.sway.wrapperFeatures.gtk NixOS option (manual rebuild)
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)