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
// {
name = "lix-shell-env";
inputsFrom = [ finalAttrs ];
# For Meson to find Boost.
@ -437,6 +439,11 @@ stdenv.mkDerivation (finalAttrs: {
++ finalAttrs.checkInputs;
shellHook = ''
# don't re-run the hook in (other) nested nix-shells
if [[ $name != lix-shell-env ]]; then
return;
fi
PATH=$prefix/bin:$PATH
unset PYTHONPATH
export MANPATH=$out/share/man:$MANPATH