nix-dotfiles/overlays/wayland-ime-integration.nix

21 lines
530 B
Nix
Raw Normal View History

2024-12-05 19:43:58 +01:00
final: prev: let
inherit (prev) lib;
wrapWithWaylandIMEFlag = pkg: let
binaryName = lib.removePrefix "${lib.getBin pkg}/bin/" (lib.getExe pkg);
in pkg.overrideAttrs (prev': {
postInstall = (prev'.postInstall or "") + ''
wrapProgram "$out/bin/${binaryName}" \
--add-flags "--enable-wayland-ime --wayland-text-input-version=3"
2024-12-05 19:43:58 +01:00
'';
});
programList = [
"element-desktop"
"vscode"
"chromium"
"discord"
];
in
lib.genAttrs programList (name: wrapWithWaylandIMEFlag prev.${name})