Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nix): rust overlay infinite recursion #2216

Merged
merged 1 commit into from
Jan 18, 2025
Merged

Conversation

eljamm
Copy link
Contributor

@eljamm eljamm commented Jan 18, 2025

The rust-overlay project strongly recommend not overlaying the global Rust platform since that can cause a dependency loop, creating an infinite recursion (see oxalica/rust-overlay#198 (comment)).

Instead, a custom rustPlatform can be passed to the derivation, as per the instructions in the Nixpkgs manual.

Fixes: #2215

The rust-overlay project strongly recommend NOT overlaying the global
Rust platform since that can cause a dependency loop, creating an
infinite recursion.

Instead, a custom `rustPlatform` can be passed to the derivation, as per
the instructions in the [Nixpkgs manual](https://nixos.org/manual/nixpkgs/stable/#using-rust-nightly-in-a-derivation-with-buildrustpackage).
Copy link
Owner

@sxyazi sxyazi left a comment

Choose a reason for hiding this comment

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

Thank you so much for the fix @eljamm !

@sxyazi sxyazi merged commit e37d8d6 into sxyazi:main Jan 18, 2025
6 checks passed
@eljamm eljamm deleted the fix-nix-rust branch January 18, 2025 10:11
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.

Nix flake build failed
2 participants