void-packages/srcpkgs/tree-sitter/template
Érico Nogueira 6660537f75 tree-sitter: cross build fails with Rust 1.57.0.
Per [1], a default hash builder only exits for std builds. This is
checked in [2], and that test is currently failing for us.

We don't want to fix it with the environment variable, because the
autocfg tests should be working.

[1] 0af3c466a7/src/map.rs (L70)
[2] 0af3c466a7/build.rs (L4)
2022-01-05 04:46:35 -03:00

38 lines
1.1 KiB
Bash

# Template file for 'tree-sitter'
pkgname=tree-sitter
version=0.20.2
revision=1
build_style=cargo
make_install_args="--path=cli"
short_desc="Parser generator tool and incremental parsing library"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="MIT"
homepage="https://tree-sitter.github.io"
distfiles="https://github.com/tree-sitter/tree-sitter/archive/v${version}.tar.gz"
checksum=2a0445f8172bbf83db005aedb4e893d394e2b7b33251badd3c94c2c5cc37c403
make_check=no # tests require generating fixtures from remote repositories
nocross=yes # fails with current rust
post_build() {
# Build libtree-sitter, since do_build builds the tree-sitter CLI.
make
}
post_install() {
# Install libtree-sitter, since do_install installs the tree-sitter CLI.
make STRIP=true PREFIX=/usr DESTDIR=${DESTDIR} install
vlicense LICENSE
}
tree-sitter-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/bin
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
}