Skip to content

Commit cc224ea

Browse files
committed
packages(zellij): track latest stable, build Rust via rustup (#198)
Per review: track the latest stable zellij rather than pinning to an old release to match Fedora's Rust. - Bump to 0.44.3 (latest stable; needs Rust 1.92). - Build with a rustup-managed toolchain instead of Fedora's rust/cargo. The spec reads the Rust channel from the source's rust-toolchain.toml and installs exactly that, so a Version bump is all it takes to follow a new zellij — no coordinating with the chroot's Rust version. - Extract the channel, remove rust-toolchain.toml, then install+default the toolchain explicitly (minimal profile, host target only) so cargo doesn't pull the wasm32/musl targets it lists; we only build the host binary crate (plugins stay prebuilt). Robust against rustup 1.28's change where `rustup show` no longer auto-installs. - BuildRequires rustup + git; still needs COPR "internet access during builds". README version/notes updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SDzdtoy59UEWDZvZhZBkhB
1 parent a818cfa commit cc224ea

2 files changed

Lines changed: 33 additions & 15 deletions

File tree

packages/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,9 +443,9 @@ These have no hyprland dependencies and can be built in parallel.
443443
|---------|-------|
444444
| Subdir | `packages/zellij` |
445445
| Spec File | `zellij.spec` |
446-
| Version | 0.43.1 |
446+
| Version | 0.44.3 |
447447
| Dependencies | None |
448-
| Notes | Terminal workspace/multiplexer. **Requires "Enable internet access during builds"** (cargo fetches crates). Pinned to 0.43.1 (Rust 1.84) — newer releases need Rust ≥1.92. |
448+
| Notes | Terminal workspace/multiplexer. **Requires "Enable internet access during builds"** (bootstraps rustup + cargo fetches crates). Builds with a rustup-managed toolchain driven by the source's `rust-toolchain.toml`, so it tracks the latest stable zellij regardless of Fedora's Rust version. |
449449

450450
---
451451

@@ -539,4 +539,4 @@ To ensure dependencies are satisfied, build in this order:
539539
| 32 | lazyjournal | `packages/lazyjournal` | `lazyjournal.spec` | 0.8.4 |
540540
| 33 | lazysql | `packages/lazysql` | `lazysql.spec` | 0.4.6 |
541541
| 34 | resterm | `packages/resterm` | `resterm.spec` | 0.20.3 |
542-
| 35 | zellij | `packages/zellij` | `zellij.spec` | 0.43.1 |
542+
| 35 | zellij | `packages/zellij` | `zellij.spec` | 0.44.3 |

packages/zellij/zellij.spec

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
# NOTE: This package requires "Enable internet access during builds" in COPR
2-
# settings (cargo fetches crate dependencies during the build).
2+
# settings — the build bootstraps rustup and cargo fetches crates over the network.
33

44
%global debug_package %{nil}
55

66
Name: zellij
7-
Version: 0.43.1
7+
Version: 0.44.3
88
Release: 1%{?dist}
99
Summary: A terminal workspace and multiplexer
1010

1111
License: MIT
1212
URL: https://github.com/zellij-org/zellij
1313
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
1414

15-
BuildRequires: cargo >= 1.84
16-
BuildRequires: rust >= 1.84
15+
# We build with rustup (not Fedora's rust/cargo) so the compiler version is
16+
# driven by the source tree's rust-toolchain.toml. This lets the package track
17+
# the latest stable zellij without coordinating with whatever Rust the Fedora
18+
# chroot happens to ship (latest zellij needs Rust newer than Fedora's).
19+
BuildRequires: rustup
1720
BuildRequires: gcc
1821
BuildRequires: cmake
22+
BuildRequires: git
1923
BuildRequires: pkgconfig(openssl)
2024

2125
%description
@@ -25,17 +29,29 @@ only the main binary is compiled here (no wasm toolchain required).
2529

2630
%prep
2731
%autosetup -n %{name}-%{version}
28-
# Build with the distro's stock rust/cargo. Drop the upstream channel/target pin
29-
# so mock doesn't try to fetch a rustup toolchain or the wasm32 target — the
30-
# default plugins are already bundled as prebuilt .wasm under zellij-utils/assets.
31-
rm -f rust-toolchain.toml
3232

3333
%build
34-
# Build is handled in %%install: `cargo install --path .` builds only the zellij
35-
# binary crate (which embeds the prebuilt plugin assets), not the wasm plugin
36-
# crates, so no wasm32 target is needed.
34+
# Toolchain bootstrap and build happen in %%install (see below).
3735

3836
%install
37+
export RUSTUP_HOME=%{_builddir}/.rustup
38+
export CARGO_HOME=%{_builddir}/.cargo
39+
export PATH="${CARGO_HOME}/bin:${PATH}"
40+
41+
# Read the Rust channel this release pins (rust-toolchain.toml, currently
42+
# "1.92.0") and install exactly that with rustup. Reading it from the source
43+
# tree means bumping Version above is all it takes to follow a new zellij — the
44+
# build never depends on whatever Rust the Fedora chroot ships. We then remove
45+
# the file and pin the toolchain explicitly, so cargo doesn't also try to add
46+
# the wasm32/musl targets it lists (we only build the host binary).
47+
toolchain="$(sed -n 's/^[[:space:]]*channel[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' rust-toolchain.toml)"
48+
rm -f rust-toolchain.toml
49+
rustup-init -y --no-modify-path --profile minimal --default-toolchain none
50+
rustup toolchain install "${toolchain}" --profile minimal
51+
rustup default "${toolchain}"
52+
53+
# Build only the zellij binary crate; the default plugins are embedded from the
54+
# prebuilt .wasm under zellij-utils/assets, so the wasm32 target is never built.
3955
RUSTFLAGS='-C strip=symbols' cargo install --locked --root=%{buildroot}%{_prefix} --path .
4056

4157
# Remove cargo bookkeeping created by `cargo install`
@@ -59,5 +75,7 @@ mkdir -p %{buildroot}%{_datadir}/fish/vendor_completions.d
5975
%{_datadir}/fish/vendor_completions.d/%{name}.fish
6076

6177
%changelog
62-
* Wed Jun 24 2026 Hypercube <hypercube@binarypie.dev> - 0.43.1-1
78+
* Wed Jun 24 2026 Hypercube <hypercube@binarypie.dev> - 0.44.3-1
6379
- Initial package for Hypercube
80+
- Build with rustup-managed toolchain (per upstream rust-toolchain.toml) so the
81+
package tracks the latest stable zellij regardless of Fedora's Rust version

0 commit comments

Comments
 (0)