[Nix-dev] Building ghcjs-dom

Rodney Lorrimar dev at rodney.id.au
Tue Nov 1 17:23:12 CET 2016


On Tue, Nov 01 2016, Profpatsch wrote:

> On 16-11-01 09:10am, Rodney Lorrimar wrote:
>> Hello List,
>> 
>> I would really like this package to build:
>> 
>>   nix-build -A pkgs.haskell.packages.ghcjs.ghcjs-dom
>> 
>> I found that the layout upstream has changed, so updated the overrides
>> accordingly (see patch below).
>> 
>> My current problem is that it won't build without Cabal >= 1.24.
>> 
>> If I use (addBuildTool super.ghcjs-dom-jsffi [ self.cabal-install ]),
>> then it builds Cabal 1.24 as javascript, which is not quite what I want.
>> 
>> Does anyone know how I could make it build?
>
> I have been debugging this for the last week, and I found out that
> it’s a bug in the Cabal library used by the ghcjs native compiler (ghc-7.10.3).
>
> The ghc 7.10.3 compiler distribution ships with Cabal 1.22.5, and that
> has a bug where the package.conf files needed by GHC are generated wrongly
> by Cabal 1.22.5 (the break reexported module statements on `:`.
>
> I’m working on a fix, but this has been the most aggravating bug I have
> every encountered. Also it required deep knowledge of the nix language,
> the haskell packaging and structure of both Cabal and GHC packages to
> even find out where the problem lies. .-.
>
> tl;dr: I will hopefully push a fix shortly.

Hi,

Thanks for your efforts.

I note that ghcjs-dom-jsffi.cabal has the line:

    cabal-version: >=1.24

Do you think this is due to the bug you mention? I did notice the `:`
problem occurred when I added the patch

    sed -i -e 's/1.24/1.22/' ghcjs-dom-jsffi.cabal

If the fix proves too aggravating, could it be more fruitful to give up
on ghcjs 7.10.3 and try the ghc-8.0 branch of ghcjs? (Although I've no
idea what additional problems that would bring!)


Cheers,

Rodney


More information about the nix-dev mailing list