[Nix-dev] Are nix-shells supposed to nest?
Peter Simons
simons at cryp.to
Mon Feb 15 21:47:29 CET 2016
Hi folks,
the Github issue #13011 [1] asks an interesting question, namely: can we
nest nix-shell environments? A simple experiment suggests it's possible,
but the result you get when do you it is quite surprising:
$ nix-shell -p haskell.compiler.ghc784 --run 'nix-shell -p haskell.compiler.ghc7103 --run "ghc --version"'
The Glorious Glasgow Haskell Compilation System, version 7.8.4
Apparently, the inner shell ends up being the outer shell in that
example. So now I wonder: can someone explain why $PATH is set up in
that example as it is?
And what is our policy with regard to that feature? Can users of
nix-shell expect nested shells to work in some predictable way? Or is
that something you're not supposed to do?
Best regards,
Peter
[1] https://github.com/NixOS/nixpkgs/issues/13011
More information about the nix-dev
mailing list