mirror of
https://github.com/nix-community/nix-direnv.git
synced 2024-08-16 23:10:24 +03:00
Merge pull request #498 from nix-community/GH-491
GH-491: Explictly set IN_NIX_SHELL to more closely mimic nix-shell execution
This commit is contained in:
commit
43c097bd54
6
direnvrc
6
direnvrc
@ -1,3 +1,4 @@
|
||||
# -*- mode: sh -*-
|
||||
# shellcheck shell=bash
|
||||
|
||||
NIX_DIRENV_VERSION=3.0.4
|
||||
@ -467,6 +468,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" \
|
||||
|
Loading…
Reference in New Issue
Block a user