# Contributor: nibon7 # Maintainer: nibon7 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" 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 "