mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 11:15:13 +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.
48 lines
1.2 KiB
Text
48 lines
1.2 KiB
Text
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=nsh
|
|
pkgver=0.4.2
|
|
pkgrel=0
|
|
pkgdesc="A command-line shell like fish, but POSIX compatible"
|
|
url="https://github.com/nuta/nsh"
|
|
arch="aarch64 armhf armv7 ppc64le x86 x86_64" # limited by rust/cargo
|
|
license="CC0-1.0 OR MIT"
|
|
# bash is needed for completion
|
|
depends="bash"
|
|
checkdepends="python3 py3-termcolor"
|
|
makedepends="cargo"
|
|
install="$pkgname.post-install $pkgname.pre-deinstall"
|
|
subpackages="$pkgname-dbg"
|
|
source="https://github.com/nuta/nsh/archive/v$pkgver/nsh-$pkgver.tar.gz"
|
|
|
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Optimize for size (1.9 -> 1.4 MiB).
|
|
sed -i 's/^opt-level\s*=.*/opt-level = "z"/' Cargo.toml
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --release --frozen
|
|
}
|
|
|
|
check() {
|
|
# Disabled due to: "`![feature]` may not be used on the stable release channel`"
|
|
#cargo test --frozen
|
|
|
|
# Integration tests
|
|
./test.py
|
|
}
|
|
|
|
package() {
|
|
cargo install --locked --offline --path . --root="$pkgdir/usr"
|
|
rm "$pkgdir"/usr/.crates*
|
|
}
|
|
|
|
sha512sums="
|
|
5b8e4b27526c567c12e79b1583b5036a2c28aca4bb58256f2d66714c37d4b89cfb77ec1c8124602b2786fbd05c52f01a12d10f7de18c548e88fe96dbbf5d7615 nsh-0.4.2.tar.gz
|
|
"
|