mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-08 10:12:59 +01:00
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
# Contributor: nibon7 <nibon7@163.com>
|
|
# Maintainer: nibon7 <nibon7@163.com>
|
|
pkgname=nushell
|
|
pkgver=0.73.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_CODEGEN_UNITS=1
|
|
export CARGO_PROFILE_RELEASE_LTO="fat"
|
|
export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
|
|
export CARGO_PROFILE_RELEASE_PANIC="abort"
|
|
|
|
# Temporarily allow textrels on riscv64
|
|
[ "$CARCH" = "riscv64" ] && options="$options textrels"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cargo fetch --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="9f300e9dd1fec930477bcf85d8fc23f49cf39ba625a4494c857a0c68cde9a5e98f4d4fd7585abaf61296e8787b81aaf9d15c35b8a02c96171bad2cd01d7b7d00 nushell-0.73.0.tar.gz
|
|
"
|