From d1ccdcb3dc4aeba900cc937787843166929964eb Mon Sep 17 00:00:00 2001 From: macronova Date: Sat, 13 Jan 2024 16:57:25 +0800 Subject: [PATCH] Add rust-analyzer to rust template --- template/rust/flake.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template/rust/flake.nix b/template/rust/flake.nix index 7eba7e7..56b9f24 100644 --- a/template/rust/flake.nix +++ b/template/rust/flake.nix @@ -14,6 +14,7 @@ flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; + fenixPkgs = fenix.packages.${system}; craneLib = crane.lib.${system}; src = craneLib.cleanCargoSource (craneLib.path ./.); @@ -33,7 +34,7 @@ }; craneLibLLvmTools = craneLib.overrideToolchain - (fenix.packages.${system}.complete.withComponents [ + (fenixPkgs.complete.withComponents [ "cargo" "llvm-tools" "rustc" @@ -115,6 +116,7 @@ # Extra inputs can be added here; cargo and rustc are provided by default. packages = [ + fenixPkgs.rust-analyzer # pkgs.ripgrep ]; };