# Generated by rust2rpm 27 (originally, but heavily modified) %global __requires_exclude_from ^%{bash_completions_dir}/.*$ %global __requires_exclude_from ^%{fish_completions_dir}/.*$ %global __requires_exclude_from ^%{zsh_completions_dir}/.*$ %global debug_package %{nil} %define git_url https://github.com/prefix-dev/%{name} %ifarch x86_64 %define build_target x86_64-unknown-linux-gnu %else %define build_target aarch64-unknown-linux-gnu %endif Name: pixi Version: 0.62.0 Release: 1%{?dist} Summary: Package management made simple License: BSD-3-Clause URL: https://pixi.sh/ Source0: %{git_url}/releases/download/v%{version}/source.tar.gz#/%{name}-v%{version}_source.tar.gz # BuildRequires: openssl-devel BuildRequires: rust cargo %description %{name} is a cross-platform, multi-language package manager and workflow tool built on the foundation of the conda ecosystem. It provides developers with an exceptional experience similar to popular package managers like cargo or npm, but for any language. %prep %autosetup -n ./%{name}-%{version} %build export PIXI_SELF_UPDATE_DISABLED_MESSAGE="$(cat << 'EOF' `self-update` has been disabled for this build. | Run `sudo dnf upgrade pixi` instead | EOF )" # export OPENSSL_NO_VENDOR=1 export CARGO_HOME="$(realpath ./.cargo)" # A subshell is here to ensure the RUSTFLAGS variable is only modified temporarily ( # The RUSTFLAGS variable has to be modified so pixi can compile properly export RUSTFLAGS='-Cstrip=none -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes' # Build pixi cargo build -j4 --profile dist --target %build_target # cargo build -j4 --profile dist --target %build_target \ # --no-default-features --features native-tls ) # ⬇️ Both of these `cargo tree` commands takes way too long to execute. # # Generate a clean dependency graph # cargo tree --workspace --edges 'no-build,no-dev,no-proc-macro' \ # --no-dedupe --target all --prefix none \ # --format '# {l}' | # sed -e "s: / :/:g" -e "s:/: OR :g" | # sort -u # # Generate a LICENSE file for all cargo dependencies # cargo tree --workspace --edges 'no-build,no-dev,no-proc-macro' \ # --no-dedupe --target all --prefix none \ # --format '{l}: {p}' | # sed -e "s: ($(pwd)[^)]*)::g" -e 's: / :/:g' -e 's:/: OR :g' | # sort -u > ./LICENSE.dependencies %install # Create important directories in the buildroot install -d %{buildroot}{%{_bindir},%{bash_completions_dir},%{fish_completions_dir},%{zsh_completions_dir}} # install pixi target_exe='./target/%{build_target}/dist/%{name}' install -Dm 0755 "$target_exe" -t %{buildroot}%{_bindir} # generate completions "$target_exe" completion --shell bash > ./%{name}.bash "$target_exe" completion --shell fish > ./%{name}.fish "$target_exe" completion --shell zsh > ./%{name}.zsh # install completions install -Dm 0644 ./%{name}.bash %{buildroot}%{bash_completions_dir}/%{name} install -Dm 0644 ./%{name}.fish -t %{buildroot}%{fish_completions_dir} install -Dm 0644 ./%{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name} # Rename license for pixi_tomls rename -v LICENSE LICENSE.pixi_tomls ./docs/source_files/pixi_tomls/LICENSE %files %{_bindir}/%{name} %{bash_completions_dir}/%{name} %{fish_completions_dir}/%{name}.fish %{zsh_completions_dir}/_%{name} %license ./LICENSE %license ./crates/pixi/wix/resources/LICENSE.rtf %license ./docs/source_files/pixi_tomls/LICENSE.pixi_tomls %doc ./README.md ./CHANGELOG.md ./SECURITY.md %changelog %autochangelog