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
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ in
|
|||
sourceRoot = "schema";
|
||||
|
||||
patches = [
|
||||
./punctuator.patch
|
||||
./key_binder.patch
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
diff --git a/yuhao_pinyin.schema.yaml b/yuhao_pinyin.schema.yaml
|
||||
index 7b5f1cb..f036a64 100644
|
||||
--- a/yuhao_pinyin.schema.yaml
|
||||
+++ b/yuhao_pinyin.schema.yaml
|
||||
@@ -60,7 +60,7 @@ translator:
|
||||
- xform/([jqxy])v/$1u/
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
diff --git a/yustar.schema.yaml b/yustar.schema.yaml
|
||||
index e4b432c..a2da46c 100644
|
||||
--- a/yustar.schema.yaml
|
||||
+++ b/yustar.schema.yaml
|
||||
@@ -292,7 +292,7 @@ yuhao_macro:
|
||||
expr: return require("yuhao.yuhao_core").unicode()
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
diff --git a/yustar_sc.schema.yaml b/yustar_sc.schema.yaml
|
||||
index 806f636..c57500c 100644
|
||||
--- a/yustar_sc.schema.yaml
|
||||
+++ b/yustar_sc.schema.yaml
|
||||
@@ -286,7 +286,7 @@ yuhao_macro:
|
||||
expr: return require("yuhao.yuhao_core").unicode()
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
diff --git a/yustar_tw.schema.yaml b/yustar_tw.schema.yaml
|
||||
index 93943fe..8370091 100644
|
||||
--- a/yustar_tw.schema.yaml
|
||||
+++ b/yustar_tw.schema.yaml
|
||||
@@ -285,7 +285,7 @@ yuhao_macro:
|
||||
expr: return require("yuhao.yuhao_core").unicode()
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
Loading…
Add table
Add a link
Reference in a new issue