Björn Peemöller | 17 Dec 11:05 2012
Picon

Cabal: Retrieve directory in which binaries get installed

Hello cafe,

I'd like to retrieve the path in which binaries get installed when I
`cabal install` a package.

Normally, this would be ~/.cabal/bin on my Linux, but since I share my
home folder on two architectures, in ~/.cabal/config I set the
user-install prefix to ~/.cabal/$arch, so binaries get installed to
~/.cabal/$arch/bin.

I have the feeling that it should be rather simple to retrieve the
FilePath from the Cabal API, does anyone know how to do this?

Thanks in advance,
Björn
Roman Cheplyaka | 17 Dec 11:14 2012

Re: Cabal: Retrieve directory in which binaries get installed

There's getBinDir in the generated module Paths_pkgname
(dist/build/autogen/Paths_pkgname.hs).

This module is generated by "cabal configure" and can be imported
in the modules of your package.

Roman

* Björn Peemöller <bjp <at> informatik.uni-kiel.de> [2012-12-17 11:05:52+0100]
> Hello cafe,
> 
> I'd like to retrieve the path in which binaries get installed when I
> `cabal install` a package.
> 
> Normally, this would be ~/.cabal/bin on my Linux, but since I share my
> home folder on two architectures, in ~/.cabal/config I set the
> user-install prefix to ~/.cabal/$arch, so binaries get installed to
> ~/.cabal/$arch/bin.
> 
> I have the feeling that it should be rather simple to retrieve the
> FilePath from the Cabal API, does anyone know how to do this?
> 
> Thanks in advance,
> Björn
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe <at> haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
(Continue reading)


Gmane