diff options
Diffstat (limited to 'rust')
-rw-r--r-- | rust/flake.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/rust/flake.nix b/rust/flake.nix index dc7c778..4512bed 100644 --- a/rust/flake.nix +++ b/rust/flake.nix @@ -50,10 +50,18 @@ overlays = [(import rust-overlay)]; }; - #rust-nightly = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default); - rust-stable = pkgs.rust-bin.stable.latest.default; + nightly = false; + rust_minimal = + if nightly + then pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal) + else pkgs.rust-bin.stable.latest.minimal; - craneLib = (crane.mkLib pkgs).overrideToolchain rust-stable; + rust_default = + if nightly + then pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default) + else pkgs.rust-bin.stable.latest.default; + + craneLib = (crane.mkLib pkgs).overrideToolchain rust_minimal; craneBuild = craneLib.buildPackage { src = craneLib.cleanCargoSource ./.; |