Merge "package: don't run shellHook in nested nix-shells" into main

This commit is contained in:
terru - 2024-05-28 10:01:37 +00:00 committed by Gerrit Code Review
commit 71b32bb87c

View file

@ -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