[Nix-dev] ghcWithPackages

Tim Barbour trb at categorical.net
Mon Aug 18 15:43:13 CEST 2014


It seems that some versions of haskellPackages define ghcWithPackages, and
others do not.

I have been following the approach described at

   https://nixos.org/wiki/Haskell#Using_cabal_in_the_direct_installation_scenario

under the heading "Local use via Nixpkgs config".

If I use haskellPackages.ghcWithPackages with yi in the list of packages, I get

installing `haskell-env-ghc-7.6.3'
these derivations will be built:
  /nix/store/3n7dzh6c1idpjbq27wzds0784i200kpi-haskell-env-ghc-7.6.3.drv
  /nix/store/7kbz46k29gxgx67lxs2fymk3crkd0q1d-haskell-yi-ghc7.6.3-0.8.1.drv
...

  60% (  9 / 15) in 'Yi.Command'
haddock: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for x86_64-unknown-linux):
	mkWWcpr: not a product
<<details unavailable>>

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

builder for `/nix/store/7kbz46k29gxgx67lxs2fymk3crkd0q1d-haskell-yi-ghc7.6.3-0.8.1.drv' failed with exit code 1
cannot build derivation `/nix/store/3n7dzh6c1idpjbq27wzds0784i200kpi-haskell-env-ghc-7.6.3.drv': 1 dependencies couldn't be built
error: build of `/nix/store/3n7dzh6c1idpjbq27wzds0784i200kpi-haskell-env-ghc-7.6.3.drv' failed


which looks very similar to this bug:

   https://ghc.haskell.org/trac/ghc/ticket/9170

Since the bug is supposed to be fixed in ghc >= 7.8.2, I would like to use a newer version of
haskellPackages. But if I try haskellPackages_ghc783.ghcWithPackages, I get 

 error: attribute `haskellPackages_ghc783.ghcWithPackages' missing

OTOH, haskellPackages_ghc742.ghcWithPackages has no such error.

It seems that some versions of haskellPackages define ghcWithPackages, and
others do not. Why ? What is the right way to specify a particular version of
ghc ? Or better still, avoid a given version of ghc ?

Tim
---
GPG public key available at: 
	 http://phasechangeit.com/~trb/gpg-key  or 
	 http://subkeys.pgp.net:11371


More information about the nix-dev mailing list