diff --git a/flake.nix b/flake.nix index 521c7e9..2307199 100644 --- a/flake.nix +++ b/flake.nix @@ -12,11 +12,20 @@ let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; + + rustToolchainToml = fromTOML (builtins.readFile ./rust-toolchain); + inherit (rustToolchainToml.toolchain) channel targets components; + + rustToolchain = pkgs.rust-bin.stable.${channel}.default.override { + extensions = components; + inherit targets; + }; + in with pkgs; { devShells.default = mkShell rec { buildInputs = [ # Rust - rust-bin.stable.latest.default + rustToolchain trunk # misc. libraries diff --git a/rust-toolchain b/rust-toolchain index b353e93..07740d6 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -5,6 +5,6 @@ # to the user in the error, instead of "error: invalid channel name '[toolchain]'". [toolchain] -channel = "1.85" # Avoid specifying a patch version here; see https://github.com/emilk/eframe_template/issues/145 +channel = "1.85.0" components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ]