new package: helix (text editor) (#7046)

This commit is contained in:
Aditya Alok 2021-06-25 13:37:35 +05:30 committed by GitHub
parent fb69ea8dfe
commit c41c0f0e53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

23
packages/helix/build.sh Normal file
View File

@ -0,0 +1,23 @@
TERMUX_PKG_HOMEPAGE="https://helix-editor.com/"
TERMUX_PKG_DESCRIPTION="A post-modern modal text editor written in rust"
TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.2.1
TERMUX_PKG_SRCURL="https://github.com/helix-editor/helix.git"
TERMUX_PKG_GIT_BRANCH=v$TERMUX_PKG_VERSION
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install(){
termux_setup_rust
cargo build --jobs $TERMUX_MAKE_PROCESSES --target $CARGO_TARGET_NAME --release
cat > "hx" << EOF
#!${TERMUX_PREFIX}/bin/sh
HELIX_RUNTIME=${TERMUX_PREFIX}/lib/helix/runtime exec ${TERMUX_PREFIX}/lib/helix/hx "\$@"
EOF
install -Dm755 ./hx $TERMUX_PREFIX/bin/hx
mkdir -p ${TERMUX_PREFIX}/lib/helix
cp -r runtime ${TERMUX_PREFIX}/lib/helix
install -Dm755 -t ${TERMUX_PREFIX}/lib/helix target/${CARGO_TARGET_NAME}/release/hx
}