[Nix-dev] Using several versions of GHC at once

Peter Simons simons at cryp.to
Mon Jun 17 10:33:58 CEST 2013


Hi Nikita,

 > How does 'nix-env -i' determine which version of a package it should install?

if there are two packages that have the same name, then nix-env will
prefer the one that has the higher version number.

If several packages have the same name and version number, then the one
with the higher priority will be preferred.

If several packages have the same name, version number, and priority,
then nix-env chooses the one saw first, i.e. it installs one of the
available choices at random.


 >   nix-env -f /home/nixpkgs-github/default.nix \
 >           -p ~/ghc-6.10.4 -iA pkgs.haskellPackages_ghc6104.binary

Line 139 in pkgs/top-level/haskell-defaults.nix overrides the 'binary'
attribute for that compiler, because it is too old to build more recent
versions of the binary library.


 > Can I safely assume that the following versions are the latest that
 > should work with GHC 6.10.4? [...]

I don't know. I haven't used GHC 6.10.4 in a long time. It's quite
possible that most packages in Nixpkgs cannot be built with that
compiler. We verify that the version of Haskell Platform this compiler
belongs to works fine, but that's pretty much it.

Take care,
Peter



More information about the nix-dev mailing list