[Nix-dev] Using several versions of GHC at once
Marc Weber
marco-oweber at gmx.de
Mon Jun 17 11:01:51 CEST 2013
Hi Nikita,
If you still have trouble talk about the target packages you want to
compile and which ghc versions you have to use. Then we can try to find
a solution.
In general:
- cabal works, but doesn't find C dependencies usually, which is why we
use nix
- ghc 6.10 is rather old now, which is why most more recent packages
depend on more recent features (eg of cabal)
Also a lot of "base package refactoring" took place in the past, which
makes it unlikely that ghc 6.10 and 7.x compile the same packages with
the same set of dependencies. (was it after 6.10? I do no longer
remember)
Whenever you see "split-base" flags or the like that's a hint for
that change.
How is this solved? in nixpkgs this can only done kind of "manually" (?)
hack-nix evaluates the .cabal files and tries to find solutions. Its not
perfect either, because you have to set flags - otherwise there would be
too many options.
hack-nix works like this:
1) get package info from hackage
2) only use latest versions + manually selected older versions which are
required to make some packages compile
3) patch those .cabal or source files
4) based on that information create a new dump which is read by the
hack-nix evaluator.
When installing packages using hack-nix you can opt-in for automatic tag
generation which is very nice IMHO.
In any case, if you still have trouble talk about your real goal, which
should look like this:
- test package FOO-1.0 with ghc 6.10 and ghc 7.4
- test package BAR and ....
This way we can help to find the best way to make you happy.
Marc Weber
More information about the nix-dev
mailing list