%define bin_name nu
Name: nushell
Version: 0.92.2
Release: alt1
Summary: A new type of shell
License: MIT
Group: Publishing
Url: https://www.nushell.sh/
# https://github.com/nushell/nushell/archive/refs/tags/0.92.2.tar.gz
Source: %name-%version.tar.gz
Source1: vendor.tar

BuildRequires(pre): rpm-build-rust
BuildRequires: rust-cargo openssl-devel


%description
Nushell (or Nu for short) is a new type of shell that supports structured and typed data.

%prep
%setup -a 1
mkdir -p .cargo
cat >> .cargo/config <<EOF
[source.crates-io]
replace-with = "vendored-sources"

[source.vendored-sources]
directory = "vendor"
EOF

%build
%rust_build


%install
%rust_install %bin_name


%check
%rust_test --  --skip plugins --skip plugin_persistence

%files
%_bindir/%bin_name

%changelog
* Sat Apr 13 2024 ... 5.14.1-alt1
- Initial build.
