Hi all,

I am working with the latest thrift code from a Haskell program. I have
made a few changes locally to the Haskell build scripts in order to install
the Haskell lib and it's dependencies into a sandbox. I would like to run
these changes past you, and either contribute them back or learn a better
way of installing the thrift Haskell lib into a sandbox.

My changes can be found here
<https://github.com/SamRoberts/thrift/tree/enable_cabal_global_flags>, but
I'll describe what happened below:

   1. I tried to use CABAL_CONFIGURE_FLAGS to use an external sandbox
   config file, but CABAL_CONFIGURE_FLAGS didn't seem to have any effect. I
   suspect it has done nothing ever since this commit
   
<https://github.com/apache/thrift/commit/c0a7d72c83d93cf266d57b25a3b8850eb81c47d6>
   (released in version 0.9.2).
   2. As the configure step was deliberately removed from the build, I
   removed CABAL_CONFIGURE_FLAGS and added CABAL_GLOBAL_FLAGS, a variable for
   cabal global flags that get added to every cabal call in the Haskell build.
   This lets the user specify a sandbox, or to add --no-require-sandbox if
   necessary.
   3. This means using cabal exec for all raw ghc calls as well, so that
   calls to ghc have the sandbox packages available to them.

(I also removed the cabal update command from the build as I didn't really
approve of a build system running that for me, but that's not related to
the main changes and I can easily add back the update command if desired.)

Would you be happy for to do a PR with these changes? Or would you prefer
that I take a different approach?

Many thanks,
Sam

Reply via email to