feat: Compile rime schema when build nixos
This commit is contained in:
parent
cec21244b3
commit
213d6bed55
3 changed files with 12 additions and 53 deletions
|
|
@ -4,6 +4,8 @@
|
|||
rime-moegirl,
|
||||
rime-zhwiki,
|
||||
buildEnv,
|
||||
librime,
|
||||
rime-data,
|
||||
}:
|
||||
buildEnv {
|
||||
name = "rime-all";
|
||||
|
|
@ -13,9 +15,19 @@ buildEnv {
|
|||
rime-zhwiki
|
||||
rime-moegirl
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
librime
|
||||
];
|
||||
postBuild = ''
|
||||
ln -s ${./yustar_sc.custom.yaml} $out/share/rime-data/yustar_sc.custom.yaml
|
||||
ln -s ${./double_pinyin_flypy.custom.yaml} $out/share/rime-data/double_pinyin_flypy.custom.yaml
|
||||
ln -s ${./default.custom.yaml} $out/share/rime-data/default.custom.yaml
|
||||
|
||||
cd $out/share/rime-data/
|
||||
for s in *.schema.yaml; do
|
||||
rime_deployer --compile "$s" . "${rime-data}/share/rime-data/" ./build
|
||||
done
|
||||
|
||||
rm ./build/*.txt
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue