-
Notifications
You must be signed in to change notification settings - Fork 725
Description
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 (seeSolveExecutablesin 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
- "Patch Cabal so Setup.hs method installs executables correctly,"
- "or try to switch to the new install method." (what is the new install method to use?)