[Nix-dev] Mixing cabal and Nix? Or: Best way to install development versions of Haskell packages?

Aristid Breitkreuz aristidb at googlemail.com
Fri Mar 9 14:58:26 CET 2012


The mailing list doesn't seem to like 100 KB attachments, so here's a link
instead:

http://dl.dropbox.com/u/6149885/agda-install-20120309.txt

The message that I tried to sent is following.

---------- Forwarded message ----------
From: Aristid Breitkreuz <aristidb at googlemail.com>
Date: 2012/3/9
Subject: Re: [Nix-dev] Mixing cabal and Nix? Or: Best way to install
development versions of Haskell packages?
To: Peter Simons <simons at cryp.to>
Cc: nix-dev at lists.science.uu.nl


Hi Peter,

2012/3/9 Peter Simons <simons at cryp.to>

> Hi Aristid,
>
>  > Am I rightly suspecting that it isn't possible to mix cabal and Agda,
> even
>  > just for development versions of some packages?
>
> Cabal and Nix work together just fine. What doesn't work, though, is mixing
> Haskell software that's been installed via Nix and Haskell software that's
> been
> installed by other means, say the native package manager of your host OS.
> Maybe
> that is what you've been doing?
>
>
I installed cabal from nix:

$ which cabal
/home/aristid/.nix-profile/bin/cabal

(I also have a non-nix cabal, but as which indicates, the Nix version is
used.)


 > $ cabal install --disable-documentation
>
> Where did you get that Cabal binary from? And what compiler is it using
> for the
> build? (If in doubt, please run the command with '-v' to enable more
> verbose
> output and post the results here.)
>

I have attached the results of trying cabal install with -v again, after
first cleaning all the object files.



> You should make sure that the 'ghc' command in your $PATH is the binary
> provided by the Nix package "ghc-7.4.1-wrapper". Any other binary is not
> going
> to find any of the Haskell packages that you installed via Nix.
>

Decoding the symlinks, it uses the following GHC, which should be right:

/nix/store/c1v602d9142bw82jxn27vd9ga0q0gj6v-ghc-7.4.1-wrapper/bin/ghc

The problem however, seems to happen with the following command:

/nix/store/c1v602d9142bw82jxn27vd9ga0q0gj6v-ghc-7.4.1-wrapper/bin/ghc-pkg


Weirdly, it _does_ seem to use Cabal (as opposed to cabal-install) from the
GHC 7.0 version. But that doesn't seem to be the problem in this case?

Do you have an idea what is going on?


Thanks!

Aristid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120309/9f5fc4e0/attachment.html 


More information about the nix-dev mailing list