-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
using stable
channel with rustfmt
from nightly
#136
Comments
You can pick one component from nightly toolchain and use [
(lib.hiPrio rust-bin.nightly."2023-09-01".rustfmt)
(rust-bin.stable.latest.default.override { /* default toolchain */ })
] |
I have the same question and find myself unsatisfied with the answer. devShells = eachSystem (system:
let pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
strictDeps = true;
packages = with pkgs; [
rust-bin.stable.latest.default.override
(lib.hiPrio (rust-bin.selectLatestNightlyWith (toolchain:
toolchain.minimal.override { extensions = [ "rustfmt" ]; })))
pkg-config
openssl
];
};
}); Obviously, that derivation would also overwrite I would like to stay up-to-date with the latest available nightly after every |
I don't like what I ended up with because, as you said, it is possible that one of these components doesn't build with the latest nightly. devShells = eachSystem (system:
let pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
strictDeps = true;
packages = with pkgs; [
(rust-bin.stable.latest.minimal.override {
extensions = [ "rust-docs" ];
})
(lib.hiPrio rust-bin.nightly.latest.clippy)
(lib.hiPrio rust-bin.nightly.latest.rustfmt)
(lib.hiPrio rust-bin.nightly.latest.rust-analyzer)
pkg-config
openssl
];
};
}); I'd like to see something like this: (rust-bin.selectLatestNightlyWith (toolchain:
toolchain.minimal.override { extensions = [ "rustfmt" ];
})).extensions.rustfmt |
Thanks @oxalica. I have this working. Like @spikespaz, I'd prefer not to pin a specific version of nightly and take advantage of |
When using
and
|
Trying to handle nightly more correctly, attempted this: devShells = eachSystem (system:
let pkgs = pkgsFor.${system};
in {
default = pkgs.mkShell {
strictDeps = true;
packages = with pkgs; [
(lib.hiPrio (rust-bin.stable.latest.minimal.override {
extensions = [ "rust-docs" "rust-analyzer" ];
}))
(rust-bin.selectLatestNightlyWith (toolchain:
toolchain.minimal.override {
extensions = [ "clippy" "rustfmt" ];
}))
pkg-config
openssl
];
};
}); Same problem though. |
Using stable |
@spikespaz There is
|
Does rust-overlay enable using
rustfmt
fromnightly
whilst otherwise using thestable
toolchain?With
rustup
both toolchains can be installed andnightly
can be targeted by runningcargo +nightly fmt
.#56 (comment) alludes to merging toolchains but I am not clear how this would be achieved.
Thanks for your efforts in creating and maintaining rust-overlay :)
The text was updated successfully, but these errors were encountered: