Merge pull request 'add fcitx5' (#262) from add-fcitx5 into main
Some checks failed
Hydra woodpecker-frontend Hydra build #48990 of nix-packages:aarch64-linux-master:woodpecker-frontend
Hydra mautrix-whatsapp Hydra build #48991 of nix-packages:aarch64-linux-master:mautrix-whatsapp
Hydra woodpecker-agent Hydra build #48992 of nix-packages:aarch64-linux-master:woodpecker-agent
Hydra woodpecker-server Hydra build #48993 of nix-packages:aarch64-linux-master:woodpecker-server
Hydra woodpecker-cli Hydra build #48994 of nix-packages:aarch64-linux-master:woodpecker-cli
ci/woodpecker/cron/update-lockfile Pipeline failed
Hydra fcitx5 Hydra build #49043 of nix-packages:aarch64-linux-master:fcitx5
ci/woodpecker/cron/update Pipeline failed
Some checks failed
Hydra woodpecker-frontend Hydra build #48990 of nix-packages:aarch64-linux-master:woodpecker-frontend
Hydra mautrix-whatsapp Hydra build #48991 of nix-packages:aarch64-linux-master:mautrix-whatsapp
Hydra woodpecker-agent Hydra build #48992 of nix-packages:aarch64-linux-master:woodpecker-agent
Hydra woodpecker-server Hydra build #48993 of nix-packages:aarch64-linux-master:woodpecker-server
Hydra woodpecker-cli Hydra build #48994 of nix-packages:aarch64-linux-master:woodpecker-cli
ci/woodpecker/cron/update-lockfile Pipeline failed
Hydra fcitx5 Hydra build #49043 of nix-packages:aarch64-linux-master:fcitx5
ci/woodpecker/cron/update Pipeline failed
Reviewed-on: #262
This commit is contained in:
commit
10d0db3e4e
6 changed files with 1057 additions and 0 deletions
|
@ -71,6 +71,7 @@ in
|
|||
wordpress-plugins
|
||||
wordpress-themes
|
||||
kubo
|
||||
fcitx5
|
||||
;
|
||||
}
|
||||
// (
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
kubo
|
||||
hydra
|
||||
hydra-unstable
|
||||
fcitx5
|
||||
;
|
||||
}
|
||||
// (
|
||||
|
|
29
i18n/fcitx5/gen-unicode-data.nix
Normal file
29
i18n/fcitx5/gen-unicode-data.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
python3,
|
||||
unicode-character-database,
|
||||
unihan-database,
|
||||
stdenv,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "fcitx5-unicode-data";
|
||||
inherit (unicode-character-database) version;
|
||||
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = [python3];
|
||||
|
||||
buildPhase = ''
|
||||
cp ${unicode-character-database}/share/unicode/UnicodeData.txt .
|
||||
cp ${unicode-character-database}/share/unicode/NamesList.txt .
|
||||
cp ${unicode-character-database}/share/unicode/Blocks.txt .
|
||||
cp ${unihan-database}/share/unicode/Unihan_Readings.txt .
|
||||
|
||||
python3 gen.py
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp kcharselect-data $out
|
||||
cp kcharselect-translation.cpp $out
|
||||
'';
|
||||
}
|
1005
i18n/fcitx5/gen.py
Normal file
1005
i18n/fcitx5/gen.py
Normal file
File diff suppressed because it is too large
Load diff
18
i18n/fcitx5/patched-source.nix
Normal file
18
i18n/fcitx5/patched-source.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
fcitx5,
|
||||
stdenv,
|
||||
callPackage,
|
||||
}: let
|
||||
unicode-data = callPackage ./gen-unicode-data.nix {};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "fcitx5-src";
|
||||
inherit (fcitx5) version src;
|
||||
|
||||
buildPhase = "true";
|
||||
installPhase = ''
|
||||
cp -r $src $out
|
||||
chmod -R +w $out
|
||||
cp ${unicode-data}/* $out/src/modules/unicode
|
||||
'';
|
||||
}
|
|
@ -85,6 +85,9 @@ system: self: super: let
|
|||
wordpress-plugins = self.callPackage ./web/wordpress-plugins {};
|
||||
wordpress-themes = self.callPackage ./web/wordpress-themes {};
|
||||
kubo = self.callPackage ./ipfs/kubo {};
|
||||
fcitx5 = super.fcitx5.overrideAttrs (_: {
|
||||
src = self.callPackage ./i18n/fcitx5/patched-source.nix {inherit (super) fcitx5;};
|
||||
});
|
||||
})
|
||||
riscv-overlay
|
||||
];
|
||||
|
|
Reference in a new issue