diff --git a/config/x86_64/ci.toml b/config/x86_64/ci.toml index d0d5115b1..1ad08c53b 100644 --- a/config/x86_64/ci.toml +++ b/config/x86_64/ci.toml @@ -121,12 +121,14 @@ nano = {} nasm = {} ncurses = {} ncursesw = {} +neovim = {} netdb = {} netsurf = {} netutils = {} neverball = {} nghttp2 = {} nginx = {} +nodejs-21 = {} nushell = {} onefetch = {} openjazz = {} 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 """ diff --git a/recipes/wip/dev/lang/nodejs-21/recipe.toml b/recipes/wip/dev/lang/nodejs-21/recipe.toml index e7cbeaff6..1d08638e2 100644 --- a/recipes/wip/dev/lang/nodejs-21/recipe.toml +++ b/recipes/wip/dev/lang/nodejs-21/recipe.toml @@ -1,4 +1,4 @@ -#TODO page fault +#TODO node is working but ld.so crashing with npm [source] tar = "https://nodejs.org/dist/v21.7.3/node-v21.7.3.tar.xz" blake3 = "95a56db4f9729b2f8384ab58ccb2ec0c41da05991f7400ef97bd76748d77870b" @@ -58,10 +58,7 @@ COOKBOOK_CONFIGURE_FLAGS=( --shared-nghttp3 --shared-openssl --shared-zlib - --disable-shared-readonly-heap - --without-node-snapshot - --without-node-code-cache - --v8-lite-mode + --without-inspector # TODO: Find a way to separate host and target flags instead? # --shared-zlib-includes="${COOKBOOK_TOOLCHAIN}/include" --shared-openssl-includes="${COOKBOOK_SYSROOT}/include" diff --git a/recipes/wip/dev/lang/nodejs-21/redox.patch b/recipes/wip/dev/lang/nodejs-21/redox.patch index 82f99e0ae..f5acaaa43 100644 --- a/recipes/wip/dev/lang/nodejs-21/redox.patch +++ b/recipes/wip/dev/lang/nodejs-21/redox.patch @@ -203,6 +203,23 @@ diff -ruwN source/deps/v8/src/base/platform/platform-posix.cc source-new/deps/v8 flags |= MAP_NORESERVE; #endif // !V8_OS_AIX && !V8_OS_FREEBSD && !V8_OS_QNX #if V8_OS_QNX +@@ -565,14 +569,8 @@ + // MADV_FREE_REUSABLE sometimes fails, so fall back to MADV_DONTNEED. + ret = madvise(address, size, MADV_DONTNEED); + } +-#elif defined(_AIX) || defined(V8_OS_SOLARIS) +- int ret = madvise(reinterpret_cast(address), size, MADV_FREE); +- if (ret != 0 && errno == ENOSYS) { +- return true; // madvise is not available on all systems. +- } +- if (ret != 0 && errno == EINVAL) { +- ret = madvise(reinterpret_cast(address), size, MADV_DONTNEED); +- } ++#elif defined(_AIX) || defined(V8_OS_SOLARIS) || defined(V8_OS_REDOX) ++ int ret = 0; // madvise is not available on all systems. + #else + int ret = madvise(address, size, MADV_DONTNEED); + #endif diff -ruwN source/deps/v8/src/base/platform/platform-redox.cc source-new/deps/v8/src/base/platform/platform-redox.cc --- source/deps/v8/src/base/platform/platform-redox.cc 1970-01-01 07:00:00.000000000 +0700 +++ source-new/deps/v8/src/base/platform/platform-redox.cc 2025-10-10 15:23:18.233737033 +0700 diff --git a/recipes/wip/libs/other/tree-sitter/recipe.toml b/recipes/wip/libs/other/tree-sitter/recipe.toml index 8285bd265..6cd7fd347 100644 --- a/recipes/wip/libs/other/tree-sitter/recipe.toml +++ b/recipes/wip/libs/other/tree-sitter/recipe.toml @@ -9,6 +9,6 @@ patches = [ template = "custom" script = """ DYNAMIC_INIT -PACKAGE_PATH=cli cookbook_cargo +PACKAGE_PATH=cli cookbook_cargo --config 'patch.crates-io.rustix.git = "https://github.com/bytecodealliance/rustix"' cookbook_cmake "${COOKBOOK_SOURCE}"/lib """ diff --git a/recipes/wip/libs/tls/openssl3/recipe.toml b/recipes/wip/libs/tls/openssl3/recipe.toml index 7b4acf98c..61fe6e4a8 100644 --- a/recipes/wip/libs/tls/openssl3/recipe.toml +++ b/recipes/wip/libs/tls/openssl3/recipe.toml @@ -21,6 +21,7 @@ COOKBOOK_CONFIGURE_FLAGS=( enable-zstd "${OS}-${ARCH}" --prefix="/usr" + --openssldir="/etc/ssl" ) if [ "${COOKBOOK_DYNAMIC}" = "1" ]; then @@ -32,5 +33,4 @@ fi "${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" "${COOKBOOK_MAKE}" -j1 # bug in make/ar "${COOKBOOK_MAKE}" install_sw install_ssldirs DESTDIR="${COOKBOOK_STAGE}" -rm -rfv "${COOKBOOK_STAGE}/"{share,ssl} """ diff --git a/recipes/wip/text/neovim/recipe.toml b/recipes/wip/text/neovim/recipe.toml index 1f29bff5f..b0379ef32 100644 --- a/recipes/wip/text/neovim/recipe.toml +++ b/recipes/wip/text/neovim/recipe.toml @@ -1,4 +1,5 @@ -#TODO mostly work, kinda slow, can't quit (signal issues?) +#TODO working with workarounds on SIGCHLD +#TODO no documentation [source] git = "https://github.com/neovim/neovim" rev = "v0.11.5" @@ -37,6 +38,9 @@ cookbook_cmake # needed to workaround bootstrapping process cp ./lib/libnlua0.so ${COOKBOOK_STAGE}/usr/lib/nvim/ +patchelf --replace-needed \ + "${COOKBOOK_SYSROOT}/usr/lib/liblpeg.so" \ + 'liblpeg.so.1' ${COOKBOOK_STAGE}/usr/lib/nvim/libnlua0.so else diff --git a/recipes/wip/text/neovim/redox.patch b/recipes/wip/text/neovim/redox.patch index c8ea25b56..694ace266 100644 --- a/recipes/wip/text/neovim/redox.patch +++ b/recipes/wip/text/neovim/redox.patch @@ -1,7 +1,8 @@ -diff -ruwN source/runtime/CMakeLists.txt source-new/runtime/CMakeLists.txt ---- source/runtime/CMakeLists.txt 2025-07-13 01:34:12.000000000 +0700 -+++ source-new/runtime/CMakeLists.txt 2025-09-16 14:46:20.134790482 +0700 -@@ -24,37 +24,6 @@ +diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt +index d103b5f4..37d9444e 100644 +--- a/runtime/CMakeLists.txt ++++ b/runtime/CMakeLists.txt +@@ -24,37 +24,6 @@ add_custom_command(OUTPUT ${GENERATED_SYN_VIM} file(GLOB PACKAGES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/pack/dist/opt/*) @@ -39,7 +40,7 @@ diff -ruwN source/runtime/CMakeLists.txt source-new/runtime/CMakeLists.txt set(BUILDDOCFILES) foreach(DF ${DOCFILES}) get_filename_component(F ${DF} NAME) -@@ -65,8 +34,6 @@ +@@ -65,8 +34,6 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS} COMMAND ${CMAKE_COMMAND} -E remove_directory doc COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/runtime/doc doc @@ -48,7 +49,7 @@ diff -ruwN source/runtime/CMakeLists.txt source-new/runtime/CMakeLists.txt DEPENDS nvim_bin nvim_runtime_deps -@@ -78,7 +45,6 @@ +@@ -78,7 +45,6 @@ add_custom_target( DEPENDS ${GENERATED_SYN_VIM} ${GENERATED_HELP_TAGS} @@ -56,21 +57,22 @@ diff -ruwN source/runtime/CMakeLists.txt source-new/runtime/CMakeLists.txt ) # CMake is painful here. It will create the destination using the user's -@@ -88,10 +54,6 @@ +@@ -87,10 +53,6 @@ add_custom_target( + # seems like the best compromise. If we create it, then everyone can see it. # If it's preexisting, leave it alone. - install_helper( +-install_helper( - FILES ${GENERATED_HELP_TAGS} ${BUILDDOCFILES} - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/doc) - --install_helper( + install_helper( FILES ${GENERATED_SYN_VIM} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/nvim/runtime/syntax/vim) - -diff -ruwN source/src/nvim/CMakeLists.txt source-new/src/nvim/CMakeLists.txt ---- source/src/nvim/CMakeLists.txt 2025-07-13 01:34:12.000000000 +0700 -+++ source-new/src/nvim/CMakeLists.txt 2025-09-16 16:07:40.327319085 +0700 -@@ -93,19 +93,6 @@ +diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt +index 4a8fe4c6..55a9ede1 100644 +--- a/src/nvim/CMakeLists.txt ++++ b/src/nvim/CMakeLists.txt +@@ -93,19 +93,6 @@ if(NOT MSVC) endif() # -fstack-protector breaks Mingw-w64 builds @@ -90,7 +92,7 @@ diff -ruwN source/src/nvim/CMakeLists.txt source-new/src/nvim/CMakeLists.txt # Compiler specific options if(MSVC) -@@ -145,9 +132,6 @@ +@@ -145,9 +132,6 @@ endif() # Platform specific options if(UNIX) target_link_libraries(main_lib INTERFACE m) @@ -100,9 +102,27 @@ diff -ruwN source/src/nvim/CMakeLists.txt source-new/src/nvim/CMakeLists.txt endif() if(CMAKE_SYSTEM_NAME MATCHES "Windows") -diff -ruwN source/src/nvim/os/os_defs.h source-new/src/nvim/os/os_defs.h ---- source/src/nvim/os/os_defs.h 2025-07-13 01:34:12.000000000 +0700 -+++ source-new/src/nvim/os/os_defs.h 2025-09-16 13:45:00.379142388 +0700 +diff --git a/src/nvim/main.c b/src/nvim/main.c +index 5c1e415c..fa6fa859 100644 +--- a/src/nvim/main.c ++++ b/src/nvim/main.c +@@ -698,6 +698,12 @@ void getout(int exitval) + assert(!ui_client_channel_id); + exiting = true; + ++ // parent doesn't notice SIGCHILD ++ pid_t ppid = getppid(); ++ if (ppid > 1) { ++ kill(ppid, SIGKILL); ++ } ++ + // make sure startuptimes have been flushed + time_finish(); + +diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h +index db575e00..b42cee2a 100644 +--- a/src/nvim/os/os_defs.h ++++ b/src/nvim/os/os_defs.h @@ -28,6 +28,8 @@ #if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX) @@ -112,3 +132,24 @@ diff -ruwN source/src/nvim/os/os_defs.h source-new/src/nvim/os/os_defs.h #endif #define BASENAMELEN (NAME_MAX - 5) +diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c +index 7dff8a1b..ebc61542 100644 +--- a/src/nvim/os/shell.c ++++ b/src/nvim/os/shell.c +@@ -880,7 +880,16 @@ static int do_os_system(char **argv, const char *input, size_t len, char **outpu + MultiQueue *events = multiqueue_new_child(main_loop.events); + proc->events = events; + proc->argv = argv; ++#ifdef __redox__ ++ msg_puts("Shell execution is disabled until https://gitlab.redox-os.org/redox-os/redox/-/issues/1762 closed and this workaround removed\n"); ++ loop_poll_events(&main_loop, 0); ++ multiqueue_free(events); ++ return -1; ++ int status = -1; ++#else + int status = proc_spawn(proc, has_input, true, true); ++#endif ++ + if (status) { + loop_poll_events(&main_loop, 0); + // Failed, probably 'shell' is not executable.