Skip to content

Fix Nixel build - #216

Merged
lucperkins merged 9 commits into
mainfrom
fix-nixel
Feb 13, 2026
Merged

lucperkins merged 9 commits into
mainfrom
fix-nixel

Conversation

@lucperkins

@lucperkins lucperkins commented Feb 12, 2026 •

Copy link
Copy Markdown
Member

Getting Nixel to compile properly has been a bit of a thorn in our side for fh, forcing us to lock our fenix input (and thus our Rust version) in a way that we don't love. This PR fixes the Nixel build by removing the explicit NIX_CFLAGS_COMPILE environment variable (I came upon this solution basically by looking at Nixel's flake and noting that only LIBCLANG_PATH is set there). This will enable us to update fenix normally and have an up-to-date Rust henceforth.

I also used this as an opportunity to upgrade to the 2024 edition of Rust.

Note

The diff is fairly large here but there are no substantive changes to fh here. The Rust changes are all related to formatting and Clippy.

Summary by CodeRabbit

  • Chores

    • Upgraded to Rust edition 2024
    • Updated development environment configuration and tooling setup
  • Refactor

    • Simplified internal code patterns and improved maintainability across CLI commands and shared utilities
    • Cleaned up internal API structures for a more streamlined codebase

@coderabbitai

coderabbitai Bot commented Feb 12, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Upgrades Rust edition to 2024 in Cargo.toml, updates Nix flake configuration with new formatter and build dependencies, and simplifies conditional logic patterns throughout the CLI module while removing unused public serializable structures.

Changes

Cohort / File(s) Summary
Build Configuration
Cargo.toml, flake.nix
Edition upgraded from 2021 to 2024. Flake input fenix unpinned to generic channel; formatter switched from nixfmt-rfc-style to nixfmt; build environment variables restructured with LD_LIBRARY_PATH added for Linux and NIX_CFLAGS_COMPILE removed.
CLI Conditional Refactoring
src/cli/cmd/add/mod.rs, src/cli/cmd/convert.rs, src/cli/cmd/eject/mod.rs, src/cli/cmd/login/mod.rs
Nested conditional checks replaced with single if-let guards combining pattern matching and validation; import reordering for consistency; bound-based match simplified to direct expression.
CLI Module Updates
src/cli/cmd/mod.rs
Import reorganization for headers and styling; destructuring simplified by removing explicit ref bindings; authentication logic consolidated into single chained condition; test macro adjusted to use slice literal.
Shared Module Cleanup
src/shared/mod.rs
Removed public serializable structs DaemonInfoReponse and NetrcTokenAddRequest.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Use secure packages #199: Modifies flake.nix formatter configuration and devShells attributes similarly, affecting public API outputs.

Suggested reviewers

  • colemickens
  • RossComputerGuy

Poem

🐰 A Rust edition hops ahead to twenty-twenty-four,
While nixfmt prances in, the old formatters no more,
Through CLI commands, conditions dance more fine—
If-lets now guard the logic with cleaner design,
Unused types retire as the code's reimagined!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title "Fix Nixel build" is vague and does not clearly convey the specific changes made, such as updating to Rust 2024 edition, modifying flake.nix configurations, or refactoring conditional logic. Consider a more descriptive title that captures the main changes, such as "Upgrade to Rust 2024 edition and fix Nixel build configuration" or "Update Rust edition and refactor build dependencies."
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-nixel

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@grahamc grahamc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy cow, way to go @lucperkins!

@lucperkins
lucperkins merged commit 3767f81 into main Feb 13, 2026
7 checks passed
@lucperkins
lucperkins deleted the fix-nixel branch February 13, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants