fix: Use nightly rust tool chain in shell.nix

Note that the rust version is still stable in flake.nix which is used to build
the provide the app via flake.

The rustfmt.toml rules are only supported by rust nightly. With the current
stable rust tool chain in flake.nix, `cargo fmt` gives me warnings like
```
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `format_code_in_doc_comments = false`, unstable features are only available in n
```

The format result with those warnings is different from the current code base
for almost all files. I guess the main contributors of the repo use nightly
rust. If so, we should make it consistent in shell.nix to help other
contributors onboard with the same env.
This commit is contained in:
Sinkerine 2023-10-24 00:27:41 -07:00
parent 47df39ee20
commit 647bda93aa

View file

@ -2,7 +2,6 @@
pkgs.mkShell { pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
rustToolchain
rust-analyzer rust-analyzer
nodePackages.cspell nodePackages.cspell
@ -16,13 +15,13 @@ pkgs.mkShell {
ripgrep ripgrep
fzf fzf
zoxide zoxide
(rust-bin.nightly.latest.rust.override { extensions = [ "rust-src" ]; })
]; ];
buildInputs = with pkgs; lib.optionals stdenv.isDarwin ( buildInputs = with pkgs;
with darwin.apple_sdk.frameworks; [ Foundation ] lib.optionals stdenv.isDarwin
); (with darwin.apple_sdk.frameworks; [ Foundation ]);
env = { env = { RUST_BACKTRACE = "1"; };
RUST_BACKTRACE = "1";
};
} }