Difference between revisions of "Talk:Cabal/How to install a Cabal package"

From HaskellWiki
Jump to navigation Jump to search
(Added question about "cabal install" with darcs)
(rp. huh?)
 
Line 23: Line 23:
   
 
'''Question about DARCS''': How does one install from a DARCS repository? In some places this seems to be a "natural thing to do" for some people but it isn't self explanatory.
 
'''Question about DARCS''': How does one install from a DARCS repository? In some places this seems to be a "natural thing to do" for some people but it isn't self explanatory.
  +
  +
:I don't really follow. If you have a directory containing source files managed by Darcs, then if it is packaged by Cabal, (has a foo.cabal, Setup.hs, etc.), then you build and install as normal. If the sources in a repository are packaged with Autotools, then you configure && make && make install. And so on - whether it's a tarball or a darcs repo or a git repo or a svn repo makes no difference. --[[User:Gwern|Gwern]] 01:47, 17 December 2008 (UTC)

Latest revision as of 01:47, 17 December 2008

I would like to add the following to the end of this topic:

(begin proposed addendum)

Note: If you have more than one Haskell compiler on your system, use the --with-compiler option for the configure step. That will ensure that Cabal uses the correct compiler during the entire installation process. For example:


 runghc Setup.hs configure --with-compiler=ghc-6.8.2
 runghc Setup.hs build
 runghc Setup.hs install

(end proposed addendum)

Without this, I didn't know that you need to use that flag. I just ran runhaskell with an explicit path to the compiler that I wanted. Cabal then ran the wrong ghc-pkg, and registered the installation to the wrong compiler.

Question about DARCS: How does one install from a DARCS repository? In some places this seems to be a "natural thing to do" for some people but it isn't self explanatory.

I don't really follow. If you have a directory containing source files managed by Darcs, then if it is packaged by Cabal, (has a foo.cabal, Setup.hs, etc.), then you build and install as normal. If the sources in a repository are packaged with Autotools, then you configure && make && make install. And so on - whether it's a tarball or a darcs repo or a git repo or a svn repo makes no difference. --Gwern 01:47, 17 December 2008 (UTC)