stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

nix-shell fails because cabal could not resolve dependencies

Open TikhonJelvis opened this issue 2 years ago • 0 comments

I cloned the repo and ran nix-shell without changing anything. It failed with an error. Here are the bits of the build log that seem relevant:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: stylish-haskell-0.14.1.0 (user goal)
[__1] next goal: ghc-lib-parser-ex (dependency of stylish-haskell)
[__1] rejecting: ghc-lib-parser-ex-9.0.0.4 (conflict: stylish-haskell =>
ghc-lib-parser-ex>=9.2.0.3 && <9.3)
[__1] skipping: ghc-lib-parser-ex-9.0.0.3, ghc-lib-parser-ex-9.0.0.2,

...

ghc-lib-parser-ex-0.20200102, ghc-lib-parser-ex-8.10.0.18 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=9.2.0.3 && <9.3' from 'stylish-haskell')
[__1] fail (backjumping, conflict set: ghc-lib-parser-ex, stylish-haskell)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: stylish-haskell, ghc-lib-parser-ex

...

error: attribute 'shellFor' missing

       at /nix/store/i05lrdjk7ifck3zkwdq2v9swxyf5m532-source/overlays/haskell.nix:545:35:

          544|             let project = project' // { recurseForDerivations = false; };
          545|             in rawProject // rec {
             |                                   ^
          546|               hsPkgs = final.lib.mapAttrs (packageName: package':
(use '--show-trace' to show detailed location information)

I'll give a try to debugging this. I haven't seriously used haskell.nix before, so I'm assuming the Nix error is caused by the cabal issue, but I'm not entirely sure.

TikhonJelvis avatar Apr 18 '22 18:04 TikhonJelvis