1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-15 20:25:17 +03:00
aports/testing/rust-script/APKBUILD
ptrcnull fbcf4c4f11 */*: utilise sparse crates.io fetches
this is a million times faster

new only in rust 1.68, and fails on older versions,
but we have only latest in aports and don't support anything else, so
it's okay.
2023-03-10 00:35:53 +01:00

41 lines
963 B
Text

# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=rust-script
pkgver=0.22.0
pkgrel=0
pkgdesc="Run Rust files and expressions as scripts without any setup or compilation step"
url="https://rust-script.org/"
license="Apache-2.0 OR MIT"
arch="all !armhf" # tests hang
makedepends="cargo"
source="https://github.com/fornwall/rust-script/archive/$pkgver/rust-script-$pkgver.tar.gz"
case "$CARCH" in
riscv64)
options="$options textrels"
;;
esac
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --frozen --release
}
check() {
cargo test --frozen
}
package() {
install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}
sha512sums="
a5a30b6a9defcea6a60ff1b240fa1817dfafddd3e323c311acbc209bc89a41582f4bdd2168a190b81fa4c7c37177501a35348711e95234c16899fc7d82717444 rust-script-0.22.0.tar.gz
"