input-output-hk / haskell.nix

Alternative Haskell Infrastructure for Nixpkgs
https://input-output-hk.github.io/haskell.nix
Apache License 2.0
556 stars 240 forks source link

Failure to build ihaskell from snapshot #1433

Closed thomasjm closed 2 years ago

thomasjm commented 2 years ago

I'm trying to build the ihaskell binary like this:

let
  # My fork of a recent haskell.nix; fixes a couple stackage version problems
  haskellNix = import (builtins.fetchTarball https://github.com/codedownio/haskell.nix/archive/a3acfa49682870cc1db1120bd0c5f4a593de5884.tar.gz) {};
  nixpkgs = import haskellNix.sources.nixpkgs haskellNix.nixpkgsArgs;
in
  nixpkgs.haskell-nix.snapshots."lts-19.2".ihaskell.components.exes.ihaskell

However, it fails with an attempt to build the ghc library (logs below).

I don't think it should be trying to build this library at all? The stackage.nix data shows that it should be included with the compiler. Not sure if relevant, but I noticed that in Nixpkgs, the GHC-included are nulled out from the package set.

Can anyone shed light on this issue? Thanks!

building '/nix/store/xk1mj434kgxhflmyb51s0g614ci2zcx0-ghc-lib-ghc-9.0.2.drv'...
unpacking sources
unpacking source archive /nix/store/lvbixqvvv6c6s84n79krs5fim6146b73-ghc-src
source root is ghc-src
patching sources
configuring
Configure flags:
--prefix=/nix/store/rzjf8jpfisk3xf3l8xf2gc4f0dgnr4sh-ghc-lib-ghc-9.0.2 lib:ghc --package-db=clear --package-db=/nix/store/7lbq9hyq3wlf6ja6qgxa4rqp8m35cbrh-ghc-lib-ghc-9.0.2-config/lib/ghc-9.0.2/package.conf.d --flags=dynamic-system-linker --flags=-ghci --flags=-stage1 --flags=-stage2 --flags=-stage3 --flags=terminfo --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld.gold --ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-profiling --enable-static --enable-shared --disable-coverage --enable-library-for-ghci --enable-split-sections
Configuring library for ghc-9.0.2..
building
Preprocessing library for ghc-9.0.2..
Setup: can't find source for GHC/Settings/Config in ., dist/build/autogen,
dist/build/global-autogen

error: builder for '/nix/store/xk1mj434kgxhflmyb51s0g614ci2zcx0-ghc-lib-ghc-9.0.2.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/1yyslir0h5kbjnx53vafnf5v01j4yfjj-ihaskell-exe-ihaskell-0.10.2.2.drv' failed to build
hamishmack commented 2 years ago

I think this should have been fixed by #1437

thomasjm commented 2 years ago

Thanks @hamishmack ! It builds now.