Ricardo Wurmus <rek...@elephly.net> writes:
> [...]
>
> It seems that GTK3 only looks for
> ‘$libdir/gtk-3.0/3.0.0/immodules.cache’ and GTK2 only looks for
> ‘$libdir/gtk-2.0/2.10.0/immodules.cache’ by default, where ‘$libdir’ is
> ‘$out/lib’ of the GTK package. (According to
> https://developer.gnome.org/gtk3/stable/gtk-running.html)
>
> To make IBus work we need to find a way to make the different major
> versions of GTK respect different ‘immodules.cache’ files that are *not*
> located in their ‘$libdir’. In that case we could generate a fresh
> ‘immodules.cache’ file for each major GTK version when building a
> profile. Unfortunately, I haven’t been able to find any documented
> means to achieve this. It might require patching the GTKs to check an
> additional path or environment variable.
>
We can set 'GTK_EXE_PREFIX' to the '~/.guix-profile', and generate the
'immodules.cache' files in a profile hook. It will work for both gtk2
and gtk3 applications.