1
0
Fork 0

Build(flake): Make it easier to switch to nightly

This commit is contained in:
Benedikt Peetz 2023-07-20 21:39:38 +02:00
parent 2a2c173683
commit 27e3ff228c
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
1 changed files with 7 additions and 4 deletions

View File

@ -45,10 +45,13 @@
overlays = [(import rust-overlay)];
};
#rust-nightly = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default);
rust-stable = pkgs.rust-bin.stable.latest.default;
nightly = true;
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; [
pkg-config
@ -79,7 +82,7 @@
statix
ltex-ls
rust-stable
rust
rust-analyzer
cargo-edit
cargo-expand