aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterru <stuebinm@disroot.org>2024-05-28 10:01:37 +0000
committerGerrit Code Review <gerrit@lix-systems>2024-05-28 10:01:37 +0000
commit71b32bb87cd48dbbd672c8ca6b041ed36f3bae11 (patch)
tree26efcf5df2e8123041e6773d9aec953d11ce1693
parent0b91a4b0ec79c27ee36d8a7e2afd7737cb825b65 (diff)
parent7a12bc2007accb5022037b5a04b0e5475a8bb409 (diff)
Merge "package: don't run shellHook in nested nix-shells" into main
-rw-r--r--package.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/package.nix b/package.nix
index c888d67d4..05503ae98 100644
--- a/package.nix
+++ b/package.nix
@@ -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