name=helix
version=25.07
release=1
desc="A post-modern modal text editor"
url="https://helix-editor.com/"
license="MPL-2.0"
depend="glibc"
makedepend="rust cargo"
source="https://github.com/helix-editor/helix/archive/refs/tags/25.07.tar.gz"
sha256="SKIP"

build() {
	cd "helix-25.07"
	export CARGO_HOME="${CARGO_HOME:-/tmp/scraplinux-cargo-home}"
	cargo build --release --locked
}

package() {
	cd "helix-25.07"
	install -Dm755 "target/release/helix" "$pkgdir/usr/bin/helix"
	for d in README.md README LICENSE; do
		[ -f "$d" ] && install -Dm644 "$d" "$pkgdir/usr/share/doc/helix/$d"
	done
	true
}
