Re: [Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-13 Thread Andres Loeh
Hi Jason. I'm glad you were able to figure it out. Here is a bash script that I am personally using to maintain different profiles for different ghc versions. I call it nix-env-ghc: w=$1 v=$(echo $1 | sed 's/\.//g') p=$2 shift 2 nix-env -p $NIX_USER_PROFILE_DIR/ghc-$w -iA

[Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-12 Thread Yury G. Kudryashov
Jason Dusek wrote: I managed to build GHC 6.12 in Nix on Ubuntu after some help in an earlier discussion on this list. Now, my old Cabal (built through Nix) complains about an invalid package format; this is to be expected if it shells out to `ghc-pkg' to read the package list.

[Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-12 Thread Yury G. Kudryashov
Marc Weber wrote: I do have GHC 6.10 still installed; but why does it not build against the new GHC? Because of a design decision Andres Loeh once made: try cat `which ghc`. You'll see that ghc finds the packages containing ghc libraries by iterating over $PATH. Marc, did you see the

Re: [Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-12 Thread Marc Weber
Excerpts from Yury G. Kudryashov's message of Wed May 12 23:38:04 +0200 2010: Marc Weber wrote: I do have GHC 6.10 still installed; but why does it not build against the new GHC? Because of a design decision Andres Loeh once made: try cat `which ghc`. You'll see that ghc finds

Re: [Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-12 Thread Jason Dusek
2010/05/12 Marc Weber marco-owe...@gmx.de: In any case using a collection should fix the trouble once and forall (?) because packages are installed by attr path rather than by name. I always install by attr path. http://wiki.nixos.org/wiki/Howto_keep_multiple_packages_up_to_date_at_once I

Re: [Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-12 Thread Jason Dusek
2010/05/12 Yury G. Kudryashov urkud+...@ya.ru: You should use nix-env -i -A ... to select the needed cabal. It seems that `-A' wants me to specify an attribute. What is an attribute? -- Jason Dusek Linux User #510144 | http://counter.li.org/ ___

Re: [Nix-dev] Re: Building an old GHC for a new Cabal...

2010-05-12 Thread Jason Dusek
Oh, I figured it out. You can make `nix-env' spit out the attribute names for packages: nix-env -qa --attr-path '*' | egrep cabal So I was able to install it like this: nix-env --install -A nixpkgs_unstable.haskellPackages_ghc6122.cabalInstall080 The package within a package is