Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATCH version for channel is needed for this PR and not an issue as mentioned in #145 (see #145 (comment)).

channel = "1.85.0"
components = [ "rustfmt", "clippy" ]
targets = [ "wasm32-unknown-unknown" ]