[Nix-dev] selectVersion

Marc Weber marco-oweber at gmx.de
Thu Jan 29 16:38:52 CET 2009


> See, I don't understand what the advantage of this is over the old way, e.g.

I don't see a big advantage using selectVersion either.

  squids = recurseIntoAttrs( import ../servers/squid/squids.nix {
    inherit fetchurl stdenv perl lib composableDerivation;
  });
  squid = squids.squid3Beta; # has ipv6 support

Using the sequid design (which should only be used for small packages)
it is much easier to add and try a new version cause you only have to
copy paste a section within servers/squid/squids.nix.
You don't have to pass all teh arguments more than once.

But I see now that we do want static checking.
So I think using somthing like squids is fine only when you also bind
referenced versions again.

eg
sequid10 = squids.squid10; # used by xy
squid11  = squids.squid11; # used by zz

On the other hand cause nix is lazy you *should* run 
  nix-env -qa \* --out-path
or such anyway to verify everything is fine..

What I don't like about the older approach is cluttering up the
all-packages.nix by duplicating passing the same inputs again and again
for verions 1.1, 1.2, 1.3, ...

I think we agree that 
a) selectVersion could be romved
b) we want static checking for all important packages.

I've already given up static checking for some sub worlds such as
haskell packages.. Why? Because putting everything into all-packages.nix
could lead to

ghc68_xml_lib_20
ghc69_xml_lib_20
ghc11_xml_lib_20

which doesn't make that much sense for instance if you want to see
wether all the packages still build with ghc head.

Same for python2.4, python2.5, python2.5, python2.7, ...
and their libs..

Marc



More information about the nix-dev mailing list