From 992b88b87d17c6bd801d76159f4bdb0ec80d1d9b Mon Sep 17 00:00:00 2001 From: Bryan Bennett Date: Fri, 31 May 2024 07:59:12 -0400 Subject: [PATCH] Set IN_NIX_SHELL explicitly in use_nix --- direnvrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/direnvrc b/direnvrc index 5bfeb85..f7282a2 100644 --- a/direnvrc +++ b/direnvrc @@ -467,6 +467,11 @@ use_nix() { fi fi + # Some builtin nix tooling depends on this variable being set BEFORE their invocation to change their behavior + # (notably haskellPackages.developPackage returns an env if this is set) + # This allows us to more closely mimic nix-shell. + export IN_NIX_SHELL="impure" + if tmp_profile_rc=$(_nix \ print-dev-env \ --profile "$tmp_profile" \