[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Haskell dependencies for custom cabal builds
From: |
John Soo |
Subject: |
Re: Haskell dependencies for custom cabal builds |
Date: |
Mon, 11 Feb 2019 13:56:51 -0800 |
Thanks Tim,
I’ll check out git-annex as a start. Custom Cabal builds would be a nice
feature to add to the haskell-build-system. Would it be sufficient to add some
extra argument to the build system?
Best,
John
> On Feb 11, 2019, at 12:19 PM, Timothy Sample <address@hidden> wrote:
>
> Hi John,
>
> John Soo <address@hidden> writes:
>
>> Hi Guix,
>>
>> I’ve been working on some Haskell packages and got stuck recently and I
>> didn’t know why until I realized the cabal files have `build-type: Custom`
>> (http://hackage.haskell.org/package/termonad-1.1.0.0/termonad.cabal). I
>> always get missing dependencies even though I have the dependencies listed
>> in `inputs` (haskell-gi-base and
>> friends in the example above). What do I need to do to fix this?
>
> You might be able to take some inspiration from git-annex, which I
> believe has the same problem.
>
> In short, the issue is that the haskell-build-system unsets
> “GHC_PACKAGE_PATH” before calling “runhaskell Setup.hs”. This is
> because it assumes that “Setup.hs” will use Cabal in a pretty direct
> way, and that Cabal will setup the required packages from the command
> line (Cabal complains if you try to use “GHC_PACKAGE_PATH”, because it
> wants to be in control of the environment). If the custom build code
> needs dependencies, they will not be available (unless it does what
> Cabal does and reads package paths from the command line and sets
> everything up from within Haskell).
>
> For git-annex, I was able to skirt the problem. I don’t know how to
> solve it. If you keep “GHC_PACKAGE_PATH” set, the Cabal part of the
> build will likely complain. However, without it, the custom part of the
> build can’t find its dependencies.
>
> That’s about all I can recall right now. I hope that helps at least a
> little bit! :)
>
>
> -- Tim
- Haskell dependencies for custom cabal builds, John Soo, 2019/02/11
- Re: Haskell dependencies for custom cabal builds, Timothy Sample, 2019/02/11
- Re: Haskell dependencies for custom cabal builds,
John Soo <=
- Re: Haskell dependencies for custom cabal builds, Timothy Sample, 2019/02/12
- Re: Haskell dependencies for custom cabal builds, John Soo, 2019/02/12
- Re: Haskell dependencies for custom cabal builds, Timothy Sample, 2019/02/12
- Re: Haskell dependencies for custom cabal builds, Timothy Sample, 2019/02/12
- Re: Haskell dependencies for custom cabal builds, Marius Bakke, 2019/02/12
- Re: Haskell dependencies for custom cabal builds, John Soo, 2019/02/12
- Re: Haskell dependencies for custom cabal builds, John Soo, 2019/02/12