mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 02:50: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:
|
(system:
|
||||||
let
|
let
|
||||||
name = "himalaya";
|
name = "himalaya";
|
||||||
pkgs = import nixpkgs {
|
overlays = [ (import rust-overlay) ];
|
||||||
inherit system;
|
pkgs = import nixpkgs { inherit system overlays; };
|
||||||
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;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
# nix build
|
# nix build
|
||||||
|
@ -68,17 +57,19 @@
|
||||||
|
|
||||||
# nix develop
|
# nix develop
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
||||||
inputsFrom = builtins.attrValues self.packages.${system};
|
inputsFrom = builtins.attrValues self.packages.${system};
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
cargo
|
# Nix LSP + formatter
|
||||||
cargo-watch
|
|
||||||
trunk
|
|
||||||
ripgrep
|
|
||||||
rust-analyzer
|
|
||||||
rustfmt
|
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
|
||||||
|
# Rust env
|
||||||
|
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
||||||
|
cargo-watch
|
||||||
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
|
|
||||||
|
# Notmuch
|
||||||
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