mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-21 18:40:19 +00:00
add rust toolchain.toml (#386)
* modified gitignore * fixing gitignore * reomving the himalaya.iml file * applied cargo fmt * adding rust-toolchain * restoring the .gitignore file * make nix use rust-toolchain.toml * add back rustfmt and rust-analyzer to buildInputs I opened an issue to see if its the correct behaviour from the overlay: https://github.com/oxalica/rust-overlay/issues/88. * adding clippy to rust-toolchain.toml Co-authored-by: Clément DOUIN <clement.douin@posteo.net>
This commit is contained in:
parent
bed5a3856b
commit
b6643be03f
2 changed files with 14 additions and 20 deletions
31
flake.nix
31
flake.nix
|
@ -16,19 +16,8 @@
|
|||
(system:
|
||||
let
|
||||
name = "himalaya";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
rust-overlay.overlay
|
||||
(self: super: {
|
||||
# Because rust-overlay bundles multiple rust packages
|
||||
# into one derivation, specify that mega-bundle here,
|
||||
# so that crate2nix will use them automatically.
|
||||
rustc = self.rust-bin.stable.latest.default;
|
||||
cargo = self.rust-bin.stable.latest.default;
|
||||
})
|
||||
];
|
||||
};
|
||||
overlays = [ (import rust-overlay) ];
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
in
|
||||
rec {
|
||||
# nix build
|
||||
|
@ -68,17 +57,19 @@
|
|||
|
||||
# nix develop
|
||||
devShell = pkgs.mkShell {
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
inputsFrom = builtins.attrValues self.packages.${system};
|
||||
buildInputs = with pkgs; [
|
||||
cargo
|
||||
cargo-watch
|
||||
trunk
|
||||
ripgrep
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
# Nix LSP + formatter
|
||||
rnix-lsp
|
||||
nixpkgs-fmt
|
||||
|
||||
# Rust env
|
||||
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
||||
cargo-watch
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
|
||||
# Notmuch
|
||||
notmuch
|
||||
];
|
||||
};
|
||||
|
|
3
rust-toolchain.toml
Normal file
3
rust-toolchain.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.58.1"
|
||||
components = ["cargo", "rustc", "rustfmt", "rust-analysis", "clippy"]
|
Loading…
Reference in a new issue