New Functional Programming Job Opportunities
Here are some functional programming job opportunities that were posted recently: Developer / DevOps Engineer at Klarna http://functionaljobs.com/jobs/8721-developer-devops-engineer-at-klarna Cheers, Sean Murphy FunctionalJobs.com
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'. 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
On Thu, Jul 3, 2014 at 12:47 PM, 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'.
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?
A way of side stepping this problem is to setup a sandbox in the forked project directory with "cabal sandbox init --sandbox=../MyProject/.cabal-sandbox", then you can run "cabal install --flags" in the forked project directory, and it will install to the sandbox for your downstream project. Anthony
Hi Anthony, I can install it manually, I'm just trying to find out if a solution exist to tell cabal to use a flag for compiling an external package, i.e. to treat it as if there is no flag. Something like "add-source-flags" would do. :-) I also tried 'ghc-options: -DFLAG' in project's cabal file, but no luck. vlatko -------- Original Message -------- Subject: Re: [Haskell-cafe] Specifying cabal sandbox flag for local package From: Anthony Cowley <acowley@seas.upenn.edu> To: vlatko.basic@gmail.com Cc: haskell-cafe <haskell-cafe@haskell.org> Date: 03.07.2014 19:24
On Thu, Jul 3, 2014 at 12:47 PM, 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'.
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?
A way of side stepping this problem is to setup a sandbox in the forked project directory with "cabal sandbox init --sandbox=../MyProject/.cabal-sandbox", then you can run "cabal install --flags" in the forked project directory, and it will install to the sandbox for your downstream project.
Anthony
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
You could try adding that constraint with the flag to the cabal.config in the sandbox. Something like: Constraint: snap-server +openssl I've put constraints there before, but I'm not sure if the flag syntax works in that spot. Erik On Fri, Jul 4, 2014 at 3:07 PM, Vlatko Basic <vlatko.basic@gmail.com> wrote:
Hi Rogan,
Thanks for the tip. It works as you said. Good to know.
However, this the same as manually installing the package with 'cabal install'. I'm trying to find a solution to bind the flag with the source permanently, so when you specify it once, no need to mention it again.
vlatko
-------- 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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Hi Erik, Just received the same solution a few minutes ago. It works. vlatko -------- Original Message -------- Subject: Re: [Haskell-cafe] Specifying cabal sandbox flag for local package From: Erik Hesselink <hesselink@gmail.com> To: vlatko.basic@gmail.com Cc: Rogan Creswick <creswick@gmail.com>, haskell-cafe <haskell-cafe@haskell.org> Date: 04.07.2014 15:16
You could try adding that constraint with the flag to the cabal.config in the sandbox. Something like:
Constraint: snap-server +openssl
I've put constraints there before, but I'm not sure if the flag syntax works in that spot.
Erik
On Fri, Jul 4, 2014 at 3:07 PM, Vlatko Basic <vlatko.basic@gmail.com> wrote:
Hi Rogan,
Thanks for the tip. It works as you said. Good to know.
However, this the same as manually installing the package with 'cabal install'. I'm trying to find a solution to bind the flag with the source permanently, so when you specify it once, no need to mention it again.
vlatko
-------- 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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (5)
-
Anthony Cowley -
Erik Hesselink -
Functional Jobs -
Rogan Creswick -
Vlatko Basic