mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 10:15:12 +03:00
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.
37 lines
970 B
Text
37 lines
970 B
Text
# Contributor: psykose <alice@ayaya.dev>
|
|
# Maintainer: psykose <alice@ayaya.dev>
|
|
pkgname=stylua
|
|
pkgver=0.16.1
|
|
pkgrel=0
|
|
pkgdesc="Opinionated Lua code formatter"
|
|
url="https://github.com/JohnnyMorganz/StyLua"
|
|
arch="all !s390x !riscv64" # blocked by cargo
|
|
license="MPL-2.0"
|
|
makedepends="cargo"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/JohnnyMorganz/StyLua/archive/refs/tags/v$pkgver.tar.gz"
|
|
builddir="$srcdir/StyLua-$pkgver"
|
|
|
|
_features="--no-default-features --features lua54,strum,serialize"
|
|
|
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --release --frozen $_features
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen $_features
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 target/release/stylua -t "$pkgdir"/usr/bin/
|
|
}
|
|
|
|
sha512sums="
|
|
3388592e73b5017685b48b4b5005d4dd60e758e9c638b8b08287992626bcce172b82789b5181e49d765340d42b292973c13f01c1421867789238cb70eeae0df7 stylua-0.16.1.tar.gz
|
|
"
|