Move fcitx5 into directory

This commit is contained in:
Elnu 2023-01-08 11:39:26 -08:00
parent dc5d79863f
commit c8e11c6fe5
3 changed files with 1 additions and 1 deletions

31
fcitx5/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs, ... }:
let
themes = ".local/share/fcitx5/themes/"; # fcitx5 theme folder
nord = pkgs.fetchFromGitHub {
owner = "tonyfettes";
repo = "fcitx5-nord";
rev = "bdaa8fb723b8d0b22f237c9a60195c5f9c9d74d1";
sha256 = "qVo/0ivZ5gfUP17G29CAW0MrRFUO0KN1ADl1I/rvchE=";
};
gruvbox = pkgs.fetchFromGitHub {
owner = "ayamir";
repo = "fcitx5-gruvbox";
rev = "80bd3ab4c723fc6fcc4a222b6cede6f8337eedda";
sha256 = "UZc6UTpodxP3pJ6q58FZsJaHr1Wwl/NLYYmo22QYmNk=";
};
in
{
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = [ (pkgs.callPackage ./fcitx5-anthy.nix {}) ];
};
home.file = {
"${themes}Nord-Dark".source = "${nord}/Nord-Dark";
"${themes}Nord-Light".source = "${nord}/Nord-Light";
"${themes}Gruvbox-Dark".source = "${gruvbox}/Gruvbox-Dark";
"${themes}Gruvbox-Light".source = "${gruvbox}/Gruvbox-Light";
".config/fcitx5/conf/classicui.conf".text = "Theme=Nord-Dark";
};
}

26
fcitx5/fcitx5-anthy.nix Normal file
View file

@ -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;
};
}