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

21 lines
499 B
Nix
Raw Normal View History

2024-06-29 02:28:20 +02: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"
'';
});
programList = [
"element-desktop"
"vscode"
"chromium"
"discord"
];
in
lib.genAttrs programList (name: wrapWithWaylandIMEFlag prev.${name})