diff --git a/fcitx5-anthy.nix b/fcitx5-anthy.nix new file mode 100644 index 0000000..7274805 --- /dev/null +++ b/fcitx5-anthy.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchurl, cmake, extra-cmake-modules, pkg-config, fcitx5, anthy, gettext }: + +stdenv.mkDerivation rec { + pname = "fcitx5-anthy"; + version = "5.0.13"; + + src = fetchurl { + url = "https://download.fcitx-im.org/fcitx5/fcitx5-anthy/${pname}-${version}.tar.xz"; + sha256 = "EGpyYiNalm4En3Oa++hyOSPLhjbkVcDyZt3LqamfSOI="; + }; + + nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ]; + buildInputs = [ fcitx5 anthy gettext ]; + + preinstall = '' + substituteInPlace src/cmake_install.cmake \ + --replace ${fcitx5} $out + ''; + + meta = with lib; { + description = "Anthy Wrapper for Fcitx5"; + homepage = "https://github.com/fcitx/fcitx5-anthy"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} diff --git a/fcitx5.nix b/fcitx5.nix index 2b1bfcc..20e055a 100644 --- a/fcitx5.nix +++ b/fcitx5.nix @@ -18,7 +18,7 @@ in { i18n.inputMethod = { enabled = "fcitx5"; - fcitx5.addons = with pkgs.fcitx-engines; [ anthy ]; + fcitx5.addons = [ (pkgs.callPackage ./fcitx5-anthy.nix {}) ]; }; home.file = {