Merge "package: don't run shellHook in nested nix-shells" into main
This commit is contained in:
commit
71b32bb87c
|
@ -414,6 +414,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
glibcFix
|
glibcFix
|
||||||
// {
|
// {
|
||||||
|
|
||||||
|
name = "lix-shell-env";
|
||||||
|
|
||||||
inputsFrom = [ finalAttrs ];
|
inputsFrom = [ finalAttrs ];
|
||||||
|
|
||||||
# For Meson to find Boost.
|
# For Meson to find Boost.
|
||||||
|
@ -437,6 +439,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
++ finalAttrs.checkInputs;
|
++ finalAttrs.checkInputs;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
# don't re-run the hook in (other) nested nix-shells
|
||||||
|
if [[ $name != lix-shell-env ]]; then
|
||||||
|
return;
|
||||||
|
fi
|
||||||
|
|
||||||
PATH=$prefix/bin:$PATH
|
PATH=$prefix/bin:$PATH
|
||||||
unset PYTHONPATH
|
unset PYTHONPATH
|
||||||
export MANPATH=$out/share/man:$MANPATH
|
export MANPATH=$out/share/man:$MANPATH
|
||||||
|
|
Loading…
Reference in a new issue