mirror of
https://github.com/Melorise/TuanjieHubForNix.git
synced 2026-11-07 14:49:34 +00:00
fix Chinese
This commit is contained in:
@@ -4,6 +4,8 @@ Tuanjie Hub 1.4.7,重打包自deb包
|
||||
|
||||
使用 FHS 环境运行 Hub 及其安装的编辑器,包含 nixpkgs Unity Hub 打包所列的编辑器、授权服务、Bug Reporter、字体和辅助工具依赖。`libxml2_13` 提供编辑器需要的 `libxml2.so.2`。
|
||||
|
||||
Hub 及其启动的编辑器通过独立的 `FONTCONFIG_FILE` 使用静态版 Noto Sans CJK、Core Fonts、DejaVu 和 Liberation 字体,为编辑器内部中文界面提供字体回退。更新软件包后,关闭编辑器和 Hub,再通过 `nix run` 启动。
|
||||
|
||||
## 使用
|
||||
|
||||
```sh
|
||||
|
||||
+22
-4
@@ -3,11 +3,28 @@
|
||||
stdenvNoCC,
|
||||
libarchive,
|
||||
buildFHSEnv,
|
||||
makeFontsConf,
|
||||
fontconfig,
|
||||
noto-fonts-cjk-sans,
|
||||
corefonts,
|
||||
dejavu_fonts,
|
||||
liberation_ttf,
|
||||
src,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.4.7";
|
||||
editorFonts = [
|
||||
(noto-fonts-cjk-sans.override { static = true; })
|
||||
corefonts
|
||||
dejavu_fonts
|
||||
liberation_ttf
|
||||
];
|
||||
fontsConf = makeFontsConf {
|
||||
fontDirectories = editorFonts;
|
||||
impureFontDirectories = [ ];
|
||||
includes = [ "${fontconfig.out}/etc/fonts/conf.d" ];
|
||||
};
|
||||
unpacked = stdenvNoCC.mkDerivation {
|
||||
pname = "tuanjiehub-unpacked";
|
||||
inherit version src;
|
||||
@@ -40,7 +57,7 @@ buildFHSEnv {
|
||||
fontconfig
|
||||
freetype
|
||||
lsb-release
|
||||
];
|
||||
] ++ editorFonts;
|
||||
|
||||
multiPkgs =
|
||||
pkgs: with pkgs; [
|
||||
@@ -99,9 +116,6 @@ buildFHSEnv {
|
||||
vulkan-loader
|
||||
libice
|
||||
libsm
|
||||
corefonts
|
||||
dejavu_fonts
|
||||
liberation_ttf
|
||||
];
|
||||
|
||||
extraBuildCommands = ''
|
||||
@@ -112,6 +126,10 @@ buildFHSEnv {
|
||||
|
||||
runScript = "/opt/tuanjiehub/tuanjiehub";
|
||||
|
||||
profile = ''
|
||||
export FONTCONFIG_FILE="${fontsConf}"
|
||||
'';
|
||||
|
||||
extraInstallCommands = ''
|
||||
mkdir -p "$out/share"
|
||||
cp -a "${unpacked}/usr/share/". "$out/share/"
|
||||
|
||||
Reference in New Issue
Block a user