# Template file for 'nushell'
pkgname=nushell
version=0.92.1
revision=1
build_style=cargo
configure_args="--features=dataframe"
hostmakedepends="pkg-config"
makedepends="openssl-devel libgit2-devel libzstd-devel sqlite-devel"
depends="mimalloc"
short_desc="Modern shell for the GitHub era"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://www.nushell.sh/"
changelog="https://www.nushell.sh/blog/"
distfiles="https://github.com/nushell/nushell/archive/refs/tags/${version}.tar.gz"
checksum=bd4d0b90ff7ba53ac888df755372a794a907f93963e26ff8f441347aa0ff5a95
register_shell="/usr/bin/nu"
# all tests fail with argument --target
make_check=no

case "$XBPS_TARGET_MACHINE" in
	i686*) broken="simd-json does not implement i686"	;;
	ppc*) broken="arrow-rs parquet is busted garbage" ;;
esac

if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
	XBPS_CROSS_RUSTFLAGS+=" -latomic"
fi

post_install() {
	vlicense LICENSE
	vsconf crates/nu-utils/src/sample_config/default_config.nu
	vsconf crates/nu-utils/src/sample_config/default_env.nu
	vsconf crates/nu-utils/src/sample_config/sample_login.nu
}
