[Nix-dev] nix-shell (was: Python 3 as default)
zimbatm
zimbatm at zimbatm.com
Tue Feb 14 20:02:56 CET 2017
Point 4 is really the biggest problem for me because the user loses
control. Especially when combined with direnv the user might be surprised
with a big update by just changing directory.
I think that this can be solved using a profile. The user would load the
profile with nix-shell and use nix-build to switch profiles.
On Tue, 14 Feb 2017, 17:45 Peter Simons, <simons at nospf.cryp.to> wrote:
> Hi Profpatsch,
>
> >> I hardly ever use nix-shell and I don't want to, to be honest.
> >
> > Why is that?
>
> 1. I don't need it. Adding those Haskell/Python/LaTeX/R modules that I
> need into my global user environment works just fine. I suppose there
> might be occasions where versions conflict in a way that makes it
> impossible to add them into the same environment, but I haven't
> actually encountered that problem yet. Since I don't need more than
> one shell environment, I don't have to bother will shell.nix files,
> and I don't have to remember which open shell window is running which
> environment either.
>
> 2. nix-shells don't nest. And even if they would, many things you'll
> define inside of a nix-shell won't nest. Thus, you cannot easily
> compose shell environments, which makes it hard to define accurate
> environments in a modular and re-usable fashion.
>
> 3. nix-shell interacts poorly with long-running processes. I work on all
> my projects with Emacs, but I don't want to start Emacs inside of a
> nix-shell created for one particular project. My Emacs is up and
> running from the moment I log in and then I don't ever quit it unless
> I absolutely have to. So having a proper build environment in "some
> other window" isn't very useful to me. I want to compile by hitting
> C-c C-c or C-c C-l.
>
> 4. When I update my copy of the Nixpkgs repository, I run "nix-env -u
> --always" and afterwards everything I'll need to work on all of my
> projects is available locally in my /nix store. If I see that Nix
> needs to compile hundreds of packages to do the update, then I may or
> may not decide to postpone the update. When using nix-shell, I won't
> know whether it needs to compile for an hour until I've actually run
> it, i.e. I'll notice that I can't start hacking on some project only
> after I've decided I want to do that. With one global environment, I
> have that information for all my projects at the time I decide
> whether to update or not.
>
> 5. The default nix-shell prompt in bash does not distinguish between
> "root" and normal users. ;-)
>
> Having said all that, I believe that nix-shell is genuinely useful and I
> do use it every now and then. I wouldn't want to get along without it. I
> just wouldn't want to use it as much as some people apparently do.
>
> Best regards,
> Peter
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20170214/83280f93/attachment-0001.html>
More information about the nix-dev
mailing list