You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling nix-shell inside a "nix-shell" (a shell that is the result of a Nix expression setting shellHook) will inherit the parent's shellHook, but this is never mentioned in the nix-shell man page.
I was vacillating between opening this documentation issue and filing a bug report, but I don't know if this is considered a bug. Personally, I prefer the nix develop approach for the shellHook only affecting a particular nix-shell invocation and not subsequent ones, but it is certainly not documented (or, at least, not in the nix-shell manual) so adding a note or a warning would definitely help.
Problem
Calling
nix-shell
inside a "nix-shell" (a shell that is the result of a Nix expression settingshellHook
) will inherit the parent'sshellHook
, but this is never mentioned in thenix-shell
man page.For example:
@abathur has more examples in this Discourse thread and also mentions commit 0135fd6 for
nix develop
to avoid this exact issue.Checklist
Proposal
I was vacillating between opening this documentation issue and filing a bug report, but I don't know if this is considered a bug. Personally, I prefer the
nix develop
approach for theshellHook
only affecting a particularnix-shell
invocation and not subsequent ones, but it is certainly not documented (or, at least, not in thenix-shell
manual) so adding a note or a warning would definitely help.Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: