Merge branch 'helix-port' into 'master'

use recent helix fork to port editor to Redox

See merge request redox-os/redox!1928
This commit is contained in:
Jeremy Soller 2026-02-20 05:48:30 -07:00
commit 9778450262

View File

@ -1,17 +1,30 @@
#TODO signal handling is disabled, it should be re-enabled when Redox is ready
#TODO language files are not built, only the "hx" editor is built
#TODO Consider adding `export RUSTFLAGS+="-C target-feature=-crt-static"` when adding language support
#TODO language files are not built for fennel and crstalline langauges
#TODO configuration - https://docs.helix-editor.com/install.html#configuring-helixs-runtime-files
[source]
git = "https://gitlab.redox-os.org/redox-os/helix.git"
branch = "redox"
git = "https://github.com/greyshaman/helix.git"
rev = "34b91f42d9e9b04ba39cb6cc0f7c044d8ca4261d"
[build]
template = "custom"
script = """
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
COOKBOOK_SOURCE+="/helix-term"
cookbook_cargo
DYNAMIC_INIT
export CFLAGS="$CFLAGS -D__redox__"
PACKAGE_PATH="helix-term" cookbook_cargo
mv "${COOKBOOK_STAGE}/usr/bin/hx" "${COOKBOOK_STAGE}/usr/bin/helix"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/grammars"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/queries"
mkdir -p "${COOKBOOK_STAGE}/usr/lib/helix/runtime/themes"
echo "show runtime grammars dir content"
cp ${COOKBOOK_SOURCE}/runtime/grammars/*.so ${COOKBOOK_STAGE}/usr/lib/helix/runtime/grammars/
cp -r ${COOKBOOK_SOURCE}/runtime/queries/* ${COOKBOOK_STAGE}/usr/lib/helix/runtime/queries/
cp -r ${COOKBOOK_SOURCE}/runtime/themes/* ${COOKBOOK_STAGE}/usr/lib/helix/runtime/themes/
cp "${COOKBOOK_SOURCE}/runtime/tutor" ${COOKBOOK_STAGE}/usr/lib/helix/runtime/
echo '#!/usr/bin/env bash' > "${COOKBOOK_STAGE}/usr/bin/hx"
echo 'export HELIX_RUNTIME=/usr/lib/helix/runtime' >> "${COOKBOOK_STAGE}/usr/bin/hx"
echo '/usr/bin/helix $@' >> "${COOKBOOK_STAGE}/usr/bin/hx"
chmod +x ${COOKBOOK_STAGE}/usr/bin/hx
"""