From 69f8d744bf416df30b17b3415c734c642a892c80 Mon Sep 17 00:00:00 2001 From: a-kenji Date: Wed, 30 Oct 2024 19:48:56 +0100 Subject: [PATCH] devshells: Add rustc path directly --- nix/devshells.nix | 5 +++++ nix/env.nix | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nix/devshells.nix b/nix/devshells.nix index 55a4644..f48977a 100644 --- a/nix/devshells.nix +++ b/nix/devshells.nix @@ -1,6 +1,9 @@ _: { perSystem = { pkgs, self', ... }: + let + env = (import ./env.nix { inherit pkgs; }); + in { devShells = { default = pkgs.mkShellNoCC { @@ -14,6 +17,7 @@ _: { pkgs.rustc self'.formatter.outPath ]; + inherit env; }; full = pkgs.mkShellNoCC { inputsFrom = [ self'.devShells.default ]; @@ -24,6 +28,7 @@ _: { pkgs.mdsh pkgs.vhs ]; + inherit env; }; }; }; diff --git a/nix/env.nix b/nix/env.nix index 958608a..5c00ee7 100644 --- a/nix/env.nix +++ b/nix/env.nix @@ -1 +1,4 @@ -_: { } +{ pkgs, ... }: +{ + RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc; +}