Bundle Rime Ice assets and build rime-ice-installer from local source

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 23:32:21 -04:00
1 parent 22d02f0069
commit 4d80dd8a2c
2 files changed
+19 -3

No files matched your search

+18 -3
View File
@@ -30,7 +30,7 @@ pacman --noconfirm -Sy archlinux-keyring
# so this container can be months behind the mirror it installs from. A plain
# -Sy install is then a partial upgrade — new packages linked against a glibc
# the container doesn't have yet.
pacman --noconfirm -Syu archiso git sudo base-devel jq grub imagemagick neovim nodejs npm tree-sitter-cli
pacman --noconfirm -Syu archiso git sudo base-devel jq grub imagemagick neovim nodejs npm tree-sitter-cli go
# Pre-import the omarchy signing key (so pacman trusts our [omarchy] repo
# during the build without keyserver lookups).
@@ -114,6 +114,20 @@ echo "$NODE_SHA /tmp/$NODE_FILENAME" | sha256sum -c -
mkdir -p "$build_cache_dir/airootfs/opt/packages/"
cp "/tmp/$NODE_FILENAME" "$build_cache_dir/airootfs/opt/packages/"
# Rime Ice and Wanxiang for offline China installs.
rime_dir="$build_cache_dir/airootfs/opt/packages/rime-ice"
mkdir -p "$rime_dir"
bundle_release_asset() {
local url digest
read -r url digest < <(curl -fsSL "https://api.github.com/repos/$1/releases/tags/$2" |
jq -r --arg name "$3" '.assets[] | select(.name == $name) | "\(.browser_download_url) \(.digest)"') ||
{ echo "ERROR: $3 is missing from the $1 $2 release" >&2; exit 1; }
curl -fsSL "$url" -o "$rime_dir/$3"
echo "${digest#sha256:} $rime_dir/$3" | sha256sum -c -
}
bundle_release_asset iDvel/rime-ice nightly full.zip
bundle_release_asset amzxyz/RIME-LMDG LTS wanxiang-lts-zh-hans.gram
# Packages installed into the live ISO environment itself (NOT the target system).
# The selected omarchy-settings package is needed here so its post_install hook
# drops Omarchy's plymouthd.conf into /etc/plymouth before mkarchiso builds the
@@ -226,7 +240,8 @@ if [[ -n ${LOCAL_OMARCHY_BUILD:-} ]]; then
grep -Fxv \
-e "$OMARCHY_RUNTIME_PACKAGE" \
-e "$OMARCHY_SETTINGS_PACKAGE" \
-e "$OMARCHY_NVIM_PACKAGE" || true
-e "$OMARCHY_NVIM_PACKAGE" \
-e rime-ice-installer || true
)
fi
@@ -263,7 +278,7 @@ mapfile -t required_package_files <<< "$resolved_package_files"
# that the local build left exactly one file for each selected package name.
if [[ -n ${LOCAL_OMARCHY_BUILD:-} ]]; then
for local_package_name in \
"$OMARCHY_RUNTIME_PACKAGE" "$OMARCHY_SETTINGS_PACKAGE" "$OMARCHY_NVIM_PACKAGE"; do
"$OMARCHY_RUNTIME_PACKAGE" "$OMARCHY_SETTINGS_PACKAGE" "$OMARCHY_NVIM_PACKAGE" rime-ice-installer; do
local_package_file=""
for candidate in "$offline_mirror_dir/$local_package_name-"*.pkg.tar.*; do
[[ -f $candidate && $candidate != *.sig ]] || continue
+1
View File
@@ -40,6 +40,7 @@ packages=(
"$OMARCHY_SETTINGS_PACKAGE"
"$OMARCHY_RUNTIME_PACKAGE"
"$OMARCHY_NVIM_PACKAGE"
rime-ice-installer
)
# Local-source packages must replace every cached build of the same package,