Build(flake): Make it easier to switch to nightly
This commit is contained in:
parent
2a2c173683
commit
27e3ff228c
11
flake.nix
11
flake.nix
|
@ -45,10 +45,13 @@
|
||||||
overlays = [(import rust-overlay)];
|
overlays = [(import rust-overlay)];
|
||||||
};
|
};
|
||||||
|
|
||||||
#rust-nightly = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
|
nightly = true;
|
||||||
rust-stable = pkgs.rust-bin.stable.latest.default;
|
rust =
|
||||||
|
if nightly
|
||||||
|
then pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default)
|
||||||
|
else pkgs.rust-bin.stable.latest.default;
|
||||||
|
|
||||||
craneLib = (crane.mkLib pkgs).overrideToolchain rust-stable;
|
craneLib = (crane.mkLib pkgs).overrideToolchain rust;
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
pkg-config
|
pkg-config
|
||||||
|
@ -79,7 +82,7 @@
|
||||||
statix
|
statix
|
||||||
ltex-ls
|
ltex-ls
|
||||||
|
|
||||||
rust-stable
|
rust
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
cargo-edit
|
cargo-edit
|
||||||
cargo-expand
|
cargo-expand
|
||||||
|
|
Reference in New Issue