I just received the solution I was looking for from 23Skidoo:
You can solve this by adding a line
constraints: some-package +some-flag
to cabal.config
(in sandboxed project).
-------- Original Message --------
Subject: Re: [Haskell-cafe] Specifying cabal sandbox flag for local package
From: Rogan Creswick <creswick@gmail.com>
To: vlatko.basic@gmail.com
Cc: haskell-cafe <haskell-cafe@haskell.org>
Date: 03.07.2014 22:09
On Thu, Jul 3, 2014 at 9:47 AM, Vlatko Basic <vlatko.basic@gmail.com> wrote:
Hello Cafe,
I have a local forked package and added its path to sandboxed project with
'cabal sandbox add-source PATH'.
However, to build that package I have to specify a flag to 'cabal install'.
In other words I can't install it by
'cabal install --only-dependencies',
but separately with
'cabal install PACKAGE -fFLAG'.
I believe you can use constraints to resolve this.
eg:
$ cabal install --only-dep --constraint="snap-server +openssl"
to install snap-server (a dependency) with the openssl flag set.
(Credit to Adam Foltzer for pointing this out to me yesterday, coincidentally.)
--Rogan
Is there a way to tell cabal sandbox (or in project.cabal) to always use some flag(s) for compiling a (particular) package in local path?
GHC 7.8.2, Cabal 1.20.0
Best regards,
vlatko
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe