[Nix-dev] upgrading `gcc-wrapper-4.7.2' to `gcc-wrapper-4.6.3'

Peter Simons simons at cryp.to
Sat Nov 10 12:30:26 CET 2012


Hi Malcolm,

 > I'm curious why it is considered an upgrade to go from 4.7.2 to 4.6.3.

GCC 4.6.3 is the current default compiler in Nixpkgs. Other versions of
GCC exist in the package database, but they have a lower priority than
the 4.6.3 version, so "nix-env" won't consider them during updates. The
nix-env man page says about this:

 | If there are multiple derivations matching a name in 'args' that have
 | the same name (e.g., gcc-3.3.6 and gcc-4.1.1), then the derivation
 | with the highest priority is used. A derivation can define a priority
 | by declaring the meta.priority attribute. This attribute should be a
 | number, with a higher value denoting a lower priority. The default
 | priority is 0.
 |
 | If there are multiple matching derivations with the same priority,
 | then the derivation with the highest version will be installed.

The command "nix-env -qa gcc-wrapper --xml --meta" shows you the meta
sections of all known versions of gcc. Look out for the

  <meta name="priority" type="string" value="..." />

attributes. If that attribute is unset, the default priority is "0".

Take care,
Peter



More information about the nix-dev mailing list