You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# FIXME:Is this correct? Should it use rust-overlay instead?
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
This would work in most cases, but ideally, the rust-src component is on par with the active rustc toolchain (that is how rustup does it).
I source the rust-src component from mozillapkgs and export RUST_SRC_PATH like so (I think oxalica/rust-overlay also exposes the same rust-src component through rust-bin.<channel>.latest.rust-src):
There has been some discussion about providing rust-src from the nix store and rust-analyzer (rust-analyzer tries to write a Cargo.lock to the nix store and fails) but I have had no trouble with this.
I use this in my rust + nix flake setup (which has been modified heavily based on your template, thanks for that).
The text was updated successfully, but these errors were encountered:
This would work in most cases, but ideally, the
rust-src
component is on par with the activerustc
toolchain (that is howrustup
does it).I source the
rust-src
component frommozillapkgs
and exportRUST_SRC_PATH
like so (I thinkoxalica/rust-overlay
also exposes the samerust-src
component throughrust-bin.<channel>.latest.rust-src
):RUST_SRC_PATH
should contain the following:There has been some discussion about providing
rust-src
from the nix store andrust-analyzer
(rust-analyzer
tries to write aCargo.lock
to the nix store and fails) but I have had no trouble with this.I use this in my rust + nix flake setup (which has been modified heavily based on your template, thanks for that).
The text was updated successfully, but these errors were encountered: