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

2013-06-20 Thread Patrick Wheeler
I think you are looking for the `--preserve-installed` flag. # nix-env -iA nixpkgs.haskellPackages_ghc6104.ghc # nix-env --preserve-installed -iA nixpkgs.haskellPackages_ghc762.ghc in this case ghc is mapped to ghc-6.10.4 and `ghc-7.6.2` is of course mapped to ghc-7.6.2. Patrick On Tue, Jun

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

2013-06-17 Thread Marc Weber
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

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

2013-06-17 Thread Peter Simons
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 hig

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

2013-06-16 Thread Marc Weber
Excerpts from Vladimír Čunát's message of Sat Jun 15 22:12:29 +0200 2013: > Hmm, especially haskell packages are IMO better specified directly by > attribute. Not only those, See wiki "how to keep multiple packages up to date" Again, hack-nix just solves it by allowing you to write a simple conf

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

2013-06-15 Thread Vladimír Čunát
On 06/15/2013 10:06 PM, Nikita Karetnikov wrote: Priorities can be assigned in the sources. Could you show an example? It seems these files [1,2] don't have any. [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/haskell/binary/0.6.0.0.nix [2] https://github.com/Nix

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

2013-06-15 Thread Nikita Karetnikov
> Priorities can be assigned in the sources. Could you show an example? It seems these files [1,2] don't have any. [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/haskell/binary/0.6.0.0.nix [2] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/

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

2013-06-15 Thread Vladimír Čunát
On 06/15/2013 08:51 PM, Nikita Karetnikov wrote: I have another question. How does 'nix-env -i' determine which version of a package it should install? Priorities can be assigned in the sources. Usually people do choose one version as a reasonable default, and for libraries the other versions

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

2013-06-15 Thread Nikita Karetnikov
> I have committed a patch recently that fix building of cabal-install > with older GHC versions. Maybe that changes makes a difference. If you > have the chance, please try installing that package again with a recent > version of Nixpkgs. It works, but I've tried too many things at the same time.

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

2013-06-15 Thread Peter Simons
Hi Nikita, > I've also tried 'nix-env -p ~/ghc-6.10.4 -i cabal-install-1.16.0.2', but > 'binary' still fails with the same error: > > Warning: binary.cabal: This package requires Cabal version: >=1.8 I am not sure what is causing this error. The operation nix-env -i cabal-install-1.16.0.2

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

2013-06-12 Thread Nikita Karetnikov
> Could it be that /bin/sh is a symlink whose target is not in the > chroot? Yes. I used Guix to build a statically linked version of Bash: guix# ./pre-inst-env guile scheme@(guile-user)> (use-modules (guix packages) (guix store)

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

2013-06-12 Thread Peter Simons
Hi Nikita, > Can I add the above to Nix Wiki? yes, that would be great -- please feel free to update the Wiki! > Maybe it's the right time to choose a license [1]. Yeah, we should really do that. And when I say "we", I really mean Eelco should do that. :-) Take care, Peter

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

2013-06-12 Thread Nikita Karetnikov
> The way to go is to create a separate profile for every version of GHC > that you want to use like so: > $ nix-env -p ~/ghc-6.10.4 -iA nixpkgs.haskellPackages_ghc6104.ghc > $ nix-env -p ~/ghc-7.6.3 -iA nixpkgs.haskellPackages_ghc762.ghc > Now, you can add both of those profiles into your c

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

2013-06-12 Thread Peter Simons
Hi Nikita, > According to [1], it should be possible to use multiple versions at once. you are right, the wiki page is misleading. As others have pointed out already, it is not possible to install multiple versions of GHC into the same profile, because these packages collide in binaries like "bi

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

2013-06-12 Thread Marc Weber
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 s

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

2013-06-12 Thread Vladimír Čunát
On 06/12/2013 01:19 AM, Nikita Karetnikov wrote: I'm trying to install several versions of GHC. There are two problems: 1. According to this page [1], it should be possible to use multiple versions at once. But 'nix-env -iA' always replaces the previous version. For example, if I run

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

2013-06-12 Thread Ludovic Courtès
Hi! Nikita Karetnikov skribis: > I'm trying to install several versions of GHC. There are two > problems: > > 1. According to this page [1], it should be possible to use multiple >versions at once. But 'nix-env -iA' always replaces the previous >version. For example, if I run the foll

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

2013-06-11 Thread Nikita Karetnikov
I'm trying to install several versions of GHC. There are two problems: 1. According to this page [1], it should be possible to use multiple versions at once. But 'nix-env -iA' always replaces the previous version. For example, if I run the following commands: # nix-env -iA nixpkgs.has