Skip to content

cabal-3.2.0.0 possibly fails to build; used by GHCJS 8.6 and 8.8 #1377

@peterbecich

Description

@peterbecich

I see here that Cabal 3.2.0.0 is used for GHCJS projects when GHC is less than 8.10:

if (builtins.compareVersions ghcjsVersion "8.10.0.0" >= 0)
then pkgs.haskell-nix.tool compiler-nix-name "cabal" {
index-state = pkgs.haskell-nix.internalHackageIndexState;
version = "3.6.2.0";
materialized = ../materialized/ghcjs/cabal + "/${compiler-nix-name}";
}
else pkgs.haskell-nix.tool compiler-nix-name "cabal" {
index-state = pkgs.haskell-nix.internalHackageIndexState;
version = "3.2.0.0";
# Cabal 3.2.1.0 no longer supports he mix of `cabal-version`,
# lack of `custom-setup` and `v1-install` used by ghcjs boot.
cabalProjectLocal = ''
constraints: Cabal <3.2.1.0
'';
materialized = ../materialized/ghcjs/cabal + "/${compiler-nix-name}";
}

This demonstrates an error in building Cabal 3.2.0.0:
https://github.com/peterbecich/haskell.nix-ghcjs-issue/tree/cabal-3.2.0.0-build-error

nix build -f default.nix
...
error: builder for '/nix/store/6wjgavmacpma7ghkfiihqxd56np122hs-cabal-install-exe-cabal-3.2.0.0.drv' failed with exit code 1;

The specific error is:

Distribution/Client/SetupWrapper.hs:114:1: error:
    Could not find module ‘Distribution.Compat.Process’
    Perhaps you meant
      Distribution.Compat.Lens (from Cabal-3.2.0.0)
      Distribution.Compat.Prelude
      Distribution.Compat.SnocList
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
    |
114 | import Distribution.Compat.Process (createProcess)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Thanks

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