Merge pull request #166914 from taku0/mozc_emacs_helper

mozc: make mozc.el to find mozc_emacs_helper
This commit is contained in:
adisbladis 2022-04-02 22:52:37 +12:00 committed by GitHub
commit f206f262a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -547,6 +547,13 @@ let
'';
});
});
mozc = super.mozc.overrideAttrs (attrs: {
postPatch = attrs.postPatch or "" + ''
substituteInPlace src/unix/emacs/mozc.el \
--replace '"mozc_emacs_helper"' '"${pkgs.ibus-engines.mozc}/lib/mozc/mozc_emacs_helper"'
'';
});
};
in lib.mapAttrs (n: v: if lib.hasAttr n overrides then overrides.${n} else v) super);

View file

@ -73,6 +73,7 @@ stdenv.mkDerivation rec {
install -m 644 data/images/unix/ui-alpha_half.png $out/share/ibus-mozc/alpha_half.png
install -m 644 data/images/unix/ui-alpha_full.png $out/share/ibus-mozc/alpha_full.png
install -D -m 755 out_linux/Release/mozc_renderer $out/lib/mozc/mozc_renderer
install -D -m 755 out_linux/Release/mozc_emacs_helper $out/lib/mozc/mozc_emacs_helper
runHook postInstall
'';