Skip to content

nix-shell tool Ormolu builds with incompatible version of Cabal #1337

Closed
@peterbecich

Description

@peterbecich

ormolu-0.4.0.0 fails to build in nix-shell. I'm not certain this is an issue with haskell.nix

This demonstrates the issue:
https://github.com/peterbecich/haskell.nix-ghcjs-issue/tree/test-ormolu

...
    # Some common tools can be added with the `tools` argument
    tools = {
      cabal = "3.6.2.0";
      hlint = "latest"; # Selects the latest version in the hackage.nix snapshot
      haskell-language-server = "latest";
      ormolu = "latest";
    };
...
% nix-shell
...

src/Ormolu/Utils/Extensions.hs:24:1: error:
    Could not find module 'Distribution.Utils.Path'
    Perhaps you meant
      Distribution.Utils.IOData (from Cabal-3.2.1.0)
      Distribution.Utils.MD5 (from Cabal-3.2.1.0)
      Distribution.Utils.Base62
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
   |
24 | import Distribution.Utils.Path (getSymbolicPath)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   

Ormolu 0.4.0.0 specifies Cabal 3.6.*, but this appears to be ignored:
https://hackage.haskell.org/package/ormolu-0.4.0.0

Cabal-3.6.2.0 has Distribution.Utils.Path https://hackage.haskell.org/package/Cabal-3.6.2.0/docs/Distribution-Utils-Path.html and Cabal-3.2.1.0 doesn't: https://hackage.haskell.org/package/Cabal-3.2.1.0

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions