The GNOME section of the Nixpkgs manual explains what you need, in this case it is adding appropriate paths to XDG_DATA_DIRS
environment variable. wrapGAppsHook4
does do this correctly but only for built derivations, not devShell
s, so it will not help you with cargo run
.
There is no mechanism for shells at the moment, you will need to apply a hack like shellHook
from Python + Qt woes - #2 by jtojnar with gappsWrapperArgs
instead of qtWrapperArgs
if you want to make it work.
Do not do that, it will break GTK programs if the schema is ever updated.