Skip to content

chore(nix): migrate flake to red-tape and bump nixpkgs#164

Merged
otavio merged 4 commits into
masterfrom
chore/nix-red-tape
Apr 23, 2026
Merged

chore(nix): migrate flake to red-tape and bump nixpkgs#164
otavio merged 4 commits into
masterfrom
chore/nix-red-tape

Conversation

@otavio

@otavio otavio commented Apr 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Migrate the flake from flake-utils to phaer/red-tape (a filesystem-convention flake builder). The devShell now lives in devshell.nix and is auto-wired by red-tape; flake.nix is down to a one-liner that delegates to red-tape.mkFlake.
  • Bump nixpkgs from nixos-24.05 to nixos-25.11 and refresh fenix / rust-analyzer lock entries. Pin red-tape.inputs.nixpkgs to follow root so only one nixpkgs tree is evaluated.
  • Read the MSRV channel from Cargo.toml via lib.importTOML so the fenix toolchain stays in sync with package.rust-version.
  • Add xz, bzip2, zlib, libxml2, and openssl to the devShell so cargo check --all-features (which turns on the static meta-feature) builds out of the box in the shell.
  • Fix docs.rs rendering for 0.16.0 (doc_status: false): [package.metadata.docs.rs] all-features = true was activating static, which made build.rs probe libb2 — not present in the docs.rs crates-build-env. Narrow to features = ["futures_support", "tokio_support"]; the static_* features have no public API surface so docs lose nothing.

Test plan

  • nix flake show lists devShells.${system}.default
  • nix develop enters the shell; reports rustc 1.82.0, cargo 1.82.0, libarchive 3.8.6
  • cargo check (default features) passes inside the devshell
  • cargo check --all-features passes inside the devshell
  • cargo test --lib passes
  • cargo doc --no-deps --features futures_support,tokio_support renders cleanly (mirrors the new docs.rs invocation)
  • docs.rs successfully renders the next release after this lands

otavio added 4 commits April 23, 2026 11:20
- Replace the flake-utils boilerplate with red-tape's mkFlake, moving the devShell definition
  into a dedicated devshell.nix that red-tape picks up automatically.
- Bump nixpkgs to nixos-25.11 and refresh the fenix / rust-analyzer lock entries that come with
  it.
- Drop the stale shellHook comment now that the surrounding code has been tidied up.
The devshell only listed libb2/lz4/zstd, so `cargo check --all-features`
(which turns on `static`) failed probing lzma/bzip2/z/xml2 — and then
libarchive's own static link needed libcrypto. Add xz, bzip2, zlib,
libxml2, and openssl so the full feature set builds out of the box.
`[package.metadata.docs.rs] all-features = true` turned on the `static`
feature, which made build.rs pkg-config-probe libb2 — and that library
is not present in the docs.rs crates-build-env, so docs for 0.16.0 fail
to render (`doc_status: false`).

The static_* features are compile-only (no public API surface), so
documenting without them loses nothing. Explicitly list the feature
sets users care about instead: futures_support and tokio_support (both
transitively enable async_support).
@otavio
otavio merged commit 0d47392 into master Apr 23, 2026
@otavio
otavio deleted the chore/nix-red-tape branch April 23, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant