diff --git a/flake.nix b/flake.nix index 6f383c7..0feeb81 100644 --- a/flake.nix +++ b/flake.nix @@ -52,8 +52,17 @@ extensions = ["rustc-codegen-cranelift-preview"]; } else pkgs.rust-bin.stable.latest.default; + rust_min = + if nightly + then + (pkgs.rust-bin.selectLatestNightlyWith (toolchain: + toolchain.minimal)) + .override { + extensions = ["rustc-codegen-cranelift-preview"]; + } + else pkgs.rust-bin.stable.latest.minimal; - craneLib = (crane.mkLib pkgs).overrideToolchain rust; + craneLib = (crane.mkLib pkgs).overrideToolchain rust_min; nativeBuildInputs = with pkgs; [ pkg-config