Skip to content

build-tool-depends executables don't have a .conf file #8434

@parsonsmatt

Description

@parsonsmatt

This is a problem that manifests when trying to use haskell.nix. If it sees the build-tool-depends entries, it does try to build them, but then cabal build is unable to see or execute them.

Cf input-output-hk/haskell.nix#839 (comment)

Note that this really isn't specific shellFor, but specific to v2 cabal. You can always use v1-* cabal commands to get the old behavior (see SolveExecutables in cabal code). I think a reason this is coming up recently is that cabal 3.4.0.0 made v2 the default.

The reason this is really difficult is that both Nixpkgs & haskell.nix use the Setup.hs method of configure / install, which doesn't install a .conf file for executable components. I'm not sure if it makes more sense to

See Cabal comment for reference:

build-tools dependencies
NB: Only include these dependencies if SolveExecutables
is True. It might be false in the legacy solver
codepath, in which case there won't be any record of
an executable we need.

I'm unclear whether or not this is a feasible or acceptable approach, and would appreciate guidance on this. @matthewbauer says that we can either

  1. "Patch Cabal so Setup.hs method installs executables correctly,"
  2. "or try to switch to the new install method." (what is the new install method to use?)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions