Open blueyed opened 9 years ago
Yes, please.
Meanwhile, I think you can do it like this:
nix-shell '<nixpkgs>' -A hello --command "exec zsh; return"
Would be nice to allow nix-shell
inherit user preffered $SHELL when use default.nix and/or shell.nix
I have made a pull request for this: #545
If you just want a zsh inside a nix shell, this should work find: nix-shell -p zsh --run zsh ...
@jasom Your suggestion doesn't work for development sandbox types of purposes.
For instance, if I run nix-shell . --run zsh
or nix-shell . --command zsh
for a Ruby development shell, I can't see the shell sandbox environment's bundle
command that is declared in default.nix
nevermind, posted to the wrong issue - see https://github.com/NixOS/nixpkgs/issues/29960
<plug shameless="true">
In the meantime zsh users can use my zsh-nix-shell plugin.</plug>
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/nix-shell-does-not-use-my-users-shell-zsh/5588/6
I marked this as stale due to inactivity. → More info
I closed this issue due to inactivity. → More info
Can this be re-opened? It's still an issue.
https://github.com/NixOS/nix/issues/355#issuecomment-56693101 mentions that you can use
$NIX_BUILD_SHELL
to specify the shell being used.This does not work for zsh (and probably any non-bash shell) however:
Source:
In https://github.com/NixOS/nix/issues/113 / https://github.com/NixOS/nix/commit/ed09d0c0a436a412893ffe817c842827abbec6ed, it was changed to use "bash" instead of
$SHELL
(by default).Is it possible and worthwhile to add support for non-Bash shells?
This would also include patches to scripts like https://github.com/NixOS/nix/blob/master/dev-shell then probably.