maintainer="Michał Polański <michal@polanski.me>"
pkgname=hexyl
pkgver=0.15.0
pkgrel=0
pkgdesc="Command-line hex viewer with colored output"
url="https://github.com/sharkdp/hexyl"
license="MIT OR Apache-2.0"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/sharkdp/hexyl/archive/v$pkgver/hexyl-$pkgver.tar.gz"
options="net" # fetch dependencies

prepare() {
	default_prepare

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

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

check() {
	cargo test --frozen
}

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

sha512sums="
db1e0d96c655be1cb0cabb93daef7bd4176517a87a4f7de6c1cd00bcbadf725c297294b41009597eb1cf9891a0f29a3977f5fe1032a58e82d1c8792a3eaadbc4  hexyl-0.15.0.tar.gz
"
