From 50cf0bae8990b8d2f6038739880693cc0ab36cc0 Mon Sep 17 00:00:00 2001 From: Quoc-Anh Nguyen Date: Fri, 10 Nov 2023 00:49:00 +0200 Subject: [PATCH] feat: merge rust pkgs into rust-toolchain (#28) * feat: merge rust pkgs into rust-toolchain * fix: fmt * Add rust-analyzer to toolchain (because why not) --------- Co-authored-by: Sridhar Ratnakumar <3998+srid@users.noreply.github.com> --- flake.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index aa252cf..a9f73e7 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,10 @@ nonRustDeps = [ pkgs.libiconv ]; + rust-toolchain = pkgs.symlinkJoin { + name = "rust-toolchain"; + paths = [ pkgs.rustc pkgs.cargo pkgs.cargo-watch pkgs.rust-analyzer pkgs.rustPlatform.rustcSrc ]; + }; in { # Rust package @@ -45,11 +49,9 @@ buildInputs = nonRustDeps; nativeBuildInputs = with pkgs; [ just - rustc - cargo - cargo-watch - rust-analyzer + rust-toolchain ]; + RUST_BACKTRACE = 1; }; # Add your auto-formatters here.