-
Notifications
You must be signed in to change notification settings - Fork 37
shell.nix depends on build artifacts #532
Comments
Thanks @int-index! Adding @mpickering. |
I don't really know how to fix this. What does hadrian do about this? As in order to build hadrian, I was under the impression you needed to build certain libraries bundled with GHC? |
hadrian at the very least uses the |
The problem is that from a fresh clone, you can't build the libraries in the source tree? You have to run ./boot first in order to generate from cabal files? |
Yes @mpickering, the problem is that An additional problem is that sometimes after doing some work in a nix shell, then exiting it, and entering again, all libraries in the GHC source tree and Hadrian get rebuilt. It's probably |
I don't understand why Hadrian is using libraries shipped with GHC to build itself, can't we use the ones from Hackage/nixpkgs? |
Alp seems to imply that only |
Does Hadrian need |
Well, it needs a |
I won't be trying to do this any time soon, as I've got a [1] https://gist.github.com/int-index/244f1ea276afa7a611a3aff4edddd202 |
In general you likely want to build hadrian with ateast the cabal that comes with the ghc you want to build. That is because cabal and ghc are sometimes developed in tandem. The Make based buildsystem built ghc-cabal against the Cabal that came with ghc die precisely that reason. |
Closing in light of #705, created https://ghc.haskell.org/trac/ghc/ticket/15794 instead. |
This issue has been migrated to Trac: https://ghc.haskell.org/trac/ghc/ticket/15794
Steps to reproduce:
git clone --recursive git://git.haskell.org/ghc.git
cd ghc/hadrian
git pull https://github.com/snowleopard/hadrian && git checkout master
nix-shell --pure
Expected result: Successful build.
Actual result:
Notice that the build fails for a library shipped with GHC. In
shell.nix
it's included aslocalPackage
.Workaround
First, we need to run
configurePhase
of the default Nix derivation for GHC HEAD:cd ghc
nix-shell '<nixpkgs>' -A haskell.compiler.ghcHEAD
configurePhase
exit
Now we can
cd
intoghc/hadrian
and proceed normally, the build won't fail.The issue is that this step shouldn't be required, we must have a self-contained
shell.nix
.The text was updated successfully, but these errors were encountered: