From df88c17229a874ace9a3e48dd1dacdb2944460a5 Mon Sep 17 00:00:00 2001 From: Sergey Reshetnikov Date: Fri, 20 Feb 2026 11:59:22 +0300 Subject: [PATCH] use recent helix fork to port editor to Redox --- recipes/tools/helix/recipe.toml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/recipes/tools/helix/recipe.toml b/recipes/tools/helix/recipe.toml index a4a50cc3c..5f83c1b45 100644 --- a/recipes/tools/helix/recipe.toml +++ b/recipes/tools/helix/recipe.toml @@ -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 """