[Nix-dev] different compiler versions at the same time ?

Marc Weber marco-oweber at gmx.de
Sat Jun 2 02:38:37 CEST 2007


How is this done using nix?

I think this applies to java/ python/ gcc as well.

Situation:
  I want to test a library/ application and check wether I can compile
  it with ghc-6.4, ghc-6.5 and ghc-6.6.

eg 
ghc = import ...  { 
  version = "6.4" 
}
mylib = import ... {
  inherit ghc
}

After installing (nix-env -i mylib) nix has put all attributes into the hash (thus the ghc version as well)

Now how can I tell nix to do the same using ghc {version=6.6; } ?
And if I can how do I tell nix-pkgs which mylib version to remove later
on ( the one having been compiled by 6.6 or 6.4 ?) They both share the
same name. Can I use the hash instead of the name?

Should I rename the package to
mylib-0.2-compiled-by-ghc-6.4 ?
mylib-0.2-compiled-by-ghc-6.6 ?

So I'll stick to one version for now..

Marc



More information about the nix-dev mailing list