mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 11:45:18 +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.
56 lines
1.4 KiB
Text
56 lines
1.4 KiB
Text
# Contributor: nibon7 <nibon7@163.com>
|
|
# Maintainer: nibon7 <nibon7@163.com>
|
|
pkgname=nushell
|
|
pkgver=0.76.0
|
|
pkgrel=0
|
|
pkgdesc="A new type of shell"
|
|
url="https://www.nushell.sh"
|
|
# s390x: nix crate
|
|
arch="all !s390x"
|
|
license="MIT"
|
|
makedepends="cargo openssl-dev>3 libx11-dev libxcb-dev libgit2-dev"
|
|
checkdepends="bash"
|
|
subpackages="$pkgname-plugins:_plugins"
|
|
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/nushell/nushell/archive/$pkgver.tar.gz"
|
|
|
|
# Reduce size of nu binary from 22.7 -> 13.8 MiB (on x86_64 with default feature).
|
|
export CARGO_PROFILE_RELEASE_LTO="fat"
|
|
|
|
# Temporarily allow textrels on riscv64
|
|
[ "$CARCH" = "riscv64" ] && options="$options textrels"
|
|
|
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --workspace --release --frozen
|
|
}
|
|
|
|
check() {
|
|
cargo test --workspace --frozen
|
|
}
|
|
|
|
package() {
|
|
find target/release \
|
|
-maxdepth 1 \
|
|
-executable \
|
|
-type f \
|
|
-name "nu*" \
|
|
-exec install -Dm755 '{}' -t "$pkgdir"/usr/bin/ \;
|
|
}
|
|
|
|
_plugins() {
|
|
pkgdesc="Nushell plugins"
|
|
depends="nushell"
|
|
|
|
mkdir -p "$subpkgdir"/usr/bin
|
|
mv "$pkgdir"/usr/bin/nu_plugin_* "$subpkgdir"/usr/bin/
|
|
}
|
|
|
|
sha512sums="92801ed4ab81ba50a488177cddd9ca595284e16d7caf78c02df7e6de4a9769aef66fcb8eb9eaf26ea8533a84ddf9af0253ff000c1e4b4b059cf2c66f9fb1fb0c nushell-0.76.0.tar.gz
|
|
"
|