aboutsummaryrefslogtreecommitdiff
path: root/srcpkgs/helix/template
blob: 92c74a7482b163157d4f84f9d14070ba914475f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Template file for 'helix'
pkgname=helix
version=24.03
revision=1
build_style=cargo
make_install_args="--path helix-term"
short_desc="Post-modern modal text editor"
maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
license="MPL-2.0"
homepage="https://helix-editor.com/"
changelog="https://raw.githubusercontent.com/helix-editor/helix/master/CHANGELOG.md"
distfiles="https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-source.tar.xz"
checksum=c59a5988f066c2ab90132e03a0e6b35b3dd89f48d3d78bf0ec81bd7d88c7677e

case "$XBPS_TARGET_MACHINE" in
	ppc64*) ;;
	ppc*) broken="no AtomicU64 in sync::atomic";;
esac

# Checks for Git to fetch tree-sitter grammars, even though they're already
# present in the tarball
# See https://github.com/helix-editor/helix/pull/7320
export PATH="$PATH:/usr/libexec/chroot-git"

post_install() {
	rm runtime/grammars/.gitkeep
	rm runtime/themes/README.md
	rm -rf runtime/grammars/sources

	for shell in bash zsh fish; do
		vcompletion contrib/completion/hx.${shell} ${shell} hx
	done

	vinstall contrib/Helix.desktop 644 usr/share/applications
	vinstall contrib/helix.png 644 usr/share/icons/hicolor/128x128/apps

	vmkdir usr/lib/helix
	vcopy runtime usr/lib/helix
	mv ${DESTDIR}/usr/bin/hx ${DESTDIR}/usr/lib/helix/
	ln -s /usr/lib/helix/hx ${DESTDIR}/usr/bin/
}