Cabal and simultaneous installations of the same package

Miëtek Bak mietek at bak.io
Mon Mar 23 15:28:14 UTC 2015


On 2015-03-23, at 09:52, Simon Peyton Jones <simonpj at microsoft.com> wrote:

> The point is that I may need to install a bunch of packages to build a program.  If I’m using Cabal, none of those newly installed packages need be exposed; I simply need them there so I can compile my program (using Cabal).   But at the moment I can’t do that.

Do you mean that you may need to install a bunch of packages to build a _build-tool_ (such as alex, happy, c2hs, cpps…), in order to compile your program?

If yes, then one way to avoid having these packages pollute your build environment is building each Haskell program in a separate sandbox.

There are some tools which attempt to simplify this process.  Halcyon goes a bit further — 

Halcyon allows you to declare other Haskell programs to be installed as build-time (or run-time!) dependencies for your program.  If needed, they will be built on-the-fly; otherwise, they will be restored from previously-built archives.

This works around long-standing cabal-install issues:
https://github.com/haskell/cabal/issues/220
https://github.com/haskell/cabal/issues/779

See the Haskell Language source code for an example:
https://halcyon.sh/examples/#haskell-language

See the Halcyon reference for details:
https://halcyon.sh/reference/#halcyon_sandbox_extra_apps
https://halcyon.sh/reference/#halcyon_extra_apps


-- 
Miëtek
https://mietek.io


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4203 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20150323/5c467f82/attachment.bin>


More information about the ghc-devs mailing list