From 34ca374e1416f30a02e57de96474670093000129 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 5 Sep 2024 22:03:06 +0200 Subject: [PATCH] put the whole rust toolchain into one package so Rider can handle it --- shell.nix | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/shell.nix b/shell.nix index 4b4eeca..6da3bc6 100644 --- a/shell.nix +++ b/shell.nix @@ -1,16 +1,24 @@ -{pkgs ? import {}}: -pkgs.mkShell { - nativeBuildInputs = with pkgs.buildPackages; [ - rustc cargo gcc rustfmt clippy +{pkgs ? import {}}: let + rust-toolchain = pkgs.symlinkJoin { + name = "rust-toolchain"; + paths = with pkgs; [rustc cargo rustPlatform.rustcSrc rustfmt clippy]; + }; +in + pkgs.mkShell { + nativeBuildInputs = with pkgs.buildPackages; [ + rust-toolchain - pkg-config - xe - lzma - cargo-tarpaulin - gnumake + pkg-config + xe + lzma - # dotnet-sdk_8 - ]; + cargo-tarpaulin - RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; -} + gcc + gnumake + + # dotnet-sdk_8 + ]; + + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; + }