[Nix-dev] nix-shell pro/con (was: Python 3 as default)

Thomas Tuegel ttuegel at mailbox.org
Thu Feb 23 19:45:23 CET 2017


Profpatsch <mail at profpatsch.de> writes:
> On 17-02-15 09:10pm, Ricardo M. Correia wrote:
>> With nix-shell, I risk having the packages I need become outdated (without
>> me noticing) and/or become garbage collected (which I do every day
>> automatically) and unavailable if I lose Internet access (e.g. because I'm
>> traveling).
>
> I think you are confusing nix-env and nix-shell; nix-shell can’t have
> “outdated” packages, it will use what you specify.
>
> packages being not cached is a largely orthogonal problem;
> for example it would be quite easy to create a script that fetches
> the nix-shell deps for all your projects and creates a folder with
> gc-roots.

The next version of cabal-install will perform this caching for you
automatically. It uses your shell.nix (if present) and adds GC roots for
the results. Your environment is not garbage collected or updated unless
you clear out the work directory or modify the shell.nix.

This is not relevant to the discussion of Python interpreters, but I
thought it would be of general interest.

Regards,
Thomas


More information about the nix-dev mailing list