[Nix-dev] Using several versions of GHC at once
Marc Weber
marco-oweber at gmx.de
Wed Jun 12 11:36:53 CEST 2013
Excerpts from Vladimír Čunát's message of Wed Jun 12 10:25:39 +0200 2013:
> Installing multiple versions at once does *not* imply installing them
> into one profile. What would "ghc" command do??
Most ghcs have symlinks to their version, eg bin/ghc-7.6.1
So installing them into the same profile should be working.
8/Setup --ghc ghc-7.6.1 should do.
However why not just use hack-nix and be done?
Configure your 5 different profiles for a project once and
load those configurations into your shell?
It looks like this:
.hack-nix-cabal-config
default:[("haskellPackages","nixOverlay.defaultHaskellPackages"),("flags","")]
ghc7:[("haskellPackages","pkgs.haskellPackages_ghc763"),("flags","")]
then run
hack-nix --build-env (default)
hack-nix --build-env-for ghc7 (ghc7 profile)
Then there are shell scripts in the current directory loading the one or
the other into the current shell environment. Use multiple shells to
test multiple versions at the same time.
More info:
https://nixos.org/wiki/Nixpkgs-haskell-overlay
Marc Weber
More information about the nix-dev
mailing list