fixup OSK with patched GTK

I am really looking forward to dropping all this on a new GTK version.
This commit is contained in:
Henry Hiles 2026-12-01 18:05:00 -05:00
commit 32df549215
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -35,6 +35,8 @@
oldDependency = pkgs.gtk3;
newDependency = pkgs.gtk3.overrideAttrs (old: {
patches = old.patches or [ ] ++ [ ./patches/gtk3-egl-renderable-type.patch ];
# So the flatpak gets text-input-v3 (and with it the OSK) without our immodules.cache
mesonFlags = old.mesonFlags or [ ] ++ [ "-Dbuiltin_immodules=wayland" ];
});
}
];
@ -60,6 +62,10 @@
unset GST_PLUGIN_SYSTEM_PATH_1_0
''
+ old.postInstall;
# Our GTK's default immodules.cache path isn't in the flatpak; use the runtime's
preFixup = old.preFixup or "" + ''
gappsWrapperArgs+=(--set-default GTK_IM_MODULE_FILE /usr/lib/${pkgs.stdenv.hostPlatform.uname.processor}-linux-gnu/gtk-3.0/3.0.0/immodules.cache)
'';
# nix2flatpak swaps dropped RUNPATH entries for the runtime's libdir in place,
# which would put it ahead of our patched GTK, so move GTK to the front
postFixup = old.postFixup or "" + ''