[Nix-dev] [Hackage] How to install Hackage package, not presented in nixpkgs, locally?

Marc Weber marco-oweber at gmx.de
Wed Aug 15 11:21:58 CEST 2012


Those hashes have been introduced somewhen after ghc 6.12 to make the
dependency hell easier which existed with cabal. Eg if you have

A > B > C > D and you cabal had to recompile A and B because you tried
installing yet another package C and D are "stale" because A,B it
depends on are gone. To detect this case hashes were introduced.
Usually chances were high that things just worked. But don't forget
that it could have been also you reinstalling the dev version of B
not changing version number. That could lead to bugs which are hard to
find if you don't recompile C and D.

Now what does it mean in your case? Try installing everything without
hydra and retry - it may be the case that A,B were built by hydra, but C 
is what you're trying to build locally.

I don't know exactly how ghc/cabal calculates those hashes, so I may be
wrong. But it very much looks like such a problem.

How to rebuild everything from source? Got to the definition of that ghc
version, then add a dummy env var such as

  FORCE_REBUILD=1; 

and retry. That FORCE_REBUILD should cause nix rebuilding everything
from source. Report if this solved the issue. If it does we should
document it on the wiki till somebody has time to find a real fix for
it.

Of course you can try waiting for additional replies, too.

Marc Weber


More information about the nix-dev mailing list