guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Haskell dependencies for custom cabal builds


From: Timothy Sample
Subject: Re: Haskell dependencies for custom cabal builds
Date: Mon, 11 Feb 2019 15:19:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]