# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=irust
pkgver=1.71.29
pkgrel=0
pkgdesc="Cross-platform Rust REPL"
url="https://github.com/sigmaSd/IRust"
arch="all"
license="MIT"
depends="cargo rust"
makedepends="cargo cargo-auditable"
source="https://github.com/sigmaSd/IRust/archive/irust@$pkgver/irust-$pkgver.tar.gz"
builddir="$srcdir/IRust-irust-$pkgver"
options="!check"  # FIXME: tests don't run on CI (require TTY)

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -D -m755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
950b634f362e4adc4f913efac698569948c3fa229f451d51dcff9bf403ddec80d9e8d5f0c1542c0046471c24db46e94272199e6aeff33b14f792263a6d680d0a  irust-1.71.29.tar.gz
"
