[Nix-dev] ghc-pkg check | maintaining multiple versions of haskell package

Peter Simons simons at cryp.to
Wed Sep 12 14:03:58 CEST 2012


Hi Dmitry,

 > $> nix-build -A haskellPackages.cabalDev
 > [...]
 > Configuring cabal-dev-0.9.1...
 > Setup: At least the following dependencies are missing:
 > mtl >=1.1 && <2.1, tar ==0.3.*, transformers ==0.2.*

the 'haskellPackages' environment contains more recent versions of these
packages. To make your build succeed, you have pass older versions
explicitly to the expression. (Take a look at the attribute 'darcs' in
haskell-packages.nix, to see an example how that's done.)


 > So, what version of transformers I actually have?

The default configuration is:

  haskellPlatformArgs_2012_2_0_0 = self : {
    inherit (self) cabal ghc;
    cgi          = self.cgi_3001_1_7_4;         # 7.4.1 ok
    fgl          = self.fgl_5_4_2_4;            # 7.4.1 ok
    GLUT         = self.GLUT_2_1_2_1;           # 7.4.1 ok
    haskellSrc   = self.haskellSrc_1_0_1_5;     # 7.4.1 ok
    html         = self.html_1_0_1_2;           # 7.4.1 ok
    HTTP         = self.HTTP_4000_2_3;          # 7.4.1 ok
    HUnit        = self.HUnit_1_2_4_2;          # 7.4.1 ok
    mtl          = self.mtl_2_1_1;              # 7.4.1 ok
    network      = self.network_2_3_0_13;       # 7.4.1 ok
    OpenGL       = self.OpenGL_2_2_3_1;         # 7.4.1 ok
    parallel     = self.parallel_3_2_0_2;       # 7.4.1 ok
    parsec       = self.parsec_3_1_2;           # 7.4.1 ok
    QuickCheck   = self.QuickCheck_2_4_2;       # 7.4.1 ok
    random       = self.random_1_0_1_1;         # 7.4.1 ok
    regexBase    = self.regexBase_0_93_2;       # 7.4.1 ok
    regexCompat  = self.regexCompat_0_95_1;     # 7.4.1 ok
    regexPosix   = self.regexPosix_0_95_1;      # 7.4.1 ok
    stm          = self.stm_2_3;                # 7.4.1 ok
    syb          = self.syb_0_3_6_1;            # 7.4.1 ok
    text         = self.text_0_11_2_0;          # 7.4.1 ok
    transformers = self.transformers_0_3_0_0;   # 7.4.1 ok
    xhtml        = self.xhtml_3000_2_1;         # 7.4.1 ok
    zlib         = self.zlib_0_5_3_3;           # 7.4.1 ok
    cabalInstall = self.cabalInstall_0_14_0;    # 7.4.1 ok
    alex         = self.alex_3_0_1;             # 7.4.1 ok
    haddock      = self.haddock_2_10_0;         # 7.4.1 ok
    happy        = self.happy_1_18_9;           # 7.4.1 ok
  };


 > How can I fix haskell packages and make `ghc-pkg check` happy?

I'm not sure what causes these errors on your machine, but I would guess
that you have installed packages via Cabal -- instead of Nix -- and
these packages confuse the Nix version of GHC somehow. You could try
deleting the directories "$HOME/.cabal" and "$HOME/.ghc", maybe that
remedies the errors? I'm not an expert, though, I'm just guessing.

Take care,
Peter



More information about the nix-dev mailing list