build(flake): Use the minimal rust distribution for builds

This commit is contained in:
Benedikt Peetz 2023-11-07 20:48:06 +01:00
parent ebd3b0d476
commit 37a0834aa0
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
1 changed files with 10 additions and 1 deletions

View File

@ -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