[Nix-dev] Re: WIKI question misc.collection, multiple ghc in PATH, "bit of problem",

Marc Weber marco-oweber at gmx.de
Tue Aug 23 20:12:42 CEST 2011


Excerpts from Peter Simons's message of Tue Aug 23 19:29:54 +0200 2011:
> The title promises to explain "How to keep multiple packages up to date
> at once". The mechanism of choice for that task is a nix-env profile,
> which can be updated with "nix-env -u \*".
All right. We can discuss making it perfect. By "keeping up to date"
I mean keeping package up to date - and keeping yourself up to date
about removal of packages.

If you have Vim in your env and if Vim was dropped nix-env -i \* would
not tell you. using a collection still tries evaluating attr vim and
fails.

That's why I don't consider the -u being an alternative.


Also using collections enforce consistent snapshots: You always update
ghc and packages. You never update ghc-haskell-posix-regex only causing
ghc and library mismatches. Thus you eliminate potential problems.


The second thing is that I wrote the wiki so that I can tell people
"try this way" to do it once only. I haven't thought about adding all
possibilities.

That's why the page exist. I totally agree that it may not be perfect.
However it fails early. Thus I can always reinstall a collection and
know that all packages still exist and can be evaluated. No other
nix-env command provides this information. Its that important to me that
I use 5 collections and no single packages at all (only temporarily).

So do you suggest changing the scope of the article to 
"various ways by example to update packages and their pros and cons"?

1) nix-env -u\* (drawbacks see above)
2) use collections (..)

So maybe its my inability to find a proper heading. My it should be
changed to "how to atomically update many derivations which should be
updated at the same time (eg whose versions should match, such as python
and its libs or haskell and its libs or gimp and its plugins ...)"

But that would have been little too long.

Marc Weber



More information about the nix-dev mailing list